[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 12/13] dp8393x: Always update RRA pointers and sequence number
From: |
Finn Thain |
Subject: |
[PATCH v2 12/13] dp8393x: Always update RRA pointers and sequence numbers |
Date: |
Fri, 20 Dec 2019 15:17:46 +1100 |
These operations have to take place regardless of whether or not rx
descriptors have been used up (that is, EOL flag was observed).
Signed-off-by: Finn Thain <address@hidden>
---
hw/net/dp8393x.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 6b69cca329..bd92fa28f6 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -893,12 +893,14 @@ static ssize_t dp8393x_receive(NetClientState *nc, const
uint8_t * buf,
/* Move to next descriptor */
s->regs[SONIC_CRDA] = s->regs[SONIC_LLFA];
s->regs[SONIC_ISR] |= SONIC_ISR_PKTRX;
- s->regs[SONIC_RSC] = (s->regs[SONIC_RSC] & 0xff00) |
(((s->regs[SONIC_RSC] & 0x00ff) + 1) & 0x00ff);
+ }
- if (s->regs[SONIC_RCR] & SONIC_RCR_LPKT) {
- /* Read next RRA */
- dp8393x_do_read_rra(s);
- }
+ s->regs[SONIC_RSC] = (s->regs[SONIC_RSC] & 0xff00) |
+ ((s->regs[SONIC_RSC] + 1) & 0x00ff);
+
+ if (s->regs[SONIC_RCR] & SONIC_RCR_LPKT) {
+ /* Read next RRA */
+ dp8393x_do_read_rra(s);
}
/* Done */
--
2.23.0
- [PATCH v2 00/13] Fixes for DP8393X SONIC device emulation, Finn Thain, 2019/12/19
- [PATCH v2 03/13] dp8393x: Have dp8393x_receive() return the packet size, Finn Thain, 2019/12/19
- [PATCH v2 05/13] dp8393x: Clear RRRA command register bit only when appropriate, Finn Thain, 2019/12/19
- [PATCH v2 04/13] dp8393x: Update LLFA and CRDA registers from rx descriptor, Finn Thain, 2019/12/19
- [PATCH v2 09/13] dp8393x: Use long-word-aligned RRA pointers in 32-bit mode, Finn Thain, 2019/12/19
- [PATCH v2 10/13] dp8393x: Pad frames to word or long word boundary, Finn Thain, 2019/12/19
- [PATCH v2 02/13] dp8393x: Clean up endianness hacks, Finn Thain, 2019/12/19
- [PATCH v2 08/13] dp8393x: Don't clobber packet checksum, Finn Thain, 2019/12/19
- [PATCH v2 06/13] dp8393x: Implement packet size limit and RBAE interrupt, Finn Thain, 2019/12/19
- [PATCH v2 07/13] dp8393x: Don't stop reception upon RBE interrupt assertion, Finn Thain, 2019/12/19
- [PATCH v2 12/13] dp8393x: Always update RRA pointers and sequence numbers,
Finn Thain <=
- [PATCH v2 11/13] dp8393x: Clear descriptor in_use field when necessary, Finn Thain, 2019/12/19
- [PATCH v2 13/13] dp8393x: Correctly advance RRP, Finn Thain, 2019/12/19
- [PATCH v2 01/13] dp8393x: Mask EOL bit from descriptor addresses, Finn Thain, 2019/12/19
- Re: [PATCH v2 00/13] Fixes for DP8393X SONIC device emulation, Laurent Vivier, 2019/12/20