linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Copeland <me@bobcopeland.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org
Subject: ath5k: reset for 5424-based card
Date: Thu, 31 Jan 2008 10:59:01 -0500	[thread overview]
Message-ID: <20080131155901.GA7997@hash.localnet> (raw)

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 


             reply	other threads:[~2008-01-31 16:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31 15:59 Bob Copeland [this message]
2008-01-31 16:56 ` ath5k: reset for 5424-based card 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

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=20080131155901.GA7997@hash.localnet \
    --to=me@bobcopeland.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).