#1033679 hw-detect/check-missing-firmware: add fallback module lookup by modalias and firmware

#1033679#5
Date:
2023-03-29 23:20:59 UTC
From:
To:
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.

#1033679#10
Date:
2023-05-12 03:38:24 UTC
From:
To:
Hi Pascal,

Pascal Hambourg <pascal@plouf.fr.eu.org> (2023-03-30):

Thanks for doing so. It's been on my todo list for a while but I'm
little concerned about the risk/benefit ratio at this stage; we can
consider those for inclusion at the beginning of the next development
cycle.


Cheers,