0

If I restart my computer with the following in /etc/modprobe.d/blacklist.conf:

blacklist b43
blacklist ssb
blacklist wl

Then I can either modprobe wl (broadcom STA, works well) or modprobe b43 (highly unstable on my B4331 rev02).

But if any any point I load the b43 module, nothing I can (figure out how to) do will allow me to load wl without restarting my machine.

For example, if I:

modprobe b43 # --> working network access
rmmod b43 brcmsmac ssb bcma wl
modprobe wl
iwlist scan

This yields

eth1      No scan results

I'm trying to figure out what state is being changed, such that modproble b43 && rmmod b43 is having some detrimental net effect. Any thoughts on how I might be able to "recover" from loading b43 without rebooting?

Thanks!

2

The state that's being changed is probably in the network adapter itself. Wireless adapters especially tend to be complex programmable computers in and of themselves, and it's likely that b43 is leaving the adapter in a state where it doesn't know how to talk to wl. Beyond that, you'd need deep understanding of how these drivers work to say what exactly is going on.

If you could power-cycle the adapter itself, that would probably clear the state even if you didn't power-cycle the whole computer. I'm going to assume we're talking about a PCI card that's buried somewhere inside the computer or maybe part of the motherboard. So cutting the device's power physically won't work... but there might be a way to ask the PCI bus to do something similar for us.

WARNING

Note that I've only tried this once on my own machine (which doesn't have a Broadcom card). The principles are the same, but your results may vary. This could potentially crash your system or do other bad things. I doubt it will if you're careful, but I'm not familiar enough to place bets on it. And if you're not careful and choose the wrong device number, you could end up shutting down your hard disk controller instead of the network adapter.

Finally, don't copy-paste these instructions. You'll need to modify them to fit your system.

You'll need to find the PCI bus path for your device in /sys. Start with a driver already loaded, so you can look up your device by its network interface name:

# ls -l /sys/class/net
lrwxrwxrwx 1 root root 0 Feb 18 04:12 eth0 -> ../../devices/pci0000:00/0000:00:1c.2/0000:07:00.0/net/eth0
lrwxrwxrwx 1 root root 0 Feb 18 04:08 lo -> ../../devices/virtual/net/lo

In this case my eth0 device's PCI bus path is /sys/devices/pci0000:00/0000:00:1c.2/0000:07:00.0. If you look in that dir, you'll find a bunch of files that can be used to tweak the PCI bus. In this case, we're interested in the device's remove file, and its parent's rescan file.

First remove the driver; otherwise its device will disappear from under it. Then remove the device from the bus.

# modprobe -r b43 brcmsmac ssb bcma wl
# echo 1 >/sys/devices/pci0000:00/0000:00:1c.2/0000:07:00.0/remove

Next, in order to add the device again, have the device's parent do a rescan.

# echo 1 >/sys/devices/pci0000:00/0000:00:1c.2/rescan

Now you can try run modprobe wl and see if it works.

  • I managed to restart the driver for my wireless card following these instructions. I have been getting intermittent failures and I have had to reboot my computer to get wireless to work again. (The card shows as rfkill hard blocked.) I did modprobe -r b43 and modprobe -r ssb beforehand. The control directory was /sys/bus/pci/devices/0000:04:00.0 (obviously the number will be different on different systems). It appears to work so far. I suspect there is a hardware problem as it is often when I move my laptop that the wireless drops. My card is a BCM4312. – Gavin Smith Apr 25 '17 at 0:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.