Re: loading firmware while usermodehelper disabled.

From: Matthew Garrett
Date: Sat Dec 31 2011 - 15:15:58 EST

On Sat, Dec 31, 2011 at 11:29:56AM -0800, Linus Torvalds wrote:

> But what the driver *should* be doing is to load the firmware at
> device open time (NOT at "driver load time" - because that can and
> does happen too early too, for the case of built-in drivers!) and
> simply keep the firmware around in the case of a suspend/resume event,
> so that it doesn't have to re-load it off a disk (or network, or
> whatever) that hasn't been resumed yet!

That doesn't work for the isight firmware loader - there's nothing for
userspace to open until the device has had the firmware loaded, at which
point it detaches and reattaches as a UVC device. The code could be
merged into the UVC driver and a fake v4l device exposed, but even then
you'd still need to deal with the underlying usb_device suddenly
changing under you.

So for this specific case, I'd like to track down why the behaviour has
changed - if the device was previously maintaining state over suspend
and now isn't then that's something that's broken, but if it's just that
some ordering has changed and now it's losing a race, I'll need to fix
it in the driver. One option would be to do away with the kernelspace
loader entirely and push it out to a udev helper, or alternatively just
have the driver stash the firmware all the time.

Matthew Garrett | mjg59@xxxxxxxxxxxxx
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at