Patchwork brcm80211 breakage..

login
register
mail settings
Submitter Henrik Rydberg
Date Jan. 31, 2012, 12:08 p.m.
Message ID <20120131120846.GA8799@polaris.bitmath.org>
Download mbox | patch
Permalink /patch/138764/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Henrik Rydberg - Jan. 31, 2012, 12:08 p.m.
Hi Linus,

Thanks for the MBA31 fixes. Sadly, however, with current git
(27ba234), after encountering the known problem

[  882.064120] bcma: Failed to get SPROM: -71

probing simply fails on my machine,

[  882.064256] bcma-pci-bridge: probe of 0000:01:00.0 failed with error -2

resulting in no wireless. Since the bcma SPROM setup allegedly is
unused, simply ignoring the error with this hack


makes the device register as

01:00.0 0280: 14e4:4353 (rev 01)
	Subsystem: 106b:00d1
	Kernel driver in use: bcma-pci-bridge

which seems to actually work. Instead of the failed probe, the log shows

[ 1168.048571] bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
[ 1168.048706] bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
[ 1168.048855] bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
[ 1168.049051] bcma: Found rev 6 PMU (capabilities 0x108C2606)
[ 1168.120122] bcma: Failed to get SPROM: -71
[ 1168.120340] bcma: Bus registered
[ 1168.125167] brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 23
[ 1168.175670] bcma: Switched to core: 0x812
[ 1168.182061] brcms_module_init: register returned 0

Given that our machines look the same, this is somewhat odd. Could
this be a config issue or did I miss something else?

Henrik
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Torvalds - Jan. 31, 2012, 5:02 p.m.
On Tue, Jan 31, 2012 at 4:08 AM, Henrik Rydberg <rydberg@euromail.se> wrote:
>
> probing simply fails on my machine,
>
> [  882.064120] bcma: Failed to get SPROM: -71
> [  882.064256] bcma-pci-bridge: probe of 0000:01:00.0 failed with error -2
>
> resulting in no wireless. Since the bcma SPROM setup allegedly is
> unused, simply ignoring the error with this hack

I personally hit the "No SPROM available" case, which is apparently
why it works for me.

That said, I obviously agree with your patch: if we don't fail for the
"No SPROM available" case, then we damn well shouldn't fail just
because it *is* available but we can't read it or whatever.

So Ack on the patch from me, but it should go through the network
guys. Arend, John?

                         Linus

> diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
> index febbc0a..cb69fb0 100644
> --- a/drivers/bcma/main.c
> +++ b/drivers/bcma/main.c
> @@ -171,7 +171,6 @@ int bcma_bus_register(struct bcma_bus *bus)
>                pr_err("No SPROM available\n");
>        } else if (err) {
>                pr_err("Failed to get SPROM: %d\n", err);
> -               return -ENOENT;
>        }
>
>        /* Register found cores */
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arend van Spriel - Jan. 31, 2012, 7:08 p.m.
On 01/31/2012 06:02 PM, Linus Torvalds wrote:
> On Tue, Jan 31, 2012 at 4:08 AM, Henrik Rydberg <rydberg@euromail.se> wrote:
>>
>> probing simply fails on my machine,
>>
>> [  882.064120] bcma: Failed to get SPROM: -71
>> [  882.064256] bcma-pci-bridge: probe of 0000:01:00.0 failed with error -2
>>
>> resulting in no wireless. Since the bcma SPROM setup allegedly is
>> unused, simply ignoring the error with this hack
> 
> I personally hit the "No SPROM available" case, which is apparently
> why it works for me.
> 
> That said, I obviously agree with your patch: if we don't fail for the
> "No SPROM available" case, then we damn well shouldn't fail just
> because it *is* available but we can't read it or whatever.
> 
> So Ack on the patch from me, but it should go through the network
> guys. Arend, John?
> 

The SPROM code in bcma needs some attention, because the availability of
it depends between chipsets. I think in bcma not all variations are
known and thus lacking implementation to handle those. So ultimately
bcma sprom code needs to be extended (looking at brcmsmac code). The
sprom code in brcmsmac can go when that has happened.

I will dive into that. I have not hit the "Failed to get SPROM" case so
any chipset info would be appreciated (Henrik?).

Gr. AvS

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Henrik Rydberg - Jan. 31, 2012, 7:36 p.m.
> > So Ack on the patch from me, but it should go through the network
> > guys. Arend, John?
> > 
> 
> The SPROM code in bcma needs some attention, because the availability of
> it depends between chipsets. I think in bcma not all variations are
> known and thus lacking implementation to handle those. So ultimately
> bcma sprom code needs to be extended (looking at brcmsmac code). The
> sprom code in brcmsmac can go when that has happened.
> 
> I will dive into that. I have not hit the "Failed to get SPROM" case so
> any chipset info would be appreciated (Henrik?).

I guess my first mail never reached the netdev mailinglist. This is
also a MacbookAir3,1. Booting from EFI looks like this:

[    0.429827] bcma-pci-bridge 0000:01:00.0: enabling device (0000 -> 0002)
[    0.430083] bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x22, class 0x0)
[    0.430105] bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812, rev 0x17, class 0x0)
[    0.430147] bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev 0x0F, class 0x0)
[    0.430234] bcma: Found rev 6 PMU (capabilities 0x108C2606)
[    0.499963] bcma: Failed to get SPROM: -71
[    0.500042] bcma: Bus registered
[    0.619721] bcma-pci-bridge 0000:01:00.0: Signaling PME through PCIe PME interrupt
[    1.487946] usbcore: registered new interface driver bcm5974
[    2.569391] input: bcm5974 as /devices/pci0000:00/0000:00:04.0/usb3/3-3/3-3:1.2/input/input7
[    4.857363] brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 21
[    4.931854] bcma: Switched to core: 0x812
[    4.939215] brcms_module_init: register returned 0

And the lspci entry looks like this:

01:00.0 0280: 14e4:4353 (rev 01)
	Subsystem: 106b:00d1
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 256 bytes
	Interrupt: pin A routed to IRQ 21
	Region 0: Memory at 93100000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: bcma-pci-bridge

Booting from BIOS is almost the identical, only different irq assignments.

Thanks,
Henrik
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arend van Spriel - Jan. 31, 2012, 7:49 p.m.
On 01/31/2012 08:36 PM, Henrik Rydberg wrote:
>>> So Ack on the patch from me, but it should go through the network
>>> guys. Arend, John?
>>>
>>
>> The SPROM code in bcma needs some attention, because the availability of
>> it depends between chipsets. I think in bcma not all variations are
>> known and thus lacking implementation to handle those. So ultimately
>> bcma sprom code needs to be extended (looking at brcmsmac code). The
>> sprom code in brcmsmac can go when that has happened.
>>
>> I will dive into that. I have not hit the "Failed to get SPROM" case so
>> any chipset info would be appreciated (Henrik?).
> 
> I guess my first mail never reached the netdev mailinglist. This is
> also a MacbookAir3,1. Booting from EFI looks like this:

It may have. I am not on that particular mailing list (maybe should) and
google did not help me find it. Thanks for the details.

Gr. AvS


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
index febbc0a..cb69fb0 100644
--- a/drivers/bcma/main.c
+++ b/drivers/bcma/main.c
@@ -171,7 +171,6 @@  int bcma_bus_register(struct bcma_bus *bus)
 		pr_err("No SPROM available\n");
 	} else if (err) {
 		pr_err("Failed to get SPROM: %d\n", err);
-		return -ENOENT;
 	}
 
 	/* Register found cores */