On Sat, 11 Jun 2011, Felipe Balbi wrote: > Hi, > > On Fri, Jun 10, 2011 at 05:49:31PM -0400, Alan Stern wrote: > > > I don't really remember that, so I might have missed. OTOH, composite.c > > > is fairly simple and the only gadget driver not using it is > > > file_storage.c, but having a f_msc.c wouldn't hurt. > > > > We already have f_mass_storage.c. There are two different versions of > > the storage gadget: my original standalone driver and Michal's > > adaptation to the composite framework. Are you suggesting that I bite > > the bullet and withdraw g_file_storage? > > I'm suggesting that we don't need two implementations for the same > thing, see that when g_ether was converted to composite.c, its functions > were phased out to f_ecm.c, f_ether.c and f_subset.c and the old ether.c > became just a simple layer to tie things up together. > > Why was g_file_storage done differently, I don't know ;-) I know, because it was at my request. :-) During the initial development of f_mass_storage I didn't want to eliminate a working driver in favor of one that was still buggy and under development. Also, there must be a lot of people and distributions using g_file_storage now; doing what you suggest would force them to change over to g_mass_storage. Not too difficult (as the drivers are highly compatible), but also not something to be done very quickly. > > > keep reading. The idea is to move the otg notifier to be a UDC notifier. > > > Most of the notifications are from the gadget anyway: Suspend, Resume, > > > Enumerated with xxx mA configuration, etc. > > > > But what does this have to do with all the inline operations in > > gadget.h? For example, what is the connection between otg notifiers > > and usb_ep_enable()? > > Well, I'm not sure adding a notification to all those inlines will be > nice. But that's up to interpretation. I'm still confused. Why do you want to get rid of _all_ the inlines in gadget.h just so you can add notifications to _some_ of them? And why does adding a notification to an inline function call require getting rid of the inline? > Back at Nokia we would unmount the eMMC partition in order to export via > mass storage. Many people have asked me to put something similar to what > you're describing here, never got to do it :-p And a good thing, too... Leaving a filesystem mounted while exporting via mass storage leads to filesystem corruption. > If you want simultaneous access to the media via USB and via the device > itself, you should be using something like MTP instead. Indeed. Or else switch to a USB-based network connection and a proper file server, like Samba or NFS. 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