qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] Fix buffer run out in eepro100.
@ 2012-08-29 11:26 Bo Yang
  2012-08-29 15:19 ` Stefan Hajnoczi
  2012-08-29 19:17 ` Stefan Weil
  0 siblings, 2 replies; 12+ messages in thread
From: Bo Yang @ 2012-08-29 11:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: stefanha

This is reported by QA. When installing os with pxe, after the initial
kernel and initrd are loaded, the procedure tries to copy files from install
server to local harddisk, the network becomes stall because of running out of
receive descriptor.

Signed-off-by: Bo Yang <boyang@suse.com>
---
 hw/eepro100.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hw/eepro100.c b/hw/eepro100.c
index 50d117e..52a18ad 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1036,6 +1036,8 @@ static void eepro100_ru_command(EEPRO100State * s, uint8_t val)
         }
         set_ru_state(s, ru_ready);
         s->ru_offset = e100_read_reg4(s, SCBPointer);
+    	qemu_flush_queued_packets(&s->nic->nc);
+	qemu_notify_event();
         TRACE(OTHER, logout("val=0x%02x (rx start)\n", val));
         break;
     case RX_RESUME:
@@ -1770,7 +1772,8 @@ static ssize_t nic_receive(NetClientState *nc, const uint8_t * buf, size_t size)
     if (rfd_command & COMMAND_EL) {
         /* EL bit is set, so this was the last frame. */
         logout("receive: Running out of frames\n");
-        set_ru_state(s, ru_suspended);
+        set_ru_state(s, ru_no_resources);
+	eepro100_rnr_interrupt(s);
     }
     if (rfd_command & COMMAND_S) {
         /* S bit is set. */
-- 
1.6.0.2

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

end of thread, other threads:[~2012-09-18 15:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-29 11:26 [Qemu-devel] [PATCH v2] Fix buffer run out in eepro100 Bo Yang
2012-08-29 15:19 ` Stefan Hajnoczi
2012-08-29 23:47   ` Bo Yang
2012-08-30  7:26     ` Stefan Hajnoczi
2012-08-29 19:17 ` Stefan Weil
2012-08-29 23:52   ` Bo Yang
2012-08-30  8:04   ` Stefan Hajnoczi
2012-08-30  8:38     ` Bo Yang
2012-08-30 11:42       ` Stefan Hajnoczi
2012-08-31  3:40         ` Bo Yang
2012-08-31  5:30           ` Stefan Hajnoczi
2012-09-18 15:19             ` Andreas Färber

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).