From: Zhu Yi Date: Mon, 21 Aug 2006 03:38:39 +0000 (+0800) Subject: [PATCH] ipw2200: Add pci .shutdown handler X-Git-Tag: v2.6.19-rc1~1263^2~60^2~6 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c8c22c942e46ca0e06fc7c72845314da1ad41702;p=karo-tx-linux.git [PATCH] ipw2200: Add pci .shutdown handler 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index e18fbca83cef..15258301b643 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -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)