[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/23] dp8393x: Always update RRA pointers and sequence numbers
From: |
Jason Wang |
Subject: |
[PULL 12/23] dp8393x: Always update RRA pointers and sequence numbers |
Date: |
Mon, 2 Mar 2020 15:40:25 +0800 |
From: Finn Thain <address@hidden>
These operations need to take place regardless of whether or not
rx descriptors have been used up (that is, EOL flag was observed).
The algorithm is 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>
Signed-off-by: Jason Wang <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 08194a4..cfbc2ee 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -901,12 +901,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.5.0
- [PULL 06/23] dp8393x: Clear RRRA command register bit only when appropriate, (continued)
- [PULL 06/23] dp8393x: Clear RRRA command register bit only when appropriate, Jason Wang, 2020/03/02
- [PULL 11/23] dp8393x: Clear descriptor in_use field to release packet, Jason Wang, 2020/03/02
- [PULL 10/23] dp8393x: Pad frames to word or long word boundary, Jason Wang, 2020/03/02
- [PULL 13/23] dp8393x: Don't reset Silicon Revision register, Jason Wang, 2020/03/02
- [PULL 16/23] NetRxPkt: Introduce support for additional hash types, Jason Wang, 2020/03/02
- [PULL 18/23] hw: net: cadence_gem: Fix build errors in DB_PRINT(), Jason Wang, 2020/03/02
- [PULL 09/23] dp8393x: Use long-word-aligned RRA pointers in 32-bit mode, Jason Wang, 2020/03/02
- [PULL 15/23] e1000e: Avoid hw_error if legacy mode used, Jason Wang, 2020/03/02
- [PULL 14/23] dp8393x: Don't stop reception upon RBE interrupt assertion, Jason Wang, 2020/03/02
- [PULL 19/23] block/replication.c: Ignore requests after failover, Jason Wang, 2020/03/02
- [PULL 12/23] dp8393x: Always update RRA pointers and sequence numbers,
Jason Wang <=
- [PULL 20/23] tests/test-replication.c: Add test for for secondary node continuing replication, Jason Wang, 2020/03/02
- [PULL 17/23] NetRxPkt: fix hash calculation of IPV6 TCP, Jason Wang, 2020/03/02
- [PULL 22/23] colo: Update Documentation for continuous replication, Jason Wang, 2020/03/02
- [PULL 21/23] net/filter.c: Add Options to insert filters anywhere in the filter list, Jason Wang, 2020/03/02
- [PULL 23/23] l2tpv3: fix RFC number typo in qemu-options.hx, Jason Wang, 2020/03/02
- Re: [PULL 00/23] Net patches, Peter Maydell, 2020/03/02