[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/23] dp8393x: Clear RRRA command register bit only when appropri
From: |
Jason Wang |
Subject: |
[PULL 06/23] dp8393x: Clear RRRA command register bit only when appropriate |
Date: |
Mon, 2 Mar 2020 15:40:19 +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 01/23] dp8393x: Mask EOL bit from descriptor addresses, (continued)
- [PULL 01/23] dp8393x: Mask EOL bit from descriptor addresses, Jason Wang, 2020/03/02
- [PULL 02/23] dp8393x: Always use 32-bit accesses, Jason Wang, 2020/03/02
- [PULL 00/23] Net patches, Jason Wang, 2020/03/02
- [PULL 01/23] dp8393x: Mask EOL bit from descriptor addresses, Jason Wang, 2020/03/02
- [PULL 03/23] dp8393x: Clean up endianness hacks, Jason Wang, 2020/03/02
- [PULL 02/23] dp8393x: Always use 32-bit accesses, Jason Wang, 2020/03/02
- [PULL 07/23] dp8393x: Implement packet size limit and RBAE interrupt, Jason Wang, 2020/03/02
- [PULL 04/23] dp8393x: Have dp8393x_receive() return the packet size, Jason Wang, 2020/03/02
- [PULL 05/23] dp8393x: Update LLFA and CRDA registers from rx descriptor, Jason Wang, 2020/03/02
- [PULL 08/23] dp8393x: Don't clobber packet checksum, Jason Wang, 2020/03/02
- [PULL 06/23] dp8393x: Clear RRRA command register bit only when appropriate,
Jason Wang <=
- [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, 2020/03/02