qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL for-1.6 0/1] Net patches
@ 2013-08-05 12:16 Stefan Hajnoczi
  2013-08-05 12:16 ` [Qemu-devel] [PULL 1/1] pcnet: Flush queued packets on end of STOP state Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Hajnoczi @ 2013-08-05 12:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anthony Liguori, Stefan Hajnoczi

This fix allows the pcnet NIC to work properly with the tap device.

The following changes since commit b9ac5d923b820a0f0152a2df56067e55ce34f487:

  target-mips: fix 34Kf configuration for DSP ASE (2013-08-03 23:33:17 +0200)

are available in the git repository at:

  git://github.com/stefanha/qemu.git net

for you to fetch changes up to ee76c1f821e75550644e084dea85743bbc934f91:

  pcnet: Flush queued packets on end of STOP state (2013-08-05 14:11:17 +0200)

----------------------------------------------------------------
Jan Kiszka (1):
      pcnet: Flush queued packets on end of STOP state

 hw/net/pcnet.c | 4 ++++
 1 file changed, 4 insertions(+)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Qemu-devel] [PULL 1/1] pcnet: Flush queued packets on end of STOP state
  2013-08-05 12:16 [Qemu-devel] [PULL for-1.6 0/1] Net patches Stefan Hajnoczi
@ 2013-08-05 12:16 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2013-08-05 12:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jan Kiszka, Anthony Liguori, Stefan Hajnoczi

From: Jan Kiszka <jan.kiszka@siemens.com>

Analogously to other NICs, we have to inform the network layer when
the can_receive handler will no longer report 0. Without this, we may
get stuck waiting on queued incoming packets.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 hw/net/pcnet.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c
index b606d2b..63aa73a 100644
--- a/hw/net/pcnet.c
+++ b/hw/net/pcnet.c
@@ -861,6 +861,8 @@ static void pcnet_init(PCNetState *s)
 
     s->csr[0] |= 0x0101;
     s->csr[0] &= ~0x0004;       /* clear STOP bit */
+
+    qemu_flush_queued_packets(qemu_get_queue(s->nic));
 }
 
 static void pcnet_start(PCNetState *s)
@@ -878,6 +880,8 @@ static void pcnet_start(PCNetState *s)
     s->csr[0] &= ~0x0004;       /* clear STOP bit */
     s->csr[0] |= 0x0002;
     pcnet_poll_timer(s);
+
+    qemu_flush_queued_packets(qemu_get_queue(s->nic));
 }
 
 static void pcnet_stop(PCNetState *s)
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-05 12:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-05 12:16 [Qemu-devel] [PULL for-1.6 0/1] Net patches Stefan Hajnoczi
2013-08-05 12:16 ` [Qemu-devel] [PULL 1/1] pcnet: Flush queued packets on end of STOP state Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).