Re: Question regarding Linux file storage gadget.

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

 



On Tue, 09 Aug 2011 16:40:22 +0200, B.Vinai Kumar <vinaibangala2001@xxxxxxxxx> wrote:
I'm using 'Linux file storage' gadget and exposing a RAM partition as
backing storage. After enumeration on the Host PC if any user copies a
file to the exposed partition, I would like to detect when this
copying is completed on Linux File Storage Gadget.

If I know this completion, I would like to process this file.

This cannot be done easily with File Storage Gadget the way you described.

Furthermore, you must not mount the RAM partition on both the device and host at the same time, ie. if FSG uses a device, nothing else should use it (or you
risk cache inconsistencies and corruptions).

What you can do is simulate a removable media and make host eject the device once the transfer is completed. On device side, when eject request is detected
you'd do all the processing you want.  Once the processing is done, you can
“insert” the medium again so that host can read the result or what not. Mass storage function has a callback that is called once eject is processed so you
can hack something around it.

--
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michal "mina86" Nazarewicz    (o o)
ooo +-----<email/xmpp: mnazarewicz@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