Pascal Hambourg <pas...@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. And I suppose iterating over a (uniquified) list of basename for /sys/bus/<bus>/drivers/*/module might work on more buses than just usb (see mhi for the qrtr-mhi thing in #1032140), so it should even be possible to reuse this outside this specific usb usecase. Cheers, -- Cyril Brulebois (k...@debian.org) <https://debamax.com/> D-I release manager -- Release team member -- Freelance Consultant
signature.asc
Description: PGP signature