From patchwork Thu Aug 13 04:04:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith X-Patchwork-Id: 40974 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 n7D44Isb018106 for ; Thu, 13 Aug 2009 04:04:19 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751582AbZHMEEO (ORCPT ); Thu, 13 Aug 2009 00:04:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751271AbZHMEEO (ORCPT ); Thu, 13 Aug 2009 00:04:14 -0400 Received: from mail.atheros.com ([12.36.123.2]:52948 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059AbZHMEEN (ORCPT ); Thu, 13 Aug 2009 00:04:13 -0400 Received: from mail.atheros.com ([10.10.20.105]) by sidewinder.atheros.com for ; Wed, 12 Aug 2009 21:04:15 -0700 Received: from CHEXHC-01.global.atheros.com (10.12.0.100) by SC1EXHC-01.global.atheros.com (10.10.20.104) with Microsoft SMTP Server (TLS) id 8.0.751.0; Wed, 12 Aug 2009 21:04:14 -0700 Received: from neuromancer (10.12.4.103) by CHEXHC-01.global.atheros.com (10.12.0.100) with Microsoft SMTP Server (TLS) id 8.0.751.0; Thu, 13 Aug 2009 09:34:11 +0530 From: Sujith MIME-Version: 1.0 Message-ID: <19075.37075.80646.894418@gargle.gargle.HOWL> Date: Thu, 13 Aug 2009 09:34:35 +0530 To: X-Mailer: VM 8.0.12 under 23.1.1 (x86_64-unknown-linux-gnu) CC: Subject: [PATCH 3/4] ath9k: Fix bug in PCI resume Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch fixes a bug where the device was enabled before restoring the PCI state. Signed-off-by: Sujith --- drivers/net/wireless/ath/ath9k/pci.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 3546504..616bdff 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c @@ -253,10 +253,12 @@ static int ath_pci_resume(struct pci_dev *pdev) u32 val; int err; + pci_restore_state(pdev); + err = pci_enable_device(pdev); if (err) return err; - pci_restore_state(pdev); + /* * Suspend/Resume resets the PCI configuration space, so we have to * re-disable the RETRY_TIMEOUT register (0x41) to keep