Source: hw-detect Version: 1.160 Severity: normal Tags: patch d-i
Hello maintainers of hw-detect,I have an USB wireless adapter that uses the r8712u kernel module and that requires firmware from non-free-firmware. When I run the Debian installer, the missing firmware file is correctly identified and installed by 'check-missing-firmware.sh'. However, the kernel module is mis-identified as 'usb'. When I disconnect the adapter and reconnect it, the installer is able to use the adapter properly.
Attached is a patch that allows the module to be identified correctly. If desired, I can send the patch instead as a merge request on Salsa.However, using 'modprobe -r r8712u' and 'modprobe r8712u' is not sufficient to enable the adapter, it still needs a physical reconnect. In the attached screenshot from the installer (sid) the result of the patch is shown. Also in the QEMU environment, I need to disconnect and reconnect the USB device from the host.
I tried several options, but could not get them to work: bind/unbind [1] authorized, usbreset [2]
Do you know a solution (apart from a physical reconnect)? With kind regards, Roland Clobus[1] https://superuser.com/questions/1707773/how-to-turn-usb-connected-device-on-and-off-in-linux [2] https://askubuntu.com/questions/645/how-do-you-reset-a-usb-device-from-the-command-line
diff --git a/check-missing-firmware.sh b/check-missing-firmware.sh index a89f62fb..cca00687 100755 --- a/check-missing-firmware.sh +++ b/check-missing-firmware.sh @@ -29,6 +29,14 @@ get_usb_module() { # Make sure there's a single subdirectory (e.g. 4-1.5:1.0 below 4-1.5): subdirs=$(find -L "$device" -maxdepth 1 -type d -name "$address:*") subdirs_n=$(echo "$subdirs" | wc -w) + if [ $subdirs_n -eq 0 ]; then + # If the driver is unbound, perhaps it is r8712u + dmesg | grep "r8712u: Firmware request failed" >/dev/null + if [ $? -eq 0 ]; then + echo 'r8712u' + return + fi + fi if [ $(echo "$subdirs" | wc -w) != 1 ]; then log "failed to perform usb $address lookup (got: $subdirs_n entries, expected: 1)" log "=> sticking with the usb module"
OpenPGP_signature.asc
Description: OpenPGP digital signature