From patchwork Sun Jan 10 10:52:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Buesch X-Patchwork-Id: 71995 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0AAqOet003339 for ; Sun, 10 Jan 2010 10:53:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753418Ab0AJKxF (ORCPT ); Sun, 10 Jan 2010 05:53:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753342Ab0AJKxE (ORCPT ); Sun, 10 Jan 2010 05:53:04 -0500 Received: from bu3sch.de ([62.75.166.246]:34889 "EHLO vs166246.vserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753254Ab0AJKxC (ORCPT ); Sun, 10 Jan 2010 05:53:02 -0500 Received: by vs166246.vserver.de with esmtpa (Exim 4.69) id 1NTvPl-00042B-2R; Sun, 10 Jan 2010 10:52:57 +0000 From: Michael Buesch To: Bob Copeland Subject: Ath5k on 2.6.32 suddenly fails Date: Sun, 10 Jan 2010 11:52:33 +0100 User-Agent: KMail/1.9.9 Cc: Jiri Slaby , Nick Kossifidis , "Luis R. Rodriguez" , "linux-wireless" MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201001101152.34316.mb@bu3sch.de> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Index: linux-2.6.32/drivers/net/wireless/ath/ath5k/reset.c =================================================================== --- linux-2.6.32.orig/drivers/net/wireless/ath/ath5k/reset.c 2010-01-10 11:16:00.000000000 +0100 +++ linux-2.6.32/drivers/net/wireless/ath/ath5k/reset.c 2010-01-10 11:27:03.000000000 +0100 @@ -223,6 +223,7 @@ int ath5k_hw_set_power(struct ath5k_hw *ah, enum ath5k_power_mode mode, bool set_chip, u16 sleep_duration) { + struct pci_dev *pdev = ah->ah_sc->pdev; unsigned int i; u32 staid, data; @@ -273,7 +274,7 @@ AR5K_SLEEP_CTL); udelay(15); - for (i = 200; i > 0; i--) { + for (i = 20000; i > 0; i--) { /* Check if the chip did wake up */ if ((ath5k_hw_reg_read(ah, AR5K_PCICFG) & AR5K_PCICFG_SPWR_DN) == 0) @@ -286,8 +287,13 @@ } /* Fail if the chip didn't wake up */ - if (i == 0) + if (i == 0) { + u32 val; + int res = pci_read_config_dword(pdev, PCI_STATUS, &val); + printk("%d, 0x%08X\n", res, val); return -EIO; + } + printk("Wakeup %d\n", i); break;