Skip to contentSkip to conversation

No SPROM available!

BUG Larry Finger 3 participants 15 messages Mar 29, 2010 Sonics silicon backplane driver (ssb)

lore
Share & tools
lore
#0 lore raw

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

drivers/ssb/sprom.c +2 -0
Index: 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

#1 lore raw
Quoted 11 lines · Larry Finger

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

Quoted 1 line

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)

Quoted 19 lines

Index: wireless-testing/drivers/ssb/sprom.c
===================================================================

drivers/ssb/sprom.c +2 -0
@@ -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

#2 lore raw
Quoted 10 lines · René Bolldorf
Quoted 9 lines · Larry Finger

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

Quoted 7 lines
Quoted 2 lines

ssb: chip_id 0x4312, status 0x10

and on my: ssb: chip_id 0x4312, status 0x12

Quoted 1 line

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

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#3 lore raw
Quoted 13 lines · John W. Linville
Quoted 12 lines · René Bolldorf
Quoted 11 lines · Larry Finger

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

Quoted 8 lines
Quoted 5 lines

and on my: ssb: chip_id 0x4312, status 0x12

Quoted 1 line

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

#4 lore raw
Quoted 2 lines · Larry Finger

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

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#5 lore raw
Quoted 6 lines · John W. Linville
Quoted 2 lines · Larry Finger

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

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#6 lore raw
Quoted 9 lines · John W. Linville
Quoted 6 lines · John W. Linville
Quoted 2 lines · Larry Finger

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

#7 lore raw
Quoted 25 lines · Larry Finger
Quoted 9 lines · John W. Linville
Quoted 6 lines · John W. Linville
Quoted 2 lines · Larry Finger

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.

Quoted 4 lines

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.

#8 lore raw

René and John,

What output does this patch yield?

drivers/ssb/sprom.c +5 -0
Index: 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);
#9 lore raw
Quoted 13 lines · Larry Finger

René and John,

What output does this patch yield?

Index: wireless-testing/drivers/ssb/sprom.c
===================================================================

drivers/ssb/sprom.c +0 -0
@@ -182,6 +182,11 @@ bool ssb_is_sprom_available(struct ssb_b
  	if (bus->chipco.dev->id.revision<  11)

drivers/ssb/sprom.c bool ssb_is_sprom_available(struct ssb_b · line 192

Quoted 10 lines
drivers/ssb/sprom.c +5 -0
  		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... :(

#10 lore raw
Quoted 5 lines · René Bolldorf

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

#11 lore raw
Quoted 11 lines · Larry Finger
Quoted 5 lines · René Bolldorf

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.

#12 lore raw
In reply to John W. Linville
Quoted 13 lines · John W. Linville
Quoted 12 lines · René Bolldorf
Quoted 11 lines · Larry Finger

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

Quoted 8 lines
Quoted 5 lines

and on my: ssb: chip_id 0x4312, status 0x12

Quoted 1 line

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

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#13 lore raw
In reply to John W. Linville
Quoted 15 lines · John W. Linville
Quoted 14 lines · René Bolldorf
Quoted 11 lines · Larry Finger

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

Quoted 1 line

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

Quoted 8 lines
Quoted 3 lines

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?

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

include/linux/ssb/ssb_driver_chipcommon.h +1 -0
index 2cdf249..1e0b9cd 100644
@@ -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.

#14 lore raw
Quoted 12 lines · René Bolldorf
Quoted 4 lines · John W. Linville

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.

Quoted 8 lines

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

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