Dear maintainer,
Please find attached 3 patches adding fallback module detection when
dmesg does not provide the actual module name and device driver symlink
is missing. I tried to keep them as clear, short and little invasive as
possible in order to ease review and avoid regressions.
Tested with p54usb (follow-up to bug #1032377). Tested for non
regression with b43.
===============
* 0001 check-missing-firmware: add function get_module_by_bus_address
Call this function for bus types other than usb and mhi. It looks up:
- module name
- driver name
- sysfs modalias
- udevadm modalias
in order and returns whichever exists or matches first.
===============
* 0002 check-missing-firmware: call get_module_by_bus_address for usb
devices too
So modalias lookup can be used with usb devices when no driver is found
(e.g. p54usb).
===============
* 0003 check-missing-firmware: add module lookup by firmware file
Scan all loaded modules for the requested firmware file as fallback if
the detected module is a bus name or is not a loaded driver or module name.