Pascal Hambourg <pascal@plouf.fr.eu.org> (2023-03-05):
I am afraid that when the firmware is missing the driver is not
attached to the device so there is no direct way to retrieve it
through /sys.
Alright, nice to know which part of the lookup was failing anyway
(single 2-4:1.0 below 2-4, but missing driver symlink).
An indirect way may be to list loaded USB driver modules in
/sys/bus/usb/drivers or /proc/modules and search in their firmware
fields with modinfo ? Heavy and not 100% reliable though...
Since the existing code seems to work in at least some cases, it
wouldn't seem crazy to me to implement a fallback plan in case it
doesn't (as opposed to replacing the existing lookup entirely). After
all, we're quite certain that reloading usb* isn't going to work anyway,
so anything else we can try can't really be worse.