Bug#648631: debian-installer: check-missing-firmware fails to reload driver
On Wed 16 Nov 2011 at 14:08:20 -0400, Joey Hess wrote: The devpath I got was /sys/devices/platform/orion-ehci.0/usb1/1-1/1-1.4 This has a product file containing USB2.0 WLAN, manufacturer containing ZyDAS and so on, but its driver/module link points to /sys/bus/usb/drivers/usbcore . The information about the actual driver for this device is in 1-1.4:1.0/driver and 1-1.4:1.0/modalias . This mirrors what I got when I delved further into /sys. except there is no 1-1.4:1.0/driver for the p54usb. Having the driver loaded but no network interface created seems a little strange, but it does not appear to be an installer issue because it also happens on a running system without the firmware available. All I can think to do is a special case. Assuming this only affects USB and not some other bus, this should work ok: diff --git a/check-missing-firmware.sh b/check-missing-firmware.sh Thank you for this. Both the zd1211rw and the p54usb worked flawlessly after applying it. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#648631: debian-installer: check-missing-firmware fails to reload driver
Brian Potkin wrote: I have a USB device using the zd1211rw module. It behaves differently in that a wlan0 interface is detected and can be configured. However, $DEVPATH is the same as with the p54usb and modprobe still attempts to remove usbcore. I have a zd1211rw so was able to reproduce this. Probably any USB wifi needing firmware has this problem. The devpath I got was /sys/devices/platform/orion-ehci.0/usb1/1-1/1-1.4 This has a product file containing USB2.0 WLAN, manufacturer containing ZyDAS and so on, but its driver/module link points to /sys/bus/usb/drivers/usbcore . The information about the actual driver for this device is in 1-1.4:1.0/driver and 1-1.4:1.0/modalias . All I can think to do is a special case. Assuming this only affects USB and not some other bus, this should work ok: diff --git a/check-missing-firmware.sh b/check-missing-firmware.sh index 95106d4..7835b39 100755 --- a/check-missing-firmware.sh +++ b/check-missing-firmware.sh @@ -98,9 +98,22 @@ check_missing () { if grep -q ^$fwfile$ $DENIED 2/dev/null; then continue fi - - modules=$module${modules:+ $modules} + files=$fwfile${files:+ $files} + + if [ $module = usbcore ]; then + # Special case for USB bus, which puts the + # real module information in a subdir of + # the devpath. + for dir in $(find $devpath -maxdepth 1 -mindepth 1 -type d); do + module=$(get_module $dir) + if [ -n $module ]; then + modules=$module${modules:+ $modules} + fi + done + else + modules=$module${modules:+ $modules} + fi done done -- see shy jo signature.asc Description: Digital signature
Bug#648631: debian-installer: check-missing-firmware fails to reload driver
On Mon 14 Nov 2011 at 12:37:22 -0400, Joey Hess wrote: It seems that the wrong guess has been made about which module requested the isl3887usb firmware file. To debug this, you could instrument /lib/udev/firmware.agent In particular, see what DEVPATH is set to with a change like this: --- /lib/udev/firmware.agent 2011-07-22 21:04:16.0 -0400 +++ firmware.agent2011-11-14 12:02:35.958176664 -0400 @@ -24,6 +24,8 @@ # the firmware was not found echo -1 /sys/$DEVPATH/loading +echo $DEVPATH $FIRMWARE /tmp/firmware.log + RUNDIR=$(udevadm info --run) if [ -d $RUNDIR ]; then (Or you can look at lspci and find the DEVPATH by hand, it'll be in /sys/devices/pci:00/ under the device's PCI ID; something like /sys/devices/pci:00/:00:1c.1/:03:00.0/) The contents of /tmp/firmware.log are: /devices/pci:00/:00:10.3/usb1/1-3/firmware/1-3 isl3887usb /devices/pci:00/:00:10.3/usb1/1-3/firmware/1-3 isl3887usb_bare Then take a look at the $DEVPATH/driver/module symlink. Which module directory does it point to? Or, if there's no such symlink, is there a $DEVPATH/modalias file? If so, what does this output: modprobe --show-depends $(cat $DEVPATH/modalias) Neither is possible because the firmware directory does not exist. But devpath in check-missing-firmware is /sys/devices/pci:00/:00:10.3/usb1/1-3/ and $devpath/driver/module points to usbcore. I have a USB device using the zd1211rw module. It behaves differently in that a wlan0 interface is detected and can be configured. However, $DEVPATH is the same as with the p54usb and modprobe still attempts to remove usbcore. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#648631: debian-installer: check-missing-firmware fails to reload driver
Brian Potkin wrote: Nov 13 12:51:53 kernel: [ 543.914487] usb 1-2: (p54usb) cannot load firmware isl3887usb (-2)! Nov 13 12:51:53 kernel: [ 543.923108] p54usb: probe of 1-2:1.0 failed with error -2 Nov 13 12:51:53 kernel: [ 543.923151] usbcore: registered new interface driver p54usb Nov 13 12:51:54 check-missing-firmware: missing firmware files (isl3887usb isl3887usb_bare) for usbcore usbcore Nov 13 12:51:55 check-missing-firmware: copying loose file isl3887usb from '/media' to '/lib/firmware' Nov 13 12:52:03 main-menu[265]: (process:4114): + modprobe -r usbcore Nov 13 12:52:03 main-menu[265]: (process:4114): FATAL: Module usbcore is in use. It seems that the wrong guess has been made about which module requested the isl3887usb firmware file. To debug this, you could instrument /lib/udev/firmware.agent In particular, see what DEVPATH is set to with a change like this: --- /lib/udev/firmware.agent2011-07-22 21:04:16.0 -0400 +++ firmware.agent 2011-11-14 12:02:35.958176664 -0400 @@ -24,6 +24,8 @@ # the firmware was not found echo -1 /sys/$DEVPATH/loading +echo $DEVPATH $FIRMWARE /tmp/firmware.log + RUNDIR=$(udevadm info --run) if [ -d $RUNDIR ]; then (Or you can look at lspci and find the DEVPATH by hand, it'll be in /sys/devices/pci:00/ under the device's PCI ID; something like /sys/devices/pci:00/:00:1c.1/:03:00.0/) Then take a look at the $DEVPATH/driver/module symlink. Which module directory does it point to? Or, if there's no such symlink, is there a $DEVPATH/modalias file? If so, what does this output: modprobe --show-depends $(cat $DEVPATH/modalias) -- see shy jo signature.asc Description: Digital signature
Bug#648631: debian-installer: check-missing-firmware fails to reload driver
Package: debian-installer Severity: normal Today's daily netinst image was put on a USB stick together with a second partition to hold firmware. The intention was to test installing Debian over a WPA wireless connection. It turned out to be more interesting than I had anticipated! The wireless device is a SpeedTouch 121g Wireless USB Adapter, which uses the p54usb driver and requires firmware isl3887usb. This combination works well on a machine running Sid. 'set -x' was added to /bin/ethdetect and /bin/checking-missing-firmware after loading the installer components. 'Detect network hardware' went ok (there were no messages about missing firmware) and the next item in the menu was presented. Problem: there was no wlan0 interface offered. 'Configure the network' jumped straight to offering to set up a DHCP connection. The install can be continued with a wlan0 interface by reloading the p54usb module. Here are some excepts from the syslog, which is attached to this mail, The driver is loaded: Nov 13 12:51:53 kernel: [ 543.914487] usb 1-2: (p54usb) cannot load firmware isl3887usb (-2)! Nov 13 12:51:53 kernel: [ 543.923108] p54usb: probe of 1-2:1.0 failed with error -2 Nov 13 12:51:53 kernel: [ 543.923151] usbcore: registered new interface driver p54usb ethdetect finds eth0 but not wlan0. Why, I don't know, but the 'ip set link ...' lines in check-missing-firmware will not help to load the firmware: Nov 13 12:52:03 main-menu[265]: (process:4114): + check-missing-firmware eth0 Why does the driver think isl3887usb_bare is required? Firstly, it's not needed on my Sid machine; secondly, 'modinfo p54usb' doesn't mention it: Nov 13 12:51:54 check-missing-firmware: missing firmware files (isl3887usb isl3887usb_bare) for usbcore usbcore Firmware found: Nov 13 12:51:55 check-missing-firmware: copying loose file isl3887usb from '/media' to '/lib/firmware' Finally: Nov 13 12:52:03 main-menu[265]: (process:4114): + modprobe -r usbcore Nov 13 12:52:03 main-menu[265]: (process:4114): FATAL: Module usbcore is in use. This isn't very healthy! Surely a bug? If p54usb had been modprobed I most likely wouldn't be writing this report. The configuring of WPA/WPA2? That went splendidly! syslog.gz Description: Binary data