[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 12/14] dp8393x: Always update RRA pointers and sequence number
From: |
Finn Thain |
Subject: |
[PATCH v3 12/14] dp8393x: Always update RRA pointers and sequence numbers |
Date: |
Mon, 20 Jan 2020 09:59:21 +1100 |
These operations have to take place regardless of whether or not rx
descriptors have been used up (that is, EOL flag was observed).
The algorithm is the now the same for a packet that was withheld as
for a packet that was not.
Signed-off-by: Finn Thain <address@hidden>
Tested-by: Laurent Vivier <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 99c5dad7c4..1b73a8703b 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -897,12 +897,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.24.1
- [PATCH v3 01/14] dp8393x: Mask EOL bit from descriptor addresses, (continued)
[PATCH v3 12/14] dp8393x: Always update RRA pointers and sequence numbers,
Finn Thain <=
[PATCH v3 14/14] dp8393x: Don't stop reception upon RBE interrupt assertion, Finn Thain, 2020/01/19
Re: [PATCH v3 00/14] Fixes for DP8393X SONIC device emulation, Laurent Vivier, 2020/01/27
Re: [PATCH v3 00/14] Fixes for DP8393X SONIC device emulation, Finn Thain, 2020/01/27