Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757091AbXKZXXu (ORCPT ); Mon, 26 Nov 2007 18:23:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756504AbXKZXXl (ORCPT ); Mon, 26 Nov 2007 18:23:41 -0500 Received: from mga02.intel.com ([134.134.136.20]:44773 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755584AbXKZXXk (ORCPT ); Mon, 26 Nov 2007 18:23:40 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.23,216,1194249600"; d="scan'208";a="280430208" Message-ID: <474B5564.4090501@intel.com> Date: Mon, 26 Nov 2007 15:23:16 -0800 From: "Kok, Auke" User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Jeff Garzik , Ian Wienand CC: e1000-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Auke Kok Subject: Re: [PATCH] e100: free IRQ to remove warning when rebooting References: <20071120053044.GE29070@cse.unsw.EDU.AU> <47479260.7010101@garzik.org> In-Reply-To: <47479260.7010101@garzik.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 26 Nov 2007 23:23:39.0467 (UTC) FILETIME=[604E91B0:01C83083] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4079 Lines: 97 Jeff Garzik wrote: > Ian Wienand wrote: >> Hi, >> >> When rebooting today I got >> >> Will now restart. >> ACPI: PCI interrupt for device 0000:00:03.0 disabled >> GSI 20 (level, low) -> CPU 1 (0x0100) vector 53 unregistered >> Destroying IRQ53 without calling free_irq >> WARNING: at >> /home/insecure/ianw/programs/git-kernel/linux-2.6/kernel/irq/chip.c:76 >> dynamic_irq_cleanup() >> >> Call Trace: >> [] show_stack+0x40/0xa0 >> sp=e00000407c927b40 bsp=e00000407c920eb8 >> [] dump_stack+0x30/0x60 >> sp=e00000407c927d10 bsp=e00000407c920ea0 >> [] dynamic_irq_cleanup+0x160/0x1e0 >> sp=e00000407c927d10 bsp=e00000407c920e70 >> [] destroy_and_reserve_irq+0x30/0xc0 >> sp=e00000407c927d10 bsp=e00000407c920e40 >> [] iosapic_unregister_intr+0x5b0/0x5e0 >> sp=e00000407c927d10 bsp=e00000407c920dd8 >> [] acpi_unregister_gsi+0x30/0x60 >> sp=e00000407c927d10 bsp=e00000407c920db8 >> [] acpi_pci_irq_disable+0x140/0x160 >> sp=e00000407c927d10 bsp=e00000407c920d88 >> [] pcibios_disable_device+0xa0/0xc0 >> sp=e00000407c927d20 bsp=e00000407c920d68 >> [] pci_disable_device+0x130/0x160 >> sp=e00000407c927d20 bsp=e00000407c920d38 >> [] e100_shutdown+0x1c0/0x220 >> sp=e00000407c927d30 bsp=e00000407c920d08 >> [] pci_device_shutdown+0x80/0xc0 >> sp=e00000407c927d30 bsp=e00000407c920ce8 >> [] device_shutdown+0xf0/0x180 >> sp=e00000407c927d30 bsp=e00000407c920cc8 >> [] kernel_restart+0x60/0x120 >> sp=e00000407c927d30 bsp=e00000407c920ca8 >> [] sys_reboot+0x3b0/0x480 >> sp=e00000407c927d30 bsp=e00000407c920c30 >> [] ia64_ret_from_syscall+0x0/0x20 >> sp=e00000407c927e30 bsp=e00000407c920c30 >> [] ia64_ivt+0xffffffff00010620/0x400 >> sp=e00000407c928000 bsp=e00000407c920c30 >> Restarting system. >> >> I think the solution might be to free the IRQ before the >> pci_device_shutdown >> >> Signed-off-by: Ian Wienand >> >> --- >> >> e100.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/net/e100.c b/drivers/net/e100.c >> index 3dbaec6..8ae5ac3 100644 >> --- a/drivers/net/e100.c >> +++ b/drivers/net/e100.c >> @@ -2782,6 +2782,7 @@ static void e100_shutdown(struct pci_dev *pdev) >> pci_enable_wake(pdev, PCI_D3cold, 0); >> } >> >> + free_irq(pdev->irq, netdev); >> pci_disable_device(pdev); >> pci_set_power_state(pdev, PCI_D3hot); > > agreed, though I think free_irq() should come after pci_disable_device() > like it does in e100_suspend(). > > auke? I actually think that's unintentional (the free_irq being after pci_disable_device()) and possibly wrong. Looking at all our other drivers and various others I see a consistent pattern of enable_device->enable_irq -> free_irq->disable_device which makes much more sense to me since it's symmetric and you can't enable irq's on a disabled device anyway. So, I'd like to ACK this patch and I'll owe you a patch to fix the order up for the e100_suspend code to change the order - but obviously I'll give that one a test first. Acked-by: Auke Kok Thanks, Auke - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/