Re: [PATCH] [Storage] Most data moved to fsg_common

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

 



On Fri, 18 Sep 2009, Michal‚ Nazarewicz wrote:
I would also like to ask, how you see solving a problem
of killing the kernel thread MSF is using.  [...]

On Mon, 21 Sep 2009 16:25:09 +0200, Alan Stern wrote:
I don't understand this question.  Obviously the gadget can't
work if the kernel thread is killed.  So why is it a problem?

I was thinking about creating a callback function from
MSF back to gadget that uses it which is called when
thread exists.  [...]

Also, in case of simple gadgets like MSG decision how to
proceed is probably simple -- [...] unregister itself but
what more complicated gadgets shall do, ie. gadgets which
have MSF in only one configuration or where MSF is only
one of it's functionality?

Why do you need to do anything besides unregistering the
gadget/function?  In theory you don't even need to do that much, but
it makes things a little cleaner from the host's point of view.

I've been thinking whether doing some stuff like disabling some of
(the interfaces) in USB configuration(s) gadget provides so the rest
of the gadget would be functional.  Also, the thread could be
restarted.  Or, instead of exiting after receiving signal, thread
could close all backing files.

Anyways, the question is no longer valid as I've figured that since
the thread is killed during shutdown process doing anything fancy
makes little sense anyways, so I sticked with unregistering the
driver.


I have already created patch which adds a callback function to MSF
so that when thread finishes gadget is notified and can unregister
the driver. I'm currently preparing the final version of the whole
patchset and hope to submit it soon. :)

--
Best regards,                                           _     _
 .o. | Liege of Serenely Enlightened Majesty of       o' \,=./ `o
 ..o | Computer Science,  Michał "mina86" Nazarewicz     (o o)
 ooo +---<mina86@xxxxxxxxxx>---<mina86@xxxxxxxxxx>---ooO--(_)--Ooo--

--
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