linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ath5k: reset for 5424-based card
@ 2008-01-31 15:59 Bob Copeland
  2008-01-31 16:56 ` Nick Kossifidis
  0 siblings, 1 reply; 16+ messages in thread
From: Bob Copeland @ 2008-01-31 15:59 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

Hi all,

I have the following device (0x168c:001c) which comes with certain MacBooks:

02:00.0 Ethernet controller: Atheros Communications, Inc. AR5006EG 802.11 b/g
Wireless PCI Express Adapter (rev 01)

The current driver from merged-upstream of a few days ago doesn't seem to 
work for this card.  In ath5k_hw_nic_wakeup, it dies after the nic reset
and any MMIO accesses from then on return -1 (needs a hard reboot to fix).

I dumped a trace of the working madwifi driver using mmio-trace and saw that
it only sets the bottom two bits when doing AR5K_RESET_CTL.  So, the patch 
below indeed makes probe work for the card.  

It isn't perfect after that; it can associate with an AP but appears to reset
constantly so it's not really usable.

I'd love to get this working generally; if needed I can try out patches,
supply traces, or, given enough direction, contribute some code...

diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index 3a4bf40..3fa0621 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -359,7 +359,7 @@ static int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial)
 
 	/* ...reset chipset and PCI device */
 	if (ah->ah_single_chip == false && ath5k_hw_nic_reset(ah,
-				AR5K_RESET_CTL_CHIP | AR5K_RESET_CTL_PCI)) {
+				AR5K_RESET_CTL_BASEBAND | AR5K_RESET_CTL_PCU)) {
 		ATH5K_ERR(ah->ah_sc, "failed to reset the MAC Chip + PCI\n");
 		return -EIO;
 	}

-- 
Bob Copeland %% www.bobcopeland.com 


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-02-19  0:00 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-31 15:59 ath5k: reset for 5424-based card Bob Copeland
2008-01-31 16:56 ` Nick Kossifidis
2008-02-01  4:03   ` Bob Copeland
2008-02-01 12:09     ` Nick Kossifidis
2008-02-01 22:53       ` Bob Copeland
2008-02-02  1:48         ` Nick Kossifidis
2008-02-03  1:45           ` Bob Copeland
2008-02-05  9:13             ` Nick Kossifidis
2008-02-10 16:21               ` Bob Copeland
2008-02-10 19:05                 ` Nick Kossifidis
2008-02-11 15:00                   ` Bob Copeland
2008-02-12  7:18                     ` Nick Kossifidis
2008-02-12  7:48                       ` Holger Schurig
2008-02-12  7:55                         ` Nick Kossifidis
2008-02-14  4:20                       ` Bob Copeland
2008-02-18 23:59                       ` Bob Copeland

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).