From: Larry Finger <larry.finger@lwfinger.net>
To: Michael Buesch <mb@bu3sch.de>
Cc: bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] b43legacy: Fix machine check errors for PPC architecture with BCM4306/2
Date: Sat, 15 Sep 2007 18:26:29 -0500 [thread overview]
Message-ID: <46EC6A25.2010204@lwfinger.net> (raw)
In-Reply-To: <200709152358.08887.mb@bu3sch.de>
Michael Buesch wrote:
>
> There is no such thing as "connected".
> The bit is called "gmode". Why do you change it back to the wrong name?
> The V3 specs are simply _wrong_. It has nothing to do with the backplane
> or anything else like that. The bit just selects between the A-PHY and
> the BG-PHY. Of course, if there is no A-PHY it will obviously machine-check
> on access, if it's selected.
>
> V3 specs assume that the meaning is "connected", because it was misinterpreted
> to be a "PHY connect" flag. But it really is a "PHY select" flag, to select
> between two different PHYs. If it's enabled, the G-PHY will be selected (and
> the A-PHY otherwise).
>
> Btw, while we are at it: The V3 specs are wrong regarding the gmode (or connected)
> bit in other areas as well, because there was even more confusion with
> other PHY flags. The PHY specification is pretty broken in the v3 specs.
The critical part of the legacy code in this regard is from phy_calibrate():
if (phy->type == B43legacy_PHYTYPE_G && phy->rev == 1) {
b43legacy_wireless_core_reset(dev, 0);
b43legacy_phy_initg(dev);
b43legacy_wireless_core_reset(dev, B43legacy_TMSLOW_GMODE);
}
If phy_initg is going to work correctly, then gmode has to follow the state of the MACCTL_GMODE bit
in MMIO_MACCTL. Apparently GPHYs with rev > 1 do not care about this bit, but the BCM4306/2 does.
The changes can be accomplished by the following patch:
Index: wireless-dev/drivers/net/wireless/b43legacy/main.c
===================================================================
--- wireless-dev.orig/drivers/net/wireless/b43legacy/main.c
+++ wireless-dev/drivers/net/wireless/b43legacy/main.c
@@ -738,8 +738,11 @@ void b43legacy_wireless_core_reset(struc
macctl = b43legacy_read32(dev, B43legacy_MMIO_MACCTL);
macctl &= ~B43legacy_MACCTL_GMODE;
- if (flags & B43legacy_TMSLOW_GMODE)
+ if (flags & B43legacy_TMSLOW_GMODE) {
macctl |= B43legacy_MACCTL_GMODE;
+ dev->phy.gmode = 1;
+ } else
+ dev->phy.gmode = 0;
macctl |= B43legacy_MACCTL_IHR_ENABLED;
b43legacy_write32(dev, B43legacy_MMIO_MACCTL, macctl);
}
The above patch and a revised comment for the gmode variable will be the contents of V3 of my patch.
I hope that you find it acceptable. In my position as maintainer, I can push stuff through, but I
prefer that you are in agreement.
Larry
next prev parent reply other threads:[~2007-09-15 23:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-15 17:39 [PATCH] b43legacy: Fix machine check errors for PPC architecture with BCM4306/2 Larry Finger
2007-09-15 17:48 ` Michael Buesch
2007-09-15 18:07 ` Larry Finger
2007-09-15 18:10 ` Michael Buesch
2007-09-15 19:12 ` Larry Finger
2007-09-15 19:47 ` Michael Buesch
2007-09-15 21:01 ` Larry Finger
2007-09-15 21:58 ` Michael Buesch
2007-09-15 23:26 ` Larry Finger [this message]
2007-09-15 23:58 ` Michael Buesch
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=46EC6A25.2010204@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=linux-wireless@vger.kernel.org \
--cc=mb@bu3sch.de \
/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).