Skip to content

Commit

Permalink
usb: gadget: Remove File-backed Storage Gadget (g_file_storage).
Browse files Browse the repository at this point in the history
The File-backed Storage Gadget (g_file_storage) gadget has been replaced
with Mass Storage Gadget (g_mass_storage) which uses the composite
framework.  This commit removes g_file_storage (and most references to it).

Signed-off-by: Michal Nazarewicz <[email protected]>
Acked-by: Alan Stern <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
  • Loading branch information
mina86 authored and Felipe Balbi committed Nov 8, 2012
1 parent 77614e0 commit fa06920
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 3,696 deletions.
2 changes: 1 addition & 1 deletion Documentation/DocBook/gadget.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ than a kernel driver.
<para>There's a USB Mass Storage class driver, which provides
a different solution for interoperability with systems such
as MS-Windows and MacOS.
That <emphasis>File-backed Storage</emphasis> driver uses a
That <emphasis>Mass Storage</emphasis> driver uses a
file or block device as backing store for a drive,
like the <filename>loop</filename> driver.
The USB host uses the BBB, CB, or CBI versions of the mass
Expand Down
15 changes: 7 additions & 8 deletions Documentation/usb/mass-storage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

This document describes how to use the gadget from user space, its
relation to mass storage function (or MSF) and different gadgets
using it, and how it differs from File Storage Gadget (or FSG). It
will talk only briefly about how to use MSF within composite
gadgets.
using it, and how it differs from File Storage Gadget (or FSG)
(which is no longer included in Linux). It will talk only briefly
about how to use MSF within composite gadgets.

* Module parameters

Expand Down Expand Up @@ -198,16 +198,15 @@
The Mass Storage Function and thus the Mass Storage Gadget has been
based on the File Storage Gadget. The difference between the two is
that MSG is a composite gadget (ie. uses the composite framework)
while file storage gadget is a traditional gadget. From userspace
while file storage gadget was a traditional gadget. From userspace
point of view this distinction does not really matter, but from
kernel hacker's point of view, this means that (i) MSG does not
duplicate code needed for handling basic USB protocol commands and
(ii) MSF can be used in any other composite gadget.

Because of that, File Storage Gadget has been deprecated and
scheduled to be removed in Linux 3.8. All users need to transition
to the Mass Storage Gadget by that time. The two gadgets behave
mostly the same from the outside except:
Because of that, File Storage Gadget has been removed in Linux 3.8.
All users need to transition to the Mass Storage Gadget. The two
gadgets behave mostly the same from the outside except:

1. In FSG the “removable” and “cdrom” module parameters set the flag
for all logical units whereas in MSG they accept a list of y/n
Expand Down
29 changes: 2 additions & 27 deletions drivers/usb/gadget/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -721,31 +721,6 @@ config USB_FUNCTIONFS_GENERIC
Include a configuration with the Function Filesystem alone with
no Ethernet interface.

config USB_FILE_STORAGE
tristate "File-backed Storage Gadget (DEPRECATED)"
depends on BLOCK
help
The File-backed Storage Gadget acts as a USB Mass Storage
disk drive. As its storage repository it can use a regular
file or a block device (in much the same way as the "loop"
device driver), specified as a module parameter.

Say "y" to link the driver statically, or "m" to build a
dynamically linked module called "g_file_storage".

NOTE: This driver is deprecated. Its replacement is the
Mass Storage Gadget.

config USB_FILE_STORAGE_TEST
bool "File-backed Storage Gadget testing version"
depends on USB_FILE_STORAGE
default n
help
Say "y" to generate the larger testing version of the
File-backed Storage Gadget, useful for probing the
behavior of USB Mass Storage hosts. Not needed for
normal operation.

config USB_MASS_STORAGE
tristate "Mass Storage Gadget"
depends on BLOCK
Expand All @@ -756,8 +731,8 @@ config USB_MASS_STORAGE
device (in much the same way as the "loop" device driver),
specified as a module parameter or sysfs option.

This driver is an updated replacement for the deprecated
File-backed Storage Gadget (g_file_storage).
This driver is a replacement for now removed File-backed
Storage Gadget (g_file_storage).

Say "y" to link the driver statically, or "m" to build
a dynamically linked module called "g_mass_storage".
Expand Down
2 changes: 0 additions & 2 deletions drivers/usb/gadget/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ g_ether-y := ether.o
g_serial-y := serial.o
g_midi-y := gmidi.o
gadgetfs-y := inode.o
g_file_storage-y := file_storage.o
g_mass_storage-y := mass_storage.o
g_printer-y := printer.o
g_cdc-y := cdc2.o
Expand All @@ -62,7 +61,6 @@ obj-$(CONFIG_USB_AUDIO) += g_audio.o
obj-$(CONFIG_USB_ETH) += g_ether.o
obj-$(CONFIG_USB_GADGETFS) += gadgetfs.o
obj-$(CONFIG_USB_FUNCTIONFS) += g_ffs.o
obj-$(CONFIG_USB_FILE_STORAGE) += g_file_storage.o
obj-$(CONFIG_USB_MASS_STORAGE) += g_mass_storage.o
obj-$(CONFIG_USB_G_SERIAL) += g_serial.o
obj-$(CONFIG_USB_G_PRINTER) += g_printer.o
Expand Down
Loading

0 comments on commit fa06920

Please sign in to comment.