On Mon, 21 Mar 2011, Barnes, Clifton A. wrote: > I'm actually using this function along with a command channel > using g_multi. > > Is there a way to just shut off the mass storage > part while still keeping the command channel active? No. Although you could perhaps tell the host to eject the mass-storage medium. Once the host is no longer accessing it, the gadget could safely mount it. > And naturally, to enable it again with a particular command? > > Or, do I need to load two separate modules one with command > and mass storage and the other just command and switch > between? The gadget can't switch like that. In theory the host could, but why bother when you can get the same effect by having the host do an eject? > >> Is there a way to notify the VFS that the file system has > >> changed? > > > Not while the host is using it. You must unmount the filesystem > > on the gadget before exporting it to the host, and don't mount > > it again until the gadget has been disconnected from the host. > > Is it possible to shut down the mass storage part as stated above > and be able to unmount the file system or will it be considered in > use as long as g_multi is loaded? It is in use as long as it is the backing medium for the storage gadget. > >> Is there a better way to share a file system between Windows and > >> the device? > > > Yes. Don't use a mass-storage gadget. Instead use a networking > > gadget like g_ether, and start up a filesharing server like Samba. > > After all, that's what you want -- you want to share the files. > > It's desirable to have the partition appear just like a flash drive > when connected to the Windows PC with no software or drivers > having to be installed. File sharing is supported by default under Windows, isn't it? 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