[Debian-eeepc-devel] Fix for 2.6.26 PCI hotplug error when enabling wireless

Phil Endecott phil_dlhbb_endecott at chezphil.org
Sat Aug 30 12:17:44 UTC 2008


oz wrote:
> case $1 in
>     on|enable)
>         if [ $(cat $wlan_control) = 0 ]; then
>             modprobe -r pciehp
>             modprobe pciehp pciehp_force=1 pciehp_slot_with_bus=1
>             echo 1 > $wlan_control
> #            detect_wlan
> #           modprobe $WLAN_MOD
>             # adding a sleep here, due to some bug the driver loading
> is not atomic here # and could cause ifconfig to fail
> #           sleep 1
> #           if ! ifconfig $WLAN_IF up; then exec $0 off; fi
>         fi
>         ;;

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?

Why the explicit "modprobe $WLAN_MOD"?  Surely after you do "echo 1 > 
$wlan_control" the pcie hotplug system will detect the newly-enabled 
device and the kernel (with the help of udev) will load the module (if 
it's not already loaded) and it will associate itself with the device.

oz wrote:
> Because ra0 is already up at that time, 'ifconfig $WLAN_IF up' has to fail

No, I think that "ifconfig up" on an interface that's already up will succeed.


In summary, to make this work with the 901 I've found that it's only 
necessary to add the "pciehp_slot_with_bus=1" option.  oz has made more 
changes (above) but I've not found them necessary.  But I don't see why 
this script needs to be as complicated as it is.


Phil.






More information about the Debian-eeepc-devel mailing list