lkml.org 
[lkml]   [2014]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb: gadget: f_fs: add "zombie" mode
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



\
 
 \ /
  Last update: 2014-10-07 22:01    [W:0.453 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site