From patchwork Mon May 4 21:19:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 26864 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 61EEBB7069 for ; Tue, 5 May 2009 07:20:10 +1000 (EST) Received: by ozlabs.org (Postfix) id 52A38DDDFA; Tue, 5 May 2009 07:20:10 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id ECDBCDDDF9 for ; Tue, 5 May 2009 07:20:09 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755379AbZEDVUD (ORCPT ); Mon, 4 May 2009 17:20:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756787AbZEDVUB (ORCPT ); Mon, 4 May 2009 17:20:01 -0400 Received: from qmta01.westchester.pa.mail.comcast.net ([76.96.62.16]:44737 "EHLO QMTA01.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756661AbZEDVUA (ORCPT ); Mon, 4 May 2009 17:20:00 -0400 Received: from OMTA01.westchester.pa.mail.comcast.net ([76.96.62.11]) by QMTA01.westchester.pa.mail.comcast.net with comcast id nNYw1b0040EZKEL51ZL1ed; Mon, 04 May 2009 21:20:01 +0000 Received: from localhost.localdomain ([63.64.152.142]) by OMTA01.westchester.pa.mail.comcast.net with comcast id nZKT1b00F34bfcX3MZKVQG; Mon, 04 May 2009 21:19:43 +0000 From: Jeff Kirsher Subject: [net-2.6 PATCH] e1000: fix virtualization bug To: davem@davemloft.net Cc: netdev@vger.kernel.org, gospo@redhat.com, Jesse Brandeburg , Jeff Kirsher Date: Mon, 04 May 2009 14:19:42 -0700 Message-ID: <20090504211941.10922.95964.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Jesse Brandeburg 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 Signed-off-by: Jeff Kirsher --- drivers/net/e1000/e1000_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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