[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 06/14] dp8393x: Clear RRRA command register bit only when appr
From: |
Finn Thain |
Subject: |
[PATCH v3 06/14] dp8393x: Clear RRRA command register bit only when appropriate |
Date: |
Mon, 20 Jan 2020 09:59:21 +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>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Laurent Vivier <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 249be403af..2e976781e2 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)
@@ -563,8 +560,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.24.1
- [PATCH v3 00/14] Fixes for DP8393X SONIC device emulation, Finn Thain, 2020/01/19
- [PATCH v3 07/14] dp8393x: Implement packet size limit and RBAE interrupt, Finn Thain, 2020/01/19
- [PATCH v3 11/14] dp8393x: Clear descriptor in_use field to release packet, Finn Thain, 2020/01/19
- [PATCH v3 01/14] dp8393x: Mask EOL bit from descriptor addresses, Finn Thain, 2020/01/19
- [PATCH v3 06/14] dp8393x: Clear RRRA command register bit only when appropriate,
Finn Thain <=
- [PATCH v3 04/14] dp8393x: Have dp8393x_receive() return the packet size, Finn Thain, 2020/01/19
- [PATCH v3 02/14] dp8393x: Always use 32-bit accesses, Finn Thain, 2020/01/19
- [PATCH v3 08/14] dp8393x: Don't clobber packet checksum, Finn Thain, 2020/01/19
- [PATCH v3 05/14] dp8393x: Update LLFA and CRDA registers from rx descriptor, Finn Thain, 2020/01/19
- [PATCH v3 09/14] dp8393x: Use long-word-aligned RRA pointers in 32-bit mode, Finn Thain, 2020/01/19
- [PATCH v3 10/14] dp8393x: Pad frames to word or long word boundary, Finn Thain, 2020/01/19