Skip to content

Commit fa06920

Browse files
mina86Felipe Balbi
authored andcommitted
usb: gadget: Remove File-backed Storage Gadget (g_file_storage).
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 <mina86@mina86.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Felipe Balbi <balbi@ti.com>
1 parent 77614e0 commit fa06920

7 files changed

Lines changed: 12 additions & 3696 deletions

File tree

‎Documentation/DocBook/gadget.tmpl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ than a kernel driver.
671671
<para>There's a USB Mass Storage class driver, which provides
672672
a different solution for interoperability with systems such
673673
as MS-Windows and MacOS.
674-
That <emphasis>File-backed Storage</emphasis> driver uses a
674+
That <emphasis>Mass Storage</emphasis> driver uses a
675675
file or block device as backing store for a drive,
676676
like the <filename>loop</filename> driver.
677677
The USB host uses the BBB, CB, or CBI versions of the mass

‎Documentation/usb/mass-storage.txt‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020

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

2727
* Module parameters
2828

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

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

212211
1. In FSG the “removable” and “cdrom” module parameters set the flag
213212
for all logical units whereas in MSG they accept a list of y/n

‎drivers/usb/gadget/Kconfig‎

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -721,31 +721,6 @@ config USB_FUNCTIONFS_GENERIC
721721
Include a configuration with the Function Filesystem alone with
722722
no Ethernet interface.
723723

724-
config USB_FILE_STORAGE
725-
tristate "File-backed Storage Gadget (DEPRECATED)"
726-
depends on BLOCK
727-
help
728-
The File-backed Storage Gadget acts as a USB Mass Storage
729-
disk drive. As its storage repository it can use a regular
730-
file or a block device (in much the same way as the "loop"
731-
device driver), specified as a module parameter.
732-
733-
Say "y" to link the driver statically, or "m" to build a
734-
dynamically linked module called "g_file_storage".
735-
736-
NOTE: This driver is deprecated. Its replacement is the
737-
Mass Storage Gadget.
738-
739-
config USB_FILE_STORAGE_TEST
740-
bool "File-backed Storage Gadget testing version"
741-
depends on USB_FILE_STORAGE
742-
default n
743-
help
744-
Say "y" to generate the larger testing version of the
745-
File-backed Storage Gadget, useful for probing the
746-
behavior of USB Mass Storage hosts. Not needed for
747-
normal operation.
748-
749724
config USB_MASS_STORAGE
750725
tristate "Mass Storage Gadget"
751726
depends on BLOCK
@@ -756,8 +731,8 @@ config USB_MASS_STORAGE
756731
device (in much the same way as the "loop" device driver),
757732
specified as a module parameter or sysfs option.
758733

759-
This driver is an updated replacement for the deprecated
760-
File-backed Storage Gadget (g_file_storage).
734+
This driver is a replacement for now removed File-backed
735+
Storage Gadget (g_file_storage).
761736

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

‎drivers/usb/gadget/Makefile‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ g_ether-y := ether.o
4444
g_serial-y := serial.o
4545
g_midi-y := gmidi.o
4646
gadgetfs-y := inode.o
47-
g_file_storage-y := file_storage.o
4847
g_mass_storage-y := mass_storage.o
4948
g_printer-y := printer.o
5049
g_cdc-y := cdc2.o
@@ -62,7 +61,6 @@ obj-$(CONFIG_USB_AUDIO) += g_audio.o
6261
obj-$(CONFIG_USB_ETH) += g_ether.o
6362
obj-$(CONFIG_USB_GADGETFS) += gadgetfs.o
6463
obj-$(CONFIG_USB_FUNCTIONFS) += g_ffs.o
65-
obj-$(CONFIG_USB_FILE_STORAGE) += g_file_storage.o
6664
obj-$(CONFIG_USB_MASS_STORAGE) += g_mass_storage.o
6765
obj-$(CONFIG_USB_G_SERIAL) += g_serial.o
6866
obj-$(CONFIG_USB_G_PRINTER) += g_printer.o

0 commit comments

Comments
 (0)