commit 404ce95cb202ca6015beb26e9b870f91c0309ee0 Author: Anthony Liguori Date: Wed May 7 16:40:58 2008 -0500 kvm: qemu: fix e1000 can_receive handler The current logic of the can_receive handler is to allow packets whenever the receiver is disabled or when there are descriptors available in the ring. I think the logic ought to be to allow packets whenever the receiver is enabled and there are descriptors available in the ring. Signed-off-by: Anthony Liguori Signed-off-by: Avi Kivity diff --git a/qemu/hw/e1000.c b/qemu/hw/e1000.c index 0728539..01f8983 100644 --- a/qemu/hw/e1000.c +++ b/qemu/hw/e1000.c @@ -520,8 +520,8 @@ e1000_can_receive(void *opaque) { 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) && + s->mac_reg[RDH] != s->mac_reg[RDT]); } static void