smc91c111: Fix receive starvation
authorSebastian Huber <sebastian.huber@embedded-brains.de>
Thu, 14 Nov 2013 13:53:46 +0000 (14:53 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 15 Nov 2013 12:25:39 +0000 (13:25 +0100)
In case the smc91c111 interface signals that it cannot receive more
packets the packets are queued and further reception will be disabled.
In case the interface is again ready to receive packets notify the upper
layer.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/net/smc91c111.c

index f5963e2cbe12d6052c20d9840afb90e3daa47d72..a8e29b3b424cceee6a66af09f4d8a1a706d2dcb9 100644 (file)
@@ -185,6 +185,7 @@ static void smc91c111_release_packet(smc91c111_state *s, int packet)
     s->allocated &= ~(1 << packet);
     if (s->tx_alloc == 0x80)
         smc91c111_tx_alloc(s);
+    qemu_flush_queued_packets(qemu_get_queue(s->nic));
 }
 
 /* Flush the TX FIFO.  */