[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/10] dp8393x: Clear RRRA command register bit only when appropr
From: |
Finn Thain |
Subject: |
[PATCH 06/10] dp8393x: Clear RRRA command register bit only when appropriate |
Date: |
Sat, 14 Dec 2019 12:25:57 +1100 |
It doesn't make sense to clear the command register bit unless the
command was actually issued.
Signed-off-by: Finn Thain <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 494deb42bf..3fdc6cc6f9 100644
--- a/hw/net/dp8393x.c
+++ b/hw/net/dp8393x.c
@@ -337,9 +337,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)
@@ -548,8 +545,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.23.0
- [PATCH 00/10] Fixes for DP8393X SONIC device emulation, Finn Thain, 2019/12/13
- [PATCH 05/10] dp8393x: Update LLFA register, Finn Thain, 2019/12/13
- [PATCH 06/10] dp8393x: Clear RRRA command register bit only when appropriate,
Finn Thain <=
- [PATCH 10/10] dp8393x: Don't clobber packet checksum, Finn Thain, 2019/12/13
- [PATCH 09/10] dp8393x: Don't stop reception upon RBE interrupt assertion, Finn Thain, 2019/12/13
- [PATCH 04/10] dp8393x: Don't advance RX descriptor twice, Finn Thain, 2019/12/13
- [PATCH 07/10] dp8393x: Implement TBWC0 and TBWC1 registers to restore buffer state, Finn Thain, 2019/12/13
- [PATCH 08/10] dp8393x: Implement packet size limit and RBAE interrupt, Finn Thain, 2019/12/13
- [PATCH 03/10] dp8393x: Have dp8393x_receive() return the packet size, Finn Thain, 2019/12/13
- [PATCH 02/10] dp8393x: Clean up endianness hacks, Finn Thain, 2019/12/13