qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] only check RCTL_EN in e1000_can_receive()


From: Charles Duffy
Subject: [Qemu-devel] [PATCH] only check RCTL_EN in e1000_can_receive()
Date: Tue, 05 Aug 2008 15:35:07 -0500
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

e1000_receive() has code to raise a receive overflow interrupt when the receive buffer head and tail match. However, with the present implementation of e1000_can_receive(), this code is unreachable -- and etherboot breaks as a result.

The attached quick-and-dirty patch fixes etherboot for e1000, and does not appear to break post-boot functionality.
Signed-off-by: Charles Duffy <address@hidden>

Index: hw/e1000.c
===================================================================
--- hw/e1000.c  (revision 4985)
+++ hw/e1000.c  (working copy)
@@ -524,8 +524,7 @@
 {
     E1000State *s = opaque;
 
-    return (!(s->mac_reg[RCTL] & E1000_RCTL_EN) ||
-            s->mac_reg[RDH] != s->mac_reg[RDT]);
+    return (s->mac_reg[RCTL] & E1000_RCTL_EN);
 }
 
 static void

reply via email to

[Prev in Thread] Current Thread [Next in Thread]