[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1410071510030.1504-100000@iolanthe.rowland.org>
Date: Tue, 7 Oct 2014 15:16:13 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Felipe Balbi <balbi@...com>
cc: Krzysztof Opasiak <k.opasiak@...sung.com>,
'Robert Baldyga' <r.baldyga@...sung.com>,
<gregkh@...uxfoundation.org>, <linux-usb@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <mina86@...a86.com>,
<andrzej.p@...sung.com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists