]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ipw2200: Add pci .shutdown handler
authorZhu Yi <yi.zhu@intel.com>
Mon, 21 Aug 2006 03:38:39 +0000 (11:38 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 29 Aug 2006 21:06:33 +0000 (17:06 -0400)
If we don't disable the card in the pci .shutdown method, there might be
pending interrupts still in the interrupt line after a reboot on some
platform. This patch fixes the problem by disable the hardware in the pci
.shutdown method.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ipw2200.c

index e18fbca83cef84daabeebb34a6fc706048d24a69..15258301b643a88bf1017733e64343af3a8b5d74 100644 (file)
@@ -11735,6 +11735,16 @@ static int ipw_pci_resume(struct pci_dev *pdev)
 }
 #endif
 
+static void ipw_pci_shutdown(struct pci_dev *pdev)
+{
+       struct ipw_priv *priv = pci_get_drvdata(pdev);
+
+       /* Take down the device; powers it off, etc. */
+       ipw_down(priv);
+
+       pci_disable_device(pdev);
+}
+
 /* driver initialization stuff */
 static struct pci_driver ipw_driver = {
        .name = DRV_NAME,
@@ -11745,6 +11755,7 @@ static struct pci_driver ipw_driver = {
        .suspend = ipw_pci_suspend,
        .resume = ipw_pci_resume,
 #endif
+       .shutdown = ipw_pci_shutdown,
 };
 
 static int __init ipw_init(void)