From patchwork Wed Dec 2 06:24:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Yi X-Patchwork-Id: 64156 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB26PfVA003159 for ; Wed, 2 Dec 2009 06:25:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751617AbZLBGZX (ORCPT ); Wed, 2 Dec 2009 01:25:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751471AbZLBGZX (ORCPT ); Wed, 2 Dec 2009 01:25:23 -0500 Received: from mga09.intel.com ([134.134.136.24]:60487 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751323AbZLBGZU (ORCPT ); Wed, 2 Dec 2009 01:25:20 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 01 Dec 2009 22:24:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,327,1257148800"; d="scan'208";a="472110728" Received: from debian.sh.intel.com (HELO localhost.localdomain) ([10.239.13.180]) by orsmga002.jf.intel.com with ESMTP; 01 Dec 2009 22:25:24 -0800 From: Zhu Yi To: linville@tuxdriver.com Cc: linux-wireless@vger.kernel.org, stable@kernel.org, Zhu Yi Subject: [PATCH] ipw2100: fix rebooting hang with driver loaded Date: Wed, 2 Dec 2009 14:24:37 +0800 Message-Id: <1259735077-9668-1-git-send-email-yi.zhu@intel.com> X-Mailer: git-send-email 1.6.3.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index 6c836c8..17a9cb3 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c @@ -6573,6 +6573,16 @@ static int ipw2100_resume(struct pci_dev *pci_dev) } #endif +static void ipw2100_shutdown(struct pci_dev *pci_dev) +{ + struct ipw2100_priv *priv = pci_get_drvdata(pci_dev); + + /* Take down the device; powers it off, etc. */ + ipw2100_down(priv); + + pci_disable_device(pci_dev); +} + #define IPW2100_DEV_ID(x) { PCI_VENDOR_ID_INTEL, 0x1043, 0x8086, x } static struct pci_device_id ipw2100_pci_id_table[] __devinitdata = { @@ -6636,6 +6646,7 @@ static struct pci_driver ipw2100_pci_driver = { .suspend = ipw2100_suspend, .resume = ipw2100_resume, #endif + .shutdown = ipw2100_shutdown, }; /**