Thread (91 messages) read the whole thread 91 messages, 15 authors, 2012-01-03

Re: loading firmware while usermodehelper disabled.

From: Oliver Neukum <oliver@neukum.org>
Date: 2012-01-02 08:33:41
Also in: lkml

Am Sonntag, 1. Januar 2012, 22:39:13 schrieb Michael Büsch:
These change-id-on-bootstrap devices usually work like this,
as far as I know:

probe bootstrap device (switches hw to real device)
And you will find no driver if the firmware is uploaded in user space.
udev runs a firmware loader that uses libusb. usb_modeswitch
presents you with the same problem.
probe real device (firmware is loaded)
The real driver will often be generic and have no idea the device
needs firmware to turn it into a functional generic device. And we really don't
want to contaminate the generic drivers with that information.

So we'd need

a) kernel infrastructure to track "shadow" drivers for firmware upload
b) a heuristic to decide when a device underwent a virtual replug
Suspend machine
Resume machine
usb detects that the device is "gone"
probe/resume bootstrap device (switches hw to real device)
We need a way to verify this is really the device which we need firmware
for.
probe/resume real device (No need to fetch fw from userspace. It's already cached)
Now we need to wait for the firmware upload to take effect. How long?
And we need to hold off telling the driver that its device was disconnected. 
What did I get wrong?
In addition you now need logic to tell the "shadow" drivers that a device
is gone so that they can free the firmware. Oh and of course you will need
to refcount firmware (but we probably need to do that anyway)

	Regards
		Oliver
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help