Skip to content

Commit

Permalink
USB: g_mass_storage: Mass Storage Function created
Browse files Browse the repository at this point in the history
The f_mass_storage.c has been changed into a composite function.
mass_storage.c file has been introduced which defines a
g_mass_storage gadget based on composite framework.

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Michal Nazarewicz authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent 6648f29 commit d23b0f0
Show file tree
Hide file tree
Showing 6 changed files with 426 additions and 500 deletions.
18 changes: 18 additions & 0 deletions drivers/usb/gadget/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,24 @@ config USB_FILE_STORAGE_TEST
behavior of USB Mass Storage hosts. Not needed for
normal operation.

config USB_MASS_STORAGE
tristate "Mass Storage Gadget"
depends on BLOCK
help
The Mass 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 or sysfs option.

This is heavily based on File-backed Storage Gadget and in most
cases you will want to use FSG instead. This gadget is mostly
here to test the functionality of the Mass Storage Function
which may be used with composite framework.

Say "y" to link the driver statically, or "m" to build
a dynamically linked module called "g_file_storage". If unsure,
consider File-backed Storage Gadget.

config USB_G_SERIAL
tristate "Serial Gadget (with CDC ACM and CDC OBEX support)"
help
Expand Down
2 changes: 2 additions & 0 deletions drivers/usb/gadget/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ g_serial-objs := serial.o
g_midi-objs := gmidi.o
gadgetfs-objs := inode.o
g_file_storage-objs := file_storage.o
g_mass_storage-objs := mass_storage.o
g_printer-objs := printer.o
g_cdc-objs := cdc2.o

Expand All @@ -47,6 +48,7 @@ obj-$(CONFIG_USB_AUDIO) += g_audio.o
obj-$(CONFIG_USB_ETH) += g_ether.o
obj-$(CONFIG_USB_GADGETFS) += gadgetfs.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
obj-$(CONFIG_USB_MIDI_GADGET) += g_midi.o
Expand Down
Loading

0 comments on commit d23b0f0

Please sign in to comment.