[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL V2 06/23] dp8393x: Clear RRRA command register bit only when appro
From: |
Jason Wang |
Subject: |
[PULL V2 06/23] dp8393x: Clear RRRA command register bit only when appropriate |
Date: |
Tue, 3 Mar 2020 18:10:25 +0800 |
From: Finn Thain <address@hidden>
It doesn't make sense to clear the command register bit unless the
command was actually issued.
Signed-off-by: Finn Thain <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Laurent Vivier <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
hw/net/dp8393x.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
index 9604623..b5a9c6a 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -352,9 +352,6 @@ static void dp8393x_do_read_rra(dp8393xState *s)
s->regs[SONIC_ISR] |= SONIC_ISR_RBE;
dp8393x_update_irq(s);
}
-
- /* Done */
- s->regs[SONIC_CR] &= ~SONIC_CR_RRRA;
}
static void dp8393x_do_software_reset(dp8393xState *s)
@@ -565,8 +562,10 @@ static void dp8393x_do_command(dp8393xState *s, uint16_t
command)
dp8393x_do_start_timer(s);
if (command & SONIC_CR_RST)
dp8393x_do_software_reset(s);
- if (command & SONIC_CR_RRRA)
+ if (command & SONIC_CR_RRRA) {
dp8393x_do_read_rra(s);
+ s->regs[SONIC_CR] &= ~SONIC_CR_RRRA;
+ }
if (command & SONIC_CR_LCAM)
dp8393x_do_load_cam(s);
}
--
2.5.0
- [PULL V2 02/23] dp8393x: Always use 32-bit accesses, (continued)
- [PULL V2 02/23] dp8393x: Always use 32-bit accesses, Jason Wang, 2020/03/03
- [PULL V2 11/23] dp8393x: Clear descriptor in_use field to release packet, Jason Wang, 2020/03/03
- [PULL V2 13/23] dp8393x: Don't reset Silicon Revision register, Jason Wang, 2020/03/03
- [PULL V2 17/23] NetRxPkt: fix hash calculation of IPV6 TCP, Jason Wang, 2020/03/03
- [PULL V2 12/23] dp8393x: Always update RRA pointers and sequence numbers, Jason Wang, 2020/03/03
- [PULL V2 04/23] dp8393x: Have dp8393x_receive() return the packet size, Jason Wang, 2020/03/03
- [PULL V2 05/23] dp8393x: Update LLFA and CRDA registers from rx descriptor, Jason Wang, 2020/03/03
- [PULL V2 14/23] dp8393x: Don't stop reception upon RBE interrupt assertion, Jason Wang, 2020/03/03
- [PULL V2 16/23] NetRxPkt: Introduce support for additional hash types, Jason Wang, 2020/03/03
- [PULL V2 21/23] net/filter.c: Add Options to insert filters anywhere in the filter list, Jason Wang, 2020/03/03
- [PULL V2 06/23] dp8393x: Clear RRRA command register bit only when appropriate,
Jason Wang <=
- [PULL V2 07/23] dp8393x: Implement packet size limit and RBAE interrupt, Jason Wang, 2020/03/03
- [PULL V2 15/23] e1000e: Avoid hw_error if legacy mode used, Jason Wang, 2020/03/03
- [PULL V2 20/23] tests/test-replication.c: Add test for for secondary node continuing replication, Jason Wang, 2020/03/03
- [PULL V2 19/23] block/replication.c: Ignore requests after failover, Jason Wang, 2020/03/03
- [PULL V2 22/23] colo: Update Documentation for continuous replication, Jason Wang, 2020/03/03
- [PULL V2 23/23] l2tpv3: fix RFC number typo in qemu-options.hx, Jason Wang, 2020/03/03
- [PULL V2 08/23] dp8393x: Don't clobber packet checksum, Jason Wang, 2020/03/03
- [PULL V2 09/23] dp8393x: Use long-word-aligned RRA pointers in 32-bit mode, Jason Wang, 2020/03/03
- [PULL V2 18/23] hw: net: cadence_gem: Fix build errors in DB_PRINT(), Jason Wang, 2020/03/03
- Re: [PULL V2 00/23] Net patches, Peter Maydell, 2020/03/03