]> Git Repo - qemu.git/commitdiff
cadence_gem: Flush queued packets
authorPeter Crosthwaite <[email protected]>
Thu, 28 Feb 2013 18:23:15 +0000 (18:23 +0000)
committerPeter Maydell <[email protected]>
Thu, 28 Feb 2013 18:49:24 +0000 (18:49 +0000)
The device needs to check for queued RX packets when the RX path is re-enabled.

Signed-off-by: Peter Crosthwaite <[email protected]>
Message-id: 1fa8c88a3b7c654886d0a7484c2463cd4c2a2781.1360901435[email protected]
Signed-off-by: Peter Maydell <[email protected]>
hw/cadence_gem.c

index ab86c1702d18a3d607446a2f7921255742077789..e6032ea44f8b49ad108254d570ab63ae2a46f8b3 100644 (file)
@@ -1106,6 +1106,9 @@ static void gem_write(void *opaque, hwaddr offset, uint64_t val,
             /* Reset to start of Q when receive disabled. */
             s->rx_desc_addr = s->regs[GEM_RXQBASE];
         }
+        if (val & GEM_NWCTRL_RXENA) {
+            qemu_flush_queued_packets(qemu_get_queue(s->nic));
+        }
         break;
 
     case GEM_TXSTATUS:
This page took 0.02831 seconds and 4 git commands to generate.