From: Jesse Brandeburg Date: Thu, 13 Jan 2011 07:48:13 +0000 (+0000) Subject: e1000: Avoid unhandled IRQ X-Git-Tag: v3.0~1794^2~173^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c11b8adbc48bd21885fbc671df2f8ac04a75473;p=platform%2Fkernel%2Flinux-amlogic.git e1000: Avoid unhandled IRQ If hardware asserted an interrupt and driver is down, then there is nothing to do so return IRQ_HANDLED instead of IRQ_NONE. Returning IRQ_NONE in above situation causes screaming IRQ on virtual machines. CC: Andy Gospodarek Signed-off-by: Tushar Dave Signed-off-by: Jesse Brandeburg Tested-by: Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 4ff88a6..e332aee 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -3478,9 +3478,17 @@ static irqreturn_t e1000_intr(int irq, void *data) struct e1000_hw *hw = &adapter->hw; u32 icr = er32(ICR); - if (unlikely((!icr) || test_bit(__E1000_DOWN, &adapter->flags))) + if (unlikely((!icr))) return IRQ_NONE; /* Not our interrupt */ + /* + * we might have caused the interrupt, but the above + * read cleared it, and just in case the driver is + * down there is nothing to do so return handled + */ + if (unlikely(test_bit(__E1000_DOWN, &adapter->flags))) + return IRQ_HANDLED; + if (unlikely(icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC))) { hw->get_link_status = 1; /* guard against interrupt when we're going down */