[PATCH] USB gadget: add File-backed Storage Gadget (FSG)
(From Alan Stern.) The File-backed Storage Gadget provides support for the USB Mass Storage protocol. It causes a gadget to appear to the host as a USB disk drive, using a regular file or a block device to provide the necessary storage somewhat like the "loop" device. The driver supports up to 8 Logical Units, appearing to the host as multiple disks, each configurable independently for read-write or read-only access. The settings for the Logical Units are available through sysfs attribute files. The driver has a testing version, selectable by a kernel configuration option. The test version includes many additional module parameters, allowing the USB protocol, subclass, vendor, product, and release values to be set. It also has an option to emulate removable media, and the sysfs interface allows the backing files and the read-only settings to be switched on-the-fly. In both versions several logging and debugging levels are available. They provide a nice way of seeing exactly what commands a USB host is sending to the gadget.
Showing
This source diff could not be displayed because it is too large. You can view the blob instead.
Please register or sign in to comment