2010-03-29 19:20:59

by Larry Finger

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

Ren?,

When you have a wireless problem, please post it to
[email protected]. The Linux Kernel Mailing List may or may not be
appropriate.

To help in diagnosing your problem, please apply this patch and post the output
line that it produces. On my system, it shows

ssb: chip_id 0x4312, status 0x10

Please also post the output of 'lspci -nnv | grep 14e4'.

Index: wireless-testing/drivers/ssb/sprom.c
===================================================================
--- wireless-testing.orig/drivers/ssb/sprom.c
+++ wireless-testing/drivers/ssb/sprom.c
@@ -182,6 +182,8 @@ bool ssb_is_sprom_available(struct ssb_b
if (bus->chipco.dev->id.revision < 11)
return true;

+ printk(KERN_INFO "ssb: chip_id 0x%x, status 0x%x\n", bus->chip_id,
+ bus->chipco.status);
switch (bus->chip_id) {
case 0x4312:
return SSB_CHIPCO_CHST_4312_SPROM_PRESENT(bus->chipco.status);


Larry




2010-03-29 20:56:21

by John W. Linville

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On Mon, Mar 29, 2010 at 03:14:07PM -0500, Larry Finger wrote:

> Could you please apply my little test patch and send me the contents of the
> chipcommon status register in your netbook?

Mine looks like yours, "chip_id 0x4312, status 0x12"...

John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2010-03-29 23:01:31

by Larry Finger

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

René and John,

What output does this patch yield?


Index: wireless-testing/drivers/ssb/sprom.c
===================================================================
--- wireless-testing.orig/drivers/ssb/sprom.c
+++ wireless-testing/drivers/ssb/sprom.c
@@ -182,6 +182,11 @@ bool ssb_is_sprom_available(struct ssb_b
if (bus->chipco.dev->id.revision < 11)
return true;

+ printk(KERN_INFO "ssb: chip_id 0x%x, status 0x%x\n", bus->chip_id,
+ bus->chipco.status);
+ printk(KERN_INFO "ssb: cc rev 0x%x, cc capab 0x%x\n",
+ bus->chipco.dev->id.revision,
+ bus->chipco.capabilities);
switch (bus->chip_id) {
case 0x4312:
return SSB_CHIPCO_CHST_4312_SPROM_PRESENT(bus->chipco.status);



2010-03-29 23:21:27

by René Bolldorf

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On 03/30/10 01:01, Larry Finger wrote:
> René and John,
>
> What output does this patch yield?
>
>
> Index: wireless-testing/drivers/ssb/sprom.c
> ===================================================================
> --- wireless-testing.orig/drivers/ssb/sprom.c
> +++ wireless-testing/drivers/ssb/sprom.c
> @@ -182,6 +182,11 @@ bool ssb_is_sprom_available(struct ssb_b
> if (bus->chipco.dev->id.revision< 11)
> return true;
>
> + printk(KERN_INFO "ssb: chip_id 0x%x, status 0x%x\n", bus->chip_id,
> + bus->chipco.status);
> + printk(KERN_INFO "ssb: cc rev 0x%x, cc capab 0x%x\n",
> + bus->chipco.dev->id.revision,
> + bus->chipco.capabilities);
> switch (bus->chip_id) {
> case 0x4312:
> return SSB_CHIPCO_CHST_4312_SPROM_PRESENT(bus->chipco.status);
>
>

ssb: chip_id 0x4312, status 0x12
ssb: cc rev 0x16, cc capab 0x18600000

And my system completely hangs after this... :(

2010-03-29 23:43:30

by Larry Finger

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On 03/29/2010 06:21 PM, René Bolldorf wrote:
>
> ssb: chip_id 0x4312, status 0x12
> ssb: cc rev 0x16, cc capab 0x18600000
>
> And my system completely hangs after this... :(

Nothing in that patch should make it hang. Has that happened before?

Larry


2010-03-29 20:14:12

by Larry Finger

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On 03/29/2010 02:47 PM, John W. Linville wrote:
> On Mon, Mar 29, 2010 at 09:35:44PM +0200, René Bolldorf wrote:
>> On 03/29/10 21:20, Larry Finger wrote:
>>> Ren�,
>>>
>>> When you have a wireless problem, please post it to
>>> [email protected]. The Linux Kernel Mailing List may or may not be
>>> appropriate.
>>>
>>> To help in diagnosing your problem, please apply this patch and post the output
>>> line that it produces. On my system, it shows
>>>
>>> ssb: chip_id 0x4312, status 0x10
>>>
>> and on my: ssb: chip_id 0x4312, status 0x12
>>> Please also post the output of 'lspci -nnv | grep 14e4'.
>> Yep:
>> 01:00.0 Network controller [0280]: Broadcom Corporation BCM4312
>> 802.11b/g [14e4:4315] (rev 01)
>
> OK, I'm new to the thread -- what exactly is the issue? Was your
> device working previously?

Yes. He originally posted only to LKML
(http://marc.info/?l=linux-kernel&m=126988911025280&w=2), where he posted

=========================
since commit fcb54b0bf7d3fe730c2b72e224bc616e358f24cb, my b43 (4312)
device doesn't work.

But the device have a sprom. Maybe the chip-status register check is wrong?

+/** Macros to determine SPROM presence based on Chip-Status register. */
+#define SSB_CHIPCO_CHST_4312_SPROM_PRESENT(status) \
+ ((status & SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL) != \
+ SSB_CHIPCO_CHST_4325_OTP_SEL)
=======================================

I just happened to do one of my infrequent scans of LKML, and happened to see
it. In a follow-up, he proposes a patch that would fail on your system and leave
it locked up..

I rechecked the Broadcom driver, and stick by my specs that you used for your patch.

Could you please apply my little test patch and send me the contents of the
chipcommon status register in your netbook?

Thanks,

Larry

2010-03-29 20:19:56

by René Bolldorf

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On 03/29/10 21:47, John W. Linville wrote:
> On Mon, Mar 29, 2010 at 09:35:44PM +0200, René Bolldorf wrote:
>> On 03/29/10 21:20, Larry Finger wrote:
>>> Ren�,
>>>
>>> When you have a wireless problem, please post it to
>>> [email protected]. The Linux Kernel Mailing List may or may not be
>>> appropriate.
>>>
>>> To help in diagnosing your problem, please apply this patch and post the output
>>> line that it produces. On my system, it shows
>>>
>>> ssb: chip_id 0x4312, status 0x10
>>>
>> and on my: ssb: chip_id 0x4312, status 0x12
>>> Please also post the output of 'lspci -nnv | grep 14e4'.
>> Yep:
>> 01:00.0 Network controller [0280]: Broadcom Corporation BCM4312
>> 802.11b/g [14e4:4315] (rev 01)
>
> OK, I'm new to the thread -- what exactly is the issue? Was your
> device working previously?
>
> John

The problem is since commit fcb54b0bf7d3fe730c2b72e224bc616e358f24cb, my
b43 (4312)
device doesn't work because i get the message "No SPROM available" and
then the device get's disabled.

My colleague have the same problem. I have made a patch for that but it
seems thats not work for all 4312 devices. I and my colleage have the
same netbook for testing purposes so the patch work while we have the
same chip status.

The problem is I think: Larry had written his output is ssb: chip_id
0x4312, status 0x10, he have a different chip status.
What to do? Any ideas?

=============

diff --git a/include/linux/ssb/ssb_driver_chipcommon.h
b/include/linux/ssb/ssb_driver_chipcommon.h
index 2cdf249..1e0b9cd 100644
--- a/include/linux/ssb/ssb_driver_chipcommon.h
+++ b/include/linux/ssb/ssb_driver_chipcommon.h
@@ -386,6 +386,7 @@


/** Chip specific Chip-Status register contents. */
+#define SSB_CHIPCO_CHST_4312_SPROM_EXISTS 0x00000025
#define SSB_CHIPCO_CHST_4322_SPROM_EXISTS 0x00000040 /* SPROM present */
#define SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL 0x00000003
#define SSB_CHIPCO_CHST_4325_DEFCIS_SEL 0 /* OTP is powered up, use
def. CIS, no SPROM */
@@ -403,7 +404,7 @@
/** Macros to determine SPROM presence based on Chip-Status register. */
#define SSB_CHIPCO_CHST_4312_SPROM_PRESENT(status) \
((status & SSB_CHIPCO_CHST_4325_SPROM_OTP_SEL) != \
- SSB_CHIPCO_CHST_4325_OTP_SEL)
+ SSB_CHIPCO_CHST_4312_SPROM_EXISTS)
#define SSB_CHIPCO_CHST_4322_SPROM_PRESENT(status) \
(status & SSB_CHIPCO_CHST_4322_SPROM_EXISTS)
#define SSB_CHIPCO_CHST_4325_SPROM_PRESENT(status) \
so my won't work then.

2010-03-29 21:53:22

by René Bolldorf

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On 03/29/10 23:28, Larry Finger wrote:
> On 03/29/2010 03:55 PM, John W. Linville wrote:
>> On Mon, Mar 29, 2010 at 04:48:22PM -0400, John W. Linville wrote:
>>> On Mon, Mar 29, 2010 at 03:14:07PM -0500, Larry Finger wrote:
>>>
>>>> Could you please apply my little test patch and send me the contents of the
>>>> chipcommon status register in your netbook?
>>>
>>> Mine looks like yours, "chip_id 0x4312, status 0x12"...
>>
>> I guess I misread the earlier messages -- mine looks like Ren�'s, not yours.
>
> Bummer. To answer your previous message, the Broadcom driver is very clear that
> 0x2 set in the chipcommon status for a BCM4312 means no SPROM; however, Ren�'s
> device contradicts that conclusion. There must be some other test that I have
> missed.
>
> Ren�: For your information, this test was added because attempting to read the
> SPROM in John's computer locks the processor - he has to power off. I did
> reverse engineering on the Broadcom driver and found their workaround when no
> SPROM is present. The patch in question matches their code, and allows John's
> machine to continue. There is a second, pending patch that works with some udev
> rules to create a virtual SPROM image and assign a unique MAC address. With this
> patch applied, your machine would still work. The only change is that you would
> be assigned a random MAC address.
>
> I will likely need some additional test prints to see if I can find a test that
> recognizes that Ren�'s machine has an SPROMs and that John's does not.
>
> Larry

Ok, if I can help you, write me. I will help you testing patches and
give you certain information if you need.

2010-03-29 20:56:21

by John W. Linville

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On Mon, Mar 29, 2010 at 04:48:22PM -0400, John W. Linville wrote:
> On Mon, Mar 29, 2010 at 03:14:07PM -0500, Larry Finger wrote:
>
> > Could you please apply my little test patch and send me the contents of the
> > chipcommon status register in your netbook?
>
> Mine looks like yours, "chip_id 0x4312, status 0x12"...

I guess I misread the earlier messages -- mine looks like Ren?'s, not yours.

John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2010-03-29 20:15:08

by John W. Linville

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On Mon, Mar 29, 2010 at 03:47:46PM -0400, John W. Linville wrote:
> On Mon, Mar 29, 2010 at 09:35:44PM +0200, René Bolldorf wrote:
> > On 03/29/10 21:20, Larry Finger wrote:
> >> Ren�,
> >>
> >> When you have a wireless problem, please post it to
> >> [email protected]. The Linux Kernel Mailing List may or may not be
> >> appropriate.
> >>
> >> To help in diagnosing your problem, please apply this patch and post the output
> >> line that it produces. On my system, it shows
> >>
> >> ssb: chip_id 0x4312, status 0x10
> >>
> > and on my: ssb: chip_id 0x4312, status 0x12
> >> Please also post the output of 'lspci -nnv | grep 14e4'.
> > Yep:
> > 01:00.0 Network controller [0280]: Broadcom Corporation BCM4312
> > 802.11b/g [14e4:4315] (rev 01)
>
> OK, I'm new to the thread -- what exactly is the issue? Was your
> device working previously?

Sorry, didn't see the original post on LKML.

The patch you posted looks to me like it is just as likely to break
someone else as it is to fix things for you. :-(

Larry, can you provide some guidance based on the other info René
has provided?

John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2010-03-29 21:28:50

by Larry Finger

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On 03/29/2010 03:55 PM, John W. Linville wrote:
> On Mon, Mar 29, 2010 at 04:48:22PM -0400, John W. Linville wrote:
>> On Mon, Mar 29, 2010 at 03:14:07PM -0500, Larry Finger wrote:
>>
>>> Could you please apply my little test patch and send me the contents of the
>>> chipcommon status register in your netbook?
>>
>> Mine looks like yours, "chip_id 0x4312, status 0x12"...
>
> I guess I misread the earlier messages -- mine looks like Ren?'s, not yours.

Bummer. To answer your previous message, the Broadcom driver is very clear that
0x2 set in the chipcommon status for a BCM4312 means no SPROM; however, Ren?'s
device contradicts that conclusion. There must be some other test that I have
missed.

Ren?: For your information, this test was added because attempting to read the
SPROM in John's computer locks the processor - he has to power off. I did
reverse engineering on the Broadcom driver and found their workaround when no
SPROM is present. The patch in question matches their code, and allows John's
machine to continue. There is a second, pending patch that works with some udev
rules to create a virtual SPROM image and assign a unique MAC address. With this
patch applied, your machine would still work. The only change is that you would
be assigned a random MAC address.

I will likely need some additional test prints to see if I can find a test that
recognizes that Ren?'s machine has an SPROMs and that John's does not.

Larry

2010-03-29 23:45:39

by René Bolldorf

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On 03/30/10 01:43, Larry Finger wrote:
> On 03/29/2010 06:21 PM, René Bolldorf wrote:
>>
>> ssb: chip_id 0x4312, status 0x12
>> ssb: cc rev 0x16, cc capab 0x18600000
>>
>> And my system completely hangs after this... :(
>
> Nothing in that patch should make it hang. Has that happened before?
>
> Larry
>

Nope. And the file was patched right.

2010-03-29 20:45:09

by John W. Linville

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On Mon, Mar 29, 2010 at 10:19:46PM +0200, Ren? Bolldorf wrote:
> On 03/29/10 21:47, John W. Linville wrote:

>> OK, I'm new to the thread -- what exactly is the issue? Was your
>> device working previously?
>>
>> John
>
> The problem is since commit fcb54b0bf7d3fe730c2b72e224bc616e358f24cb, my
> b43 (4312)
> device doesn't work because i get the message "No SPROM available" and
> then the device get's disabled.
>
> My colleague have the same problem. I have made a patch for that but it
> seems thats not work for all 4312 devices. I and my colleage have the
> same netbook for testing purposes so the patch work while we have the
> same chip status.
>
> The problem is I think: Larry had written his output is ssb: chip_id
> 0x4312, status 0x10, he have a different chip status.
> What to do? Any ideas?

Not really, no... :-(

Larry, any chance the definitions of those OTP_SEL bits are inverted
between 4325 and 4312?

John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2010-03-29 20:00:10

by John W. Linville

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On Mon, Mar 29, 2010 at 09:35:44PM +0200, René Bolldorf wrote:
> On 03/29/10 21:20, Larry Finger wrote:
>> Ren�,
>>
>> When you have a wireless problem, please post it to
>> [email protected]. The Linux Kernel Mailing List may or may not be
>> appropriate.
>>
>> To help in diagnosing your problem, please apply this patch and post the output
>> line that it produces. On my system, it shows
>>
>> ssb: chip_id 0x4312, status 0x10
>>
> and on my: ssb: chip_id 0x4312, status 0x12
>> Please also post the output of 'lspci -nnv | grep 14e4'.
> Yep:
> 01:00.0 Network controller [0280]: Broadcom Corporation BCM4312
> 802.11b/g [14e4:4315] (rev 01)

OK, I'm new to the thread -- what exactly is the issue? Was your
device working previously?

John
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.

2010-03-29 19:35:54

by René Bolldorf

[permalink] [raw]
Subject: Re: [BUG] No SPROM available!

On 03/29/10 21:20, Larry Finger wrote:
> Ren�,
>
> When you have a wireless problem, please post it to
> [email protected]. The Linux Kernel Mailing List may or may not be
> appropriate.
>
> To help in diagnosing your problem, please apply this patch and post the output
> line that it produces. On my system, it shows
>
> ssb: chip_id 0x4312, status 0x10
>
and on my: ssb: chip_id 0x4312, status 0x12
> Please also post the output of 'lspci -nnv | grep 14e4'.
Yep:
01:00.0 Network controller [0280]: Broadcom Corporation BCM4312
802.11b/g [14e4:4315] (rev 01)
>
> Index: wireless-testing/drivers/ssb/sprom.c
> ===================================================================
> --- wireless-testing.orig/drivers/ssb/sprom.c
> +++ wireless-testing/drivers/ssb/sprom.c
> @@ -182,6 +182,8 @@ bool ssb_is_sprom_available(struct ssb_b
> if (bus->chipco.dev->id.revision< 11)
> return true;
>
> + printk(KERN_INFO "ssb: chip_id 0x%x, status 0x%x\n", bus->chip_id,
> + bus->chipco.status);
> switch (bus->chip_id) {
> case 0x4312:
> return SSB_CHIPCO_CHST_4312_SPROM_PRESENT(bus->chipco.status);
>
>
> Larry
>
>