Skip to contentSkip to conversation

BCM4331 fails to associate after suspend

DISCUSSION Seth Forshee 5 participants 12 messages Feb 3, 2012 – Feb 16, 2012 Broadcom specific amba driver (bcma)

lore
Share & tools
lore
#0 lore raw

I've been looking into some association problems seen with a MacBook Pro 8,2 that has BCM4331 wireless, which I've confirmed still exist in wireless-testing. The association failures reliably start appearing after the machine is resumed from s3 without external power applied (whether or not power is applied when the machine is suspended doesn't matter).

When the association failures are happening the BCM4331 seems to be able to receive packets okay, as it can scan successfully. Transmissions don't work though; no frames from the BCM4331 are ever seen on the air, as though the tx path is off. Reloading both the b43 and bcma drivers gets things working again, but reloading just b43 does not.

I've been looking around a bit in the b43 and bcma drivers, but so far I haven't found the reason why this happens. Any help would be appreciated. Let me know if there's additional information I can provide.

Thanks,
Seth

#1 lore raw
Quoted 18 lines · Seth Forshee

I've been looking into some association problems seen with a MacBook Pro 8,2 that has BCM4331 wireless, which I've confirmed still exist in wireless-testing. The association failures reliably start appearing after the machine is resumed from s3 without external power applied (whether or not power is applied when the machine is suspended doesn't matter).

When the association failures are happening the BCM4331 seems to be able to receive packets okay, as it can scan successfully. Transmissions don't work though; no frames from the BCM4331 are ever seen on the air, as though the tx path is off. Reloading both the b43 and bcma drivers gets things working again, but reloading just b43 does not.

I've been looking around a bit in the b43 and bcma drivers, but so far I haven't found the reason why this happens. Any help would be appreciated. Let me know if there's additional information I can provide.

Quoted 7 lines

Thanks,
Seth

_______________________________________________
b43-dev mailing list
b43-dev at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

I can add that reloading the modules after a suspend/resumes restores functionality, though oddly adding them to SUSPEND_MODULES in pm-utils config does not.

#2 lore raw
In reply to Seth Forshee
Quoted 6 lines · Seth Forshee

I've been looking around a bit in the b43 and bcma drivers, but so far I haven't found the reason why this happens. Any help would be appreciated. Let me know if there's additional information I can provide.

With which kernel version do you see these issues? BCMA suspend/resume code has a fix in 3.3-rc1. So if you are seeing it on a 3.2 kernel, please give it a try.

Gr. AvS

#3 lore raw
Quoted 11 lines · Arend van Spriel
Quoted 6 lines · Seth Forshee

I've been looking around a bit in the b43 and bcma drivers, but so far I haven't found the reason why this happens. Any help would be appreciated. Let me know if there's additional information I can provide.

With which kernel version do you see these issues? BCMA suspend/resume code has a fix in 3.3-rc1. So if you are seeing it on a 3.2 kernel, please give it a try.

I've tried 3.3-rc2 and the wirless-testing tree, and the problem still exists in both.

Seth

maintainer
#4 lore raw

2012/2/4 Seth Forshee <[email protected]>:

Quoted 9 lines · Arend van Spriel
Quoted 8 lines · Seth Forshee
Quoted 6 lines

I've been looking around a bit in the b43 and bcma drivers, but so far I haven't found the reason why this happens. Any help would be appreciated. Let me know if there's additional information I can provide.

Quoted 6 lines
Quoted 3 lines

With which kernel version do you see these issues? BCMA suspend/resume code has a fix in 3.3-rc1. So if you are seeing it on a 3.2 kernel, please give it a try.

I've tried 3.3-rc2 and the wirless-testing tree, and the problem still exists in both.

I don't have access to suspendable machine with Mini PCIe card, not to mention BCM4331 which is available for Mac-specific slot only (or routers as embedded wifi). It may be b43 needs to fix but I'm not really able to work on that. Plus the whole BCM4331 code is really tricky, as it comes from RE based on dumps only :(

Signature · 1 line
Rafa?
#5 lore raw
Quoted 14 lines · Rafa? Mi?ecki

2012/2/4 Seth Forshee <[email protected]>:

Quoted 13 lines · Arend van Spriel
Quoted 11 lines · Seth Forshee
Quoted 6 lines

I've been looking around a bit in the b43 and bcma drivers, but so far I haven't found the reason why this happens. Any help would be appreciated. Let me know if there's additional information I can provide.

With which kernel version do you see these issues? BCMA suspend/resume code has a fix in 3.3-rc1. So if you are seeing it on a 3.2 kernel, please give it a try.

Quoted 8 lines
Quoted 2 lines

I've tried 3.3-rc2 and the wirless-testing tree, and the problem still exists in both.

I don't have access to suspendable machine with Mini PCIe card, not to mention BCM4331 which is available for Mac-specific slot only (or routers as embedded wifi). It may be b43 needs to fix but I'm not really able to work on that. Plus the whole BCM4331 code is really tricky, as it comes from RE based on dumps only :(

Okay, I'll keep poking at it to see if I can come up with anything. If you've got any suggestions on things I should be looking at or trying, I'm all ears.

Seth

#6 lore raw
Quoted 24 lines · Seth Forshee
Quoted 14 lines · Rafa? Mi?ecki

2012/2/4 Seth Forshee <[email protected]>:

Quoted 13 lines · Arend van Spriel
Quoted 11 lines · Seth Forshee
Quoted 6 lines

I've been looking around a bit in the b43 and bcma drivers, but so far I haven't found the reason why this happens. Any help would be appreciated. Let me know if there's additional information I can provide.

With which kernel version do you see these issues? BCMA suspend/resume code has a fix in 3.3-rc1. So if you are seeing it on a 3.2 kernel, please give it a try.

Quoted 8 lines
Quoted 2 lines

I've tried 3.3-rc2 and the wirless-testing tree, and the problem still exists in both.

I don't have access to suspendable machine with Mini PCIe card, not to mention BCM4331 which is available for Mac-specific slot only (or routers as embedded wifi). It may be b43 needs to fix but I'm not really able to work on that. Plus the whole BCM4331 code is really tricky, as it comes from RE based on dumps only :(

Quoted 5 lines

Okay, I'll keep poking at it to see if I can come up with anything. If you've got any suggestions on things I should be looking at or trying, I'm all ears.

Seth

According to the Broadcom SDK for SoCs bcma_pcicore_serdes_workaround() should be called when coming out of standby/hibernate.
The code wl uses to do the same thing as bcma does is open source. You find it in the GPL package of many Broadcom based Wifi Routers.

Hauke

#7 lore raw
Quoted 29 lines · Hauke Mehrtens
Quoted 28 lines · Seth Forshee
Quoted 14 lines · Rafa? Mi?ecki

2012/2/4 Seth Forshee <[email protected]>:

Quoted 13 lines · Arend van Spriel
Quoted 11 lines · Seth Forshee
Quoted 6 lines

I've been looking around a bit in the b43 and bcma drivers, but so far I haven't found the reason why this happens. Any help would be appreciated. Let me know if there's additional information I can provide.

With which kernel version do you see these issues? BCMA suspend/resume code has a fix in 3.3-rc1. So if you are seeing it on a 3.2 kernel, please give it a try.

Quoted 8 lines
Quoted 2 lines

I've tried 3.3-rc2 and the wirless-testing tree, and the problem still exists in both.

I don't have access to suspendable machine with Mini PCIe card, not to mention BCM4331 which is available for Mac-specific slot only (or routers as embedded wifi). It may be b43 needs to fix but I'm not really able to work on that. Plus the whole BCM4331 code is really tricky, as it comes from RE based on dumps only :(

Okay, I'll keep poking at it to see if I can come up with anything. If you've got any suggestions on things I should be looking at or trying, I'm all ears.

Quoted 6 lines
Quoted 1 line

Seth

According to the Broadcom SDK for SoCs bcma_pcicore_serdes_workaround() should be called when coming out of standby/hibernate.
The code wl uses to do the same thing as bcma does is open source. You find it in the GPL package of many Broadcom based Wifi Routers.

Thanks for the suggestion. Unfortunately calling bcma_pcicore_serdes_workaround() during resume doesn't help. I'll look at the wl code to see if I can learn anything there.

Seth

maintainer
#8 lore raw

2012/2/6 Seth Forshee <[email protected]>:

Quoted 9 lines · Hauke Mehrtens
Quoted 4 lines

According to the Broadcom SDK for SoCs bcma_pcicore_serdes_workaround() should be called when coming out of standby/hibernate.
The code wl uses to do the same thing as bcma does is open source. You find it in the GPL package of many Broadcom based Wifi Routers.

Thanks for the suggestion. Unfortunately calling bcma_pcicore_serdes_workaround() during resume doesn't help. I'll look at the wl code to see if I can learn anything there.

Can you try

drivers/bcma/main.c +7 -0
index febbc0a..a097a26 100644
@@ -267,6 +267,13 @@ int bcma_bus_resume(struct bcma_bus *bus)
                bcma_core_chipcommon_init(&bus->drv_cc);
        }
 
+       /* Init PCIE core */
+       core = bcma_find_core(bus, BCMA_CORE_PCIE);
+       if (core) {
+               bus->drv_pci.setup_done = false;
+               bcma_core_pci_init(&bus->drv_pci);
+       }
+
        list_for_each_entry(core, &bus->cores, list) {
                struct device_driver *drv = core->dev.driver;
                if (drv) {
maintainer
#9 lore raw

W dniu 7 lutego 2012 08:04 u?ytkownik Rafa? Mi?ecki <[email protected]> napisa?:

Quoted 22 lines

2012/2/6 Seth Forshee <[email protected]>:

Quoted 9 lines · Hauke Mehrtens
Quoted 4 lines

According to the Broadcom SDK for SoCs bcma_pcicore_serdes_workaround() should be called when coming out of standby/hibernate.
The code wl uses to do the same thing as bcma does is open source. You find it in the GPL package of many Broadcom based Wifi Routers.

Thanks for the suggestion. Unfortunately calling bcma_pcicore_serdes_workaround() during resume doesn't help. I'll look at the wl code to see if I can learn anything there.

Can you try

drivers/bcma/main.c +0 -0
index febbc0a..a097a26 100644
@@ -267,6 +267,13 @@ int bcma_bus_resume(struct bcma_bus *bus)
 ? ? ? ? ? ? ? ?bcma_core_chipcommon_init(&bus->drv_cc);
 ? ? ? ?}
 

drivers/bcma/main.c int bcma_bus_resume(struct bcma_bus *bus) · line 279

Quoted 10 lines
drivers/bcma/main.c +7 -0
+ ? ? ? /* Init PCIE core */
+ ? ? ? core = bcma_find_core(bus, BCMA_CORE_PCIE);
+ ? ? ? if (core) {
+ ? ? ? ? ? ? ? bus->drv_pci.setup_done = false;
+ ? ? ? ? ? ? ? bcma_core_pci_init(&bus->drv_pci);
+ ? ? ? }
+
 ? ? ? ?list_for_each_entry(core, &bus->cores, list) {
 ? ? ? ? ? ? ? ?struct device_driver *drv = core->dev.driver;
 ? ? ? ? ? ? ? ?if (drv) {

If this doesn't work out of box, please check if reloading b43 is enough. AFAIR now you have to reload both: b43 and bcma. I hope this patch will let you avoid reloading at least bcma.

Signature · 1 line
Rafa?
#10 lore raw
Quoted 23 lines · Rafa? Mi?ecki

W dniu 7 lutego 2012 08:04 u?ytkownik Rafa? Mi?ecki <[email protected]> napisa?:

Quoted 22 lines

2012/2/6 Seth Forshee <[email protected]>:

Quoted 9 lines · Hauke Mehrtens
Quoted 4 lines

According to the Broadcom SDK for SoCs bcma_pcicore_serdes_workaround() should be called when coming out of standby/hibernate.
The code wl uses to do the same thing as bcma does is open source. You find it in the GPL package of many Broadcom based Wifi Routers.

Thanks for the suggestion. Unfortunately calling bcma_pcicore_serdes_workaround() during resume doesn't help. I'll look at the wl code to see if I can learn anything there.

Can you try

drivers/bcma/main.c +0 -0
index febbc0a..a097a26 100644
@@ -267,6 +267,13 @@ int bcma_bus_resume(struct bcma_bus *bus)
 ? ? ? ? ? ? ? ?bcma_core_chipcommon_init(&bus->drv_cc);
 ? ? ? ?}
 
Quoted 14 lines

drivers/bcma/main.c int bcma_bus_resume(struct bcma_bus *bus) · line 279

Quoted 10 lines
drivers/bcma/main.c +7 -0
+ ? ? ? /* Init PCIE core */
+ ? ? ? core = bcma_find_core(bus, BCMA_CORE_PCIE);
+ ? ? ? if (core) {
+ ? ? ? ? ? ? ? bus->drv_pci.setup_done = false;
+ ? ? ? ? ? ? ? bcma_core_pci_init(&bus->drv_pci);
+ ? ? ? }
+
 ? ? ? ?list_for_each_entry(core, &bus->cores, list) {
 ? ? ? ? ? ? ? ?struct device_driver *drv = core->dev.driver;
 ? ? ? ? ? ? ? ?if (drv) {

If this doesn't work out of box, please check if reloading b43 is enough. AFAIR now you have to reload both: b43 and bcma. I hope this patch will let you avoid reloading at least bcma.

I tried exactly that yesterday, but it doesn't fix the issue. I just checked to see if it allows reloading only b43, and it does not. I still have to reload bcma to get the wireless working again.

Seth

#11 lore raw
Quoted 39 lines · Seth Forshee
Quoted 23 lines · Rafa? Mi?ecki

W dniu 7 lutego 2012 08:04 u?ytkownik Rafa? Mi?ecki <[email protected]> napisa?:

Quoted 22 lines

2012/2/6 Seth Forshee <[email protected]>:

Quoted 9 lines · Hauke Mehrtens
Quoted 4 lines

According to the Broadcom SDK for SoCs bcma_pcicore_serdes_workaround() should be called when coming out of standby/hibernate.
The code wl uses to do the same thing as bcma does is open source. You find it in the GPL package of many Broadcom based Wifi Routers.

Thanks for the suggestion. Unfortunately calling bcma_pcicore_serdes_workaround() during resume doesn't help. I'll look at the wl code to see if I can learn anything there.

Can you try

drivers/bcma/main.c +0 -0
index febbc0a..a097a26 100644
@@ -267,6 +267,13 @@ int bcma_bus_resume(struct bcma_bus *bus)
 ? ? ? ? ? ? ? ?bcma_core_chipcommon_init(&bus->drv_cc);
 ? ? ? ?}
 
Quoted 14 lines

drivers/bcma/main.c int bcma_bus_resume(struct bcma_bus *bus) · line 279

Quoted 10 lines
drivers/bcma/main.c +7 -0
+ ? ? ? /* Init PCIE core */
+ ? ? ? core = bcma_find_core(bus, BCMA_CORE_PCIE);
+ ? ? ? if (core) {
+ ? ? ? ? ? ? ? bus->drv_pci.setup_done = false;
+ ? ? ? ? ? ? ? bcma_core_pci_init(&bus->drv_pci);
+ ? ? ? }
+
 ? ? ? ?list_for_each_entry(core, &bus->cores, list) {
 ? ? ? ? ? ? ? ?struct device_driver *drv = core->dev.driver;
 ? ? ? ? ? ? ? ?if (drv) {

If this doesn't work out of box, please check if reloading b43 is enough. AFAIR now you have to reload both: b43 and bcma. I hope this patch will let you avoid reloading at least bcma.

Quoted 3 lines

I tried exactly that yesterday, but it doesn't fix the issue. I just checked to see if it allows reloading only b43, and it does not. I still have to reload bcma to get the wireless working again.

I've been pounding on this quite a bit in the past week, but I haven't been able to get anywhere so far. Any relevant workarounds I found in wl have no effect, and neither does any amount of reinitialization.

I'm still digging into the drivers to see if I can learn anything, but if anyone has more suggestions I'll happily give them a try.

Seth