[Debian-eeepc-devel] Fix for 2.6.26 PCI hotplug error when enabling wireless
phil_dlhbb_endecott at chezphil.org
Sat Aug 30 20:29:24 UTC 2008
Damyan Ivanov wrote:
> -=| oz, Sat, Aug 30, 2008 at 03:51:16PM +0200 |=-
>> On Sat, 30 Aug 2008 13:17:44 +0100
>> "Phil Endecott" <phil_dlhbb_endecott at chezphil.org> wrote:
>> > Can anyone explain why the existing code is like it is? Why do we need
>> > to remove and re-load the pciehp module at all?
>> Good question. Pciehp (hotplug-module) seems to be unnecessary on the
>> 901. I deleted those entries in the toggle-on section, and wireless.sh
>> work as good as before for me and is pretty simple now:
> I guess you mean that unloading/reloading pciehp is not necessary and
> I agree with that.
> OTOH, I giess there was a reason for it to be that way. If 701 owners
> can test that the simplification below (or a subset of it) works for
> them, I'd be happy to change the code.
I really hope that this stuff is still sufficiently "new" that we can
find out why it was put there! Is there a commit message somewhere? A
few comments would have been nice too....
> At least on 901, if the whole wireless-on section is replaced solely
> with the echo 1 > $wlan_control toggling wireless on works here (901,
> bios 1101).
It almost works for me; I need to "ifup" and "ifdown" I think because I
don't have "auto" in my /etc/network/interfaces. I do have
"allow-hotplug" though. I need to understand that better. But I
certainly don't seem to need all that module loading/unloading.
>> if [ $(cat $wlan_control) = 1 ]; then
>> ifdown --force $WLAN_IF
>> modprobe -r $WLAN_MOD
>> echo 0 > $wlan_control
> I guess the same approach can be taken here - stop fiddling with
> modprobe and let pciehp handle the removal of the hardware via
Running ifdown while the network is still up, before disabling it,
allows things like the scripts in /etc/network/if-down.d to run.
People might have useful stuff in there. But I don't see any need for
the modprobe -r, and it works for me without it.
(BTW, is there a good reason why we don't rename the wireless interface
to a consistent hardware-independent name like wlan0 or wifi0, rather
than needing all the detect_wlan stuff?)
>> Do you use any kind of network-manager?
More information about the Debian-eeepc-devel