diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2020-01-29 20:27:49 +1100 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2020-03-03 18:04:47 +0800 |
commit | a3cce2825a0b12bb717a5106daaca245557cc9ae (patch) | |
tree | 91b62e8f0b6369d8469fcaabe9ac0e7433f7c223 /hw | |
parent | 5b0c98fcb7ac006bd8efe0e0fecba52c43a9d028 (diff) |
dp8393x: Clear RRRA command register bit only when appropriate
It doesn't make sense to clear the command register bit unless the
command was actually issued.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/net/dp8393x.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index 960462397e..b5a9c6ac0f 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); } |