LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Tino Keitel <tino.keitel@gmx.de>
Cc: <linux-kernel@vger.kernel.org>,
ath5k-devel@lists.ath5k.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-wireless@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>
Subject: [RFT 1/1] single_chip test
Date: Wed, 6 Feb 2008 11:42:40 +0100 [thread overview]
Message-ID: <1202294560-7313-1-git-send-email-jirislaby@gmail.com> (raw)
In-Reply-To: <20080206014131.9d489a34.akpm@linux-foundation.org>
On 02/05/2008 11:57 PM, Tino Keitel wrote:
> Hi,
>
> I tried the current git (9ef9dc69d4167276c04590d67ee55de8380bc1ad) and
> got the following error message from ath5k:
>
> ath5k_pci 0000:02:00.0: registered as 'phy0'
> ath5k phy0: failed to resume the MAC Chip
> ath5k_pci: probe of 0000:02:00.0 failed with error -5
We failed to resume after a hardware reset here for a whole second. Is there any
version of ath5k which worked for you (is this a regression)?
> Here is the lspci -vnn output:
>
> 02:00.0 Ethernet controller [0200]: Atheros Communications, Inc.
> AR5006EG 802.11 b/g Wireless PCI Express Adapter [168c:001c] (rev 01)
> Subsystem: Apple Computer Inc. Unknown device [106b:0086]
> Flags: fast devsel, IRQ 17
> Memory at 90100000 (64-bit, non-prefetchable) [disabled]
> [size=64K]
> Capabilities: [40] Power Management version 2
> Capabilities: [50] Message Signalled Interrupts: Mask- 64bit-
> Queue=0/0 Enable-
> Capabilities: [60] Express Legacy Endpoint, MSI 00
> Capabilities: [90] MSI-X: Enable- Mask- TabSize=1
> Capabilities: [100] Advanced Error Reporting <?>
> Capabilities: [140] Virtual Channel <?>
> Kernel modules: ath5k
>
> The same device works with madwifi:
>
> ath_rate_sample: 1.2 (svn r3339)
> MadWifi: ath_attach: Switching per-packet transmit power control off
> wifi0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
> wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
> wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps
> 24Mbps 36Mbps 48Mbps 54Mbps
> wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
> wifi0: H/W encryption support: WEP AES AES_CCM TKIP
> wifi0: ath_announce: Use hw queue 1 for WME_AC_BE traffic
> wifi0: ath_announce: Use hw queue 0 for WME_AC_BK traffic
> wifi0: ath_announce: Use hw queue 2 for WME_AC_VI traffic
> wifi0: ath_announce: Use hw queue 3 for WME_AC_VO traffic
> wifi0: ath_announce: Use hw queue 8 for CAB traffic
> wifi0: ath_announce: Use hw queue 9 for beacons
> ath_pci: wifi0: Atheros 5424/2424: mem=0x90100000, irq=17
>
> I can also set the interface up and use iwlist ath0 scan.
Hmm, I guess madwif-old-openhal doesn't work either.
I suspect ath5k_hw_nic_wakeup being called before setting ah_single_chip in
ath5k_hw_attach. Could you test the attached patch?
--
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
drivers/net/wireless/ath5k/hw.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index 3a4bf40..b56d239 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -181,11 +181,6 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
else if (ah->ah_version <= AR5K_AR5211)
ah->ah_proc_rx_desc = ath5k_hw_proc_old_rx_status;
- /* Bring device out of sleep and reset it's units */
- ret = ath5k_hw_nic_wakeup(ah, AR5K_INIT_MODE, true);
- if (ret)
- goto err_free;
-
/* Get MAC, PHY and RADIO revisions */
srev = ath5k_hw_reg_read(ah, AR5K_SREV);
ah->ah_mac_srev = srev;
@@ -210,12 +205,16 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
}
/* Identify single chip solutions */
- if((srev <= AR5K_SREV_VER_AR5414) &&
- (srev >= AR5K_SREV_VER_AR2424)) {
- ah->ah_single_chip = true;
- } else {
- ah->ah_single_chip = false;
- }
+ ah->ah_single_chip = !!(srev >= AR5K_SREV_VER_AR2424 &&
+ srev <= AR5K_SREV_VER_AR5414);
+
+ printk(KERN_INFO "SINGLE: %d, srev: %x, phy:\n",
+ ah->ah_single_chip, srev, ah->ah_phy_revision);
+
+ /* Bring device out of sleep and reset it's units */
+ ret = ath5k_hw_nic_wakeup(ah, AR5K_INIT_MODE, true);
+ if (ret)
+ goto err_free;
/* Single chip radio */
if (ah->ah_radio_2ghz_revision == ah->ah_radio_5ghz_revision)
--
1.5.3.8
next prev parent reply other threads:[~2008-02-06 10:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 22:57 ath5k failure with 2.6.24-git14 Tino Keitel
2008-02-06 9:41 ` Andrew Morton
2008-02-06 10:42 ` Jiri Slaby [this message]
2008-02-06 10:48 ` [RFT 1/1] single_chip test Andreas Schwab
2008-02-06 10:53 ` Jiri Slaby
2008-02-06 15:00 ` Joseph Fannin
2008-02-06 15:46 ` Bob Copeland
2008-02-07 21:25 ` Tino Keitel
2008-02-07 21:51 ` Jiri Slaby
2008-02-08 7:28 ` Tino Keitel
2008-02-06 15:37 ` ath5k failure with 2.6.24-git14 Bob Copeland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1202294560-7313-1-git-send-email-jirislaby@gmail.com \
--to=jirislaby@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=tino.keitel@gmx.de \
--subject='Re: [RFT 1/1] single_chip test' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).