Re: [PATCH] usb: gadget: f_fs: add "zombie" mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 7 Oct 2014, Felipe Balbi wrote:

> > If the file handle was closed for abnormal reasons, we can behave like 
> > crashed firmware.  Which means, in the end, doing the same thing as in 
> > the normal-reason case -- i.e., do nothing.  In particular, don't 
> > disconnect.
> > 
> > If you want to allow for the possibility of orderly shutdown (and maybe 
> > even possible restart) of a userspace handler, the function library 
> > should first tell the kernel explicitly to disconnect.  Then function 
> > components can be changed around completely, and when everything is 
> > ready, userspace can tell the kernel to connect again.
> 
> I still feel iffy about it, but I must say I understand where you're
> coming from. It's weird to force a disconnect, sure. I guess we could

Well, it's not all that weird.  Devices disconnect automatically when
they receive a firmware update, so that they can reconnect with new
descriptors.  Much the same thing should happen if the user wants to
replace one function driver with a different one.

I guess the real idea is to give the user a choice of disconnecting or 
not.  Don't always force the whole device to disconnect when one of the 
function drivers goes away.

> accept this with a new option (just not 'zombie', perhaps no_disconnect
> :-) but only if we still have the same "delay pullups until daemon is
> running" requirement.

Seems reasonable to me.  Or something that can be adjusted while the 
library is running, as opposed to setting an option once when the 
library starts.

> /me hides

I'm out of further ideas.  What do the library designers think?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux