]> Git Repo - qemu.git/commitdiff
dp8393x: Clear RRRA command register bit only when appropriate
authorFinn Thain <[email protected]>
Wed, 29 Jan 2020 09:27:49 +0000 (20:27 +1100)
committerJason Wang <[email protected]>
Tue, 3 Mar 2020 10:04:47 +0000 (18:04 +0800)
It doesn't make sense to clear the command register bit unless the
command was actually issued.

Signed-off-by: Finn Thain <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Laurent Vivier <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
hw/net/dp8393x.c

index 960462397eaa18868a26e4fc4368c0dadd899fa2..b5a9c6ac0f4b0180f0c2c70bcf8b215b273d1ef3 100644 (file)
@@ -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);
 }
This page took 0.027165 seconds and 4 git commands to generate.