All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-2.6 PATCH] e1000: fix virtualization bug
@ 2009-05-04 21:19 Jeff Kirsher
  2009-05-05  4:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kirsher @ 2009-05-04 21:19 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Jesse Brandeburg, Jeff Kirsher

From: Jesse Brandeburg <jesse.brandeburg@intel.com>

a recent fix to e1000 (commit 15b2bee2) caused KVM/QEMU/VMware based
virtualized e1000 interfaces to begin failing when resetting.

This is because the driver in a virtual environment doesn't
get to run instructions *AT ALL* when an interrupt is asserted.
The interrupt code runs immediately and this recent bug fix
allows an interrupt to be possible when the interrupt handler
will reject it (due to the new code), when being called from
any path in the driver that holds the E1000_RESETTING flag.

the driver should use the __E1000_DOWN flag instead of the
__E1000_RESETTING flag to prevent interrupt execution
while reconfiguring the hardware.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/e1000/e1000_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 6a46cee..b1419e2 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3738,7 +3738,7 @@ static irqreturn_t e1000_intr(int irq, void *data)
 	struct e1000_hw *hw = &adapter->hw;
 	u32 rctl, icr = er32(ICR);
 
-	if (unlikely((!icr) || test_bit(__E1000_RESETTING, &adapter->flags)))
+	if (unlikely((!icr) || test_bit(__E1000_DOWN, &adapter->flags)))
 		return IRQ_NONE;  /* Not our interrupt */
 
 	/* IMS will not auto-mask if INT_ASSERTED is not set, and if it is


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

* Re: [net-2.6 PATCH] e1000: fix virtualization bug
  2009-05-04 21:19 [net-2.6 PATCH] e1000: fix virtualization bug Jeff Kirsher
@ 2009-05-05  4:31 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-05-05  4:31 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, jesse.brandeburg

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 04 May 2009 14:19:42 -0700

> a recent fix to e1000 (commit 15b2bee2) caused KVM/QEMU/VMware based
> virtualized e1000 interfaces to begin failing when resetting.
> 
> This is because the driver in a virtual environment doesn't
> get to run instructions *AT ALL* when an interrupt is asserted.
> The interrupt code runs immediately and this recent bug fix
> allows an interrupt to be possible when the interrupt handler
> will reject it (due to the new code), when being called from
> any path in the driver that holds the E1000_RESETTING flag.
> 
> the driver should use the __E1000_DOWN flag instead of the
> __E1000_RESETTING flag to prevent interrupt execution
> while reconfiguring the hardware.
> 
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied, thanks.

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

end of thread, other threads:[~2009-05-05  4:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-04 21:19 [net-2.6 PATCH] e1000: fix virtualization bug Jeff Kirsher
2009-05-05  4:31 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.