* [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY
@ 2007-03-25 13:45 Larry Finger
2007-03-25 14:13 ` Michael Buesch
2007-03-25 15:22 ` Pavel Roskin
0 siblings, 2 replies; 10+ messages in thread
From: Larry Finger @ 2007-03-25 13:45 UTC (permalink / raw)
To: John Linville; +Cc: Michael Buesch, Bcm43xx-dev, linux-wireless
From: David Woodhouse <dwmw2@infradead.org>
Recent changes in the specs that were introduced in commit
740ac4fb08866d702be90f167665d03759bd27d0 were incorrect and resulted in machine check
errors on the PPC architecture for G PHY's with a revision number equal to 1. The
two offending changes are reverted.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
John,
This fix should be applied to wireless-2.6 and set to 'upstream-fixes'. I hope is makes
it into 2.6.21 before the final release. The debugging of this issue was mostly done
by David with additional help by Pavil Roskin.
Larry
Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
+++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
@@ -762,7 +762,7 @@ static void bcm43xx_phy_initb5(struct bc
if (radio->version == 0x2050)
bcm43xx_phy_write(bcm, 0x0038, 0x0667);
- if (phy->type == BCM43xx_PHYTYPE_G) {
+ if (phy->connected) {
if (radio->version == 0x2050) {
bcm43xx_radio_write16(bcm, 0x007A,
bcm43xx_radio_read16(bcm, 0x007A)
@@ -1197,7 +1197,7 @@ static void bcm43xx_phy_initg(struct bcm
bcm43xx_phy_write(bcm, 0x0811, 0x0400);
bcm43xx_phy_write(bcm, 0x0015, 0x00C0);
}
- if (phy->connected) {
+ if (phy->rev >= 2 && phy->connected) {
tmp = bcm43xx_phy_read(bcm, 0x0400) & 0xFF;
if (tmp < 6) {
bcm43xx_phy_write(bcm, 0x04C2, 0x1816);
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY
2007-03-25 13:45 [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY Larry Finger
@ 2007-03-25 14:13 ` Michael Buesch
2007-03-25 16:53 ` David Woodhouse
2007-03-26 2:33 ` Larry Finger
2007-03-25 15:22 ` Pavel Roskin
1 sibling, 2 replies; 10+ messages in thread
From: Michael Buesch @ 2007-03-25 14:13 UTC (permalink / raw)
To: Larry Finger; +Cc: John Linville, Bcm43xx-dev, linux-wireless
On Sunday 25 March 2007 15:45, Larry Finger wrote:
> From: David Woodhouse <dwmw2@infradead.org>
>
> Recent changes in the specs that were introduced in commit
> 740ac4fb08866d702be90f167665d03759bd27d0 were incorrect and resulted in machine check
> errors on the PPC architecture for G PHY's with a revision number equal to 1. The
> two offending changes are reverted.
I'm not sure this patch is complete.
Joseph made changes to the specs that should fix the issue completely.
I didn't look at the changes, yet.
> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>
> John,
>
> This fix should be applied to wireless-2.6 and set to 'upstream-fixes'. I hope is makes
> it into 2.6.21 before the final release. The debugging of this issue was mostly done
> by David with additional help by Pavil Roskin.
>
> Larry
>
>
> Index: wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
> ===================================================================
> --- wireless-2.6.orig/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
> +++ wireless-2.6/drivers/net/wireless/bcm43xx/bcm43xx_phy.c
> @@ -762,7 +762,7 @@ static void bcm43xx_phy_initb5(struct bc
> if (radio->version == 0x2050)
> bcm43xx_phy_write(bcm, 0x0038, 0x0667);
>
> - if (phy->type == BCM43xx_PHYTYPE_G) {
> + if (phy->connected) {
> if (radio->version == 0x2050) {
> bcm43xx_radio_write16(bcm, 0x007A,
> bcm43xx_radio_read16(bcm, 0x007A)
> @@ -1197,7 +1197,7 @@ static void bcm43xx_phy_initg(struct bcm
> bcm43xx_phy_write(bcm, 0x0811, 0x0400);
> bcm43xx_phy_write(bcm, 0x0015, 0x00C0);
> }
> - if (phy->connected) {
> + if (phy->rev >= 2 && phy->connected) {
> tmp = bcm43xx_phy_read(bcm, 0x0400) & 0xFF;
> if (tmp < 6) {
> bcm43xx_phy_write(bcm, 0x04C2, 0x1816);
>
>
--
Greetings Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY
2007-03-25 14:13 ` Michael Buesch
@ 2007-03-25 16:53 ` David Woodhouse
2007-03-25 18:23 ` Larry Finger
2007-03-26 2:33 ` Larry Finger
1 sibling, 1 reply; 10+ messages in thread
From: David Woodhouse @ 2007-03-25 16:53 UTC (permalink / raw)
To: Michael Buesch; +Cc: Larry Finger, linux-wireless, Bcm43xx-dev
On Sun, 2007-03-25 at 16:13 +0200, Michael Buesch wrote:
> I'm not sure this patch is complete.
> Joseph made changes to the specs that should fix the issue completely.
> I didn't look at the changes, yet.
I don't see relevant changes in the v3 specs. I was working empirically,
reverting parts of the large patch which broke it.
--
dwmw2
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY
2007-03-25 16:53 ` David Woodhouse
@ 2007-03-25 18:23 ` Larry Finger
2007-03-25 18:29 ` David Woodhouse
0 siblings, 1 reply; 10+ messages in thread
From: Larry Finger @ 2007-03-25 18:23 UTC (permalink / raw)
To: David Woodhouse; +Cc: Michael Buesch, linux-wireless, Bcm43xx-dev
David Woodhouse wrote:
> On Sun, 2007-03-25 at 16:13 +0200, Michael Buesch wrote:
>> I'm not sure this patch is complete.
>> Joseph made changes to the specs that should fix the issue completely.
>> I didn't look at the changes, yet.
>
> I don't see relevant changes in the v3 specs. I was working empirically,
> reverting parts of the large patch which broke it.
There aren't any. Joseph is making the changes to the V4 specs, most of which are valid for V3 as
well. If I have any questions, I ask him privately.
Larry
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY
2007-03-25 18:23 ` Larry Finger
@ 2007-03-25 18:29 ` David Woodhouse
0 siblings, 0 replies; 10+ messages in thread
From: David Woodhouse @ 2007-03-25 18:29 UTC (permalink / raw)
To: Larry Finger; +Cc: Michael Buesch, linux-wireless, Bcm43xx-dev
On Sun, 2007-03-25 at 13:23 -0500, Larry Finger wrote:
> There aren't any. Joseph is making the changes to the V4 specs, most
> of which are valid for V3 as well. If I have any questions, I ask him
> privately.
There is an important difference between the v3 and v4 specs in this
respect. Looking at http://bcm-v4.sipsolutions.net/802.11/PHY/Init/G I
see in =C2=A77a that we're only supposed to set PHY register 0x4cc if t=
he A
PHY revision is 5. The v3 specs seem to suggest that we should do that
whenever the revision is below 6 and not equal to 3.=20
The A PHY revision in my case is 2, and it's the access to PHY register
0x4CC which triggers the machine check.
--=20
dwmw2
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY
2007-03-25 14:13 ` Michael Buesch
2007-03-25 16:53 ` David Woodhouse
@ 2007-03-26 2:33 ` Larry Finger
2007-03-26 12:13 ` David Woodhouse
1 sibling, 1 reply; 10+ messages in thread
From: Larry Finger @ 2007-03-26 2:33 UTC (permalink / raw)
To: Michael Buesch; +Cc: linux-wireless, Bcm43xx-dev
Michael Buesch wrote:
> On Sunday 25 March 2007 15:45, Larry Finger wrote:
>> From: David Woodhouse <dwmw2@infradead.org>
>>
>> Recent changes in the specs that were introduced in commit
>> 740ac4fb08866d702be90f167665d03759bd27d0 were incorrect and resulted in machine check
>> errors on the PPC architecture for G PHY's with a revision number equal to 1. The
>> two offending changes are reverted.
>
> I'm not sure this patch is complete.
> Joseph made changes to the specs that should fix the issue completely.
> I didn't look at the changes, yet.
Joseph has fixed the problem in initb5 (the first hunk), but the second hunk is still not in the new
specs. It was in the previous version in a slightly different form, but was found largely by trial
and error.
I would prefer that this patch go forward as is so that we don't end up with this bug in the
released version of 21.6.21. I am in the process of making the initg code match the current specs,
but that will certainly require more testing than I think we have time to complete before 2.6.21 is
released.
Larry
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY
2007-03-26 2:33 ` Larry Finger
@ 2007-03-26 12:13 ` David Woodhouse
2007-03-26 20:39 ` Michael Buesch
0 siblings, 1 reply; 10+ messages in thread
From: David Woodhouse @ 2007-03-26 12:13 UTC (permalink / raw)
To: Larry Finger; +Cc: Michael Buesch, linux-wireless, Bcm43xx-dev
On Sun, 2007-03-25 at 21:33 -0500, Larry Finger wrote:
> Joseph has fixed the problem in initb5 (the first hunk), but the second hunk is still not in the new
> specs. It was in the previous version in a slightly different form, but was found largely by trial
> and error.
>
> I would prefer that this patch go forward as is so that we don't end up with this bug in the
> released version of 21.6.21. I am in the process of making the initg code match the current specs,
> but that will certainly require more testing than I think we have time to complete before 2.6.21 is
> released.
FWIW I tried the mac80211 version (with v4 firmware) and saw very
similar machine checks, even after trying to apply the same 'fixes'.
--
dwmw2
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY
2007-03-26 12:13 ` David Woodhouse
@ 2007-03-26 20:39 ` Michael Buesch
0 siblings, 0 replies; 10+ messages in thread
From: Michael Buesch @ 2007-03-26 20:39 UTC (permalink / raw)
To: David Woodhouse; +Cc: Larry Finger, linux-wireless, Bcm43xx-dev
On Monday 26 March 2007 14:13, David Woodhouse wrote:
> On Sun, 2007-03-25 at 21:33 -0500, Larry Finger wrote:
> > Joseph has fixed the problem in initb5 (the first hunk), but the second hunk is still not in the new
> > specs. It was in the previous version in a slightly different form, but was found largely by trial
> > and error.
> >
> > I would prefer that this patch go forward as is so that we don't end up with this bug in the
> > released version of 21.6.21. I am in the process of making the initg code match the current specs,
> > but that will certainly require more testing than I think we have time to complete before 2.6.21 is
> > released.
>
> FWIW I tried the mac80211 version (with v4 firmware) and saw very
> similar machine checks, even after trying to apply the same 'fixes'.
logs...
--
Greetings Michael.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY
2007-03-25 13:45 [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY Larry Finger
2007-03-25 14:13 ` Michael Buesch
@ 2007-03-25 15:22 ` Pavel Roskin
2007-03-25 16:20 ` Larry Finger
1 sibling, 1 reply; 10+ messages in thread
From: Pavel Roskin @ 2007-03-25 15:22 UTC (permalink / raw)
To: Larry Finger; +Cc: John Linville, Michael Buesch, Bcm43xx-dev, linux-wireless
Hi, Larry!
That was quick! I confirm that the patch fixes the machine check for me. The
driver is working, even with WEP. To prove my point, I'll send this message
over the fixed driver, so if you can read it, you have made an excellent job :)
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY
2007-03-25 15:22 ` Pavel Roskin
@ 2007-03-25 16:20 ` Larry Finger
0 siblings, 0 replies; 10+ messages in thread
From: Larry Finger @ 2007-03-25 16:20 UTC (permalink / raw)
To: Pavel Roskin; +Cc: linux-wireless, Michael Buesch, Bcm43xx-dev
Pavel Roskin wrote:
> Hi, Larry!
>
> That was quick! I confirm that the patch fixes the machine check for me. The
> driver is working, even with WEP. To prove my point, I'll send this message
> over the fixed driver, so if you can read it, you have made an excellent job :)
Thanks, but David Woodhouse deserves the credit.
In future cases, I'll send any changes that modify phy->rev == 1 behavior past you and David before
submitting. Too bad that one doesn't get the machine check on x86 architectures as I also have a rev
1 cards.
Larry
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-03-26 20:39 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-25 13:45 [PATCH] bcm43xx: Fix machine check on PPC for version 1 PHY Larry Finger
2007-03-25 14:13 ` Michael Buesch
2007-03-25 16:53 ` David Woodhouse
2007-03-25 18:23 ` Larry Finger
2007-03-25 18:29 ` David Woodhouse
2007-03-26 2:33 ` Larry Finger
2007-03-26 12:13 ` David Woodhouse
2007-03-26 20:39 ` Michael Buesch
2007-03-25 15:22 ` Pavel Roskin
2007-03-25 16:20 ` Larry Finger
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).