On 7/8/06, Paul Jakma <[EMAIL PROTECTED]> wrote:
On Sat, 8 Jul 2006, Paul Jakma wrote:

> Hmm, define 'unable to use it'? It seems (on very quick testing) to work in
> Solaris.

Spoke too soon, ICMP echos and TCP connects work, but it seems to
have problems transferring anything substantial.


Try this patch - transfers should start to work

Index: hw/pcnet.c
===================================================================
RCS file: /cvsroot/qemu/qemu/hw/pcnet.c,v
retrieving revision 1.2
diff -u -r1.2 pcnet.c
--- hw/pcnet.c	4 Jul 2006 21:42:10 -0000	1.2
+++ hw/pcnet.c	8 Jul 2006 14:44:28 -0000
@@ -57,6 +57,7 @@
     uint64_t timer;
     int xmit_pos, recv_pos;
     uint8_t buffer[4096];
+    int tx_busy;
 };
 
 #ifdef __GNUC__
@@ -659,6 +660,8 @@
     s->csr[114] = 0x0000;
     s->csr[122] = 0x0000;
     s->csr[124] = 0x0000;
+
+    s->tx_busy = 0;
 }
 
 static void pcnet_update_irq(PCNetState *s)
@@ -1104,7 +1107,9 @@
         s->csr[0] &= ~0x0008;
         return;
     }
-    
+
+    s->tx_busy = 1;
+
     txagain:
     if (pcnet_tdte_poll(s)) {
         struct pcnet_TMD tmd;
@@ -1167,6 +1172,8 @@
         if (count--)
           goto txagain;
     }
+
+    s->tx_busy = 0;
 }
 
 static void pcnet_poll(PCNetState *s)
@@ -1177,7 +1184,13 @@
 
     if (CSR_TDMD(s) || 
         (CSR_TXON(s) && !CSR_DPOLL(s) && pcnet_tdte_poll(s)))
+    {
+        /* prevent recursion */
+        if (s->tx_busy)
+            return;
+
         pcnet_transmit(s);
+    }
 }
 
 static void pcnet_poll_timer(void *opaque)
_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to