Skip to content

Commit c52661d

Browse files
Sebastian Andrzej SiewiorNicholas Bellinger
authored andcommitted
usb-gadget: Initial merge of target module for UASP + BOT
This fabric uses the target framework to provide a usb gadget device. This gadget supports the USB Attached SCSI Protocol (UASP) and Bulk Only Transfers (BOT or BBB). BOT is the primary interface, UAS is the alternative interface. It has been tested with dummy_hcd on HS and SS. On SS USB3 are supported. I also took my omap device and tried it there against WindowsXP. UAS implements basic command passing (i.e. read/write requests) and TASK MANAGEMENT functions are missing. I had to add a little of error recovery to BOT because Windows was issuing some strange commands and it does not complain after the gadget responded with CSW.status=1. (nab: Move to drivers/usb/gadget as per Sebastian to address legacy limitations for built-in gadget code) Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Christoph Hellwig <hch@lst.de> Cc: Greg KH <gregkh@linuxfoundation.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent d5dc28e commit c52661d

File tree

4 files changed

+2638
-0
lines changed

4 files changed

+2638
-0
lines changed

drivers/usb/gadget/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,16 @@ config USB_MASS_STORAGE
798798
Say "y" to link the driver statically, or "m" to build
799799
a dynamically linked module called "g_mass_storage".
800800

801+
config USB_GADGET_TARGET
802+
tristate "USB Gadget Target Fabric Module"
803+
depends on TARGET_CORE
804+
help
805+
This fabric is an USB gadget. Two USB protocols are supported that is
806+
BBB or BOT (Bulk Only Transport) and UAS (USB Attached SCSI). BOT is
807+
advertised on alternative interface 0 (primary) and UAS is on
808+
alternative interface 1. Both protocols can work on USB2.0 and USB3.0.
809+
UAS utilizes the USB 3.0 feature called streams support.
810+
801811
config USB_G_SERIAL
802812
tristate "Serial Gadget (with CDC ACM and CDC OBEX support)"
803813
help

drivers/usb/gadget/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ g_nokia-y := nokia.o
5252
g_webcam-y := webcam.o
5353
g_ncm-y := ncm.o
5454
g_acm_ms-y := acm_ms.o
55+
g_tcm_usb_gadget-y := tcm_usb_gadget.o
5556

5657
obj-$(CONFIG_USB_ZERO) += g_zero.o
5758
obj-$(CONFIG_USB_AUDIO) += g_audio.o
@@ -71,3 +72,4 @@ obj-$(CONFIG_USB_G_NOKIA) += g_nokia.o
7172
obj-$(CONFIG_USB_G_WEBCAM) += g_webcam.o
7273
obj-$(CONFIG_USB_G_NCM) += g_ncm.o
7374
obj-$(CONFIG_USB_G_ACM_MS) += g_acm_ms.o
75+
obj-$(CONFIG_USB_GADGET_TARGET) += tcm_usb_gadget.o

0 commit comments

Comments
 (0)