Skip to contentSkip to conversation

[4987] only check RCTL_EN in e1000_can_receive()

Qemu-devel Anthony Liguori 1 participant 1 message Aug 6, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 4987

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4987
Author:   aliguori
Date:     2008-08-06 14:11:44 +0000 (Wed, 06 Aug 2008)

Log Message:
-----------
only check RCTL_EN in e1000_can_receive()

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.

Modified Paths:
--------------

    trunk/hw/e1000.c

Modified: trunk/hw/e1000.c
===================================================================

hw/e1000.c +1 -2
@@ -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