Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Kernel 3.5 introduces:

This release includes a driver for using an IEEE-1394 connection as a SCSI transport. This enables to expose SCSI devices to other nodes on the Firewire bus, for example hard disk drives. It's a similar functionality to Firewire Target Disk Mode on many Apple computers.

This release also adds a usb-gadget driver that does the same with USB. The driver supports two USB protocols are supported that is BBB or BOT (Bulk Only Transport) and UAS (USB Attached SCSI). BOT is advertised on alternative interface 0 (primary) and UAS is on alternative interface 1. Both protocols can work on USB 2.0 and USB 3.0. UAS utilizes the USB 3.0 feature called streams support.

http://kernelnewbies.org/Linux_3.5

I have an Arch Linux with kernel 3.5.3-1 and wanna try out this feature.

share|improve this question
    
Have a look at SCST and libusb-gadget (last updated 3 years ago), which might be useful. –  harrymc Sep 2 '12 at 17:35

2 Answers 2

Frome the code under that message, you can see the patches. The one relevant for you is:

--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -798,6 +798,16 @@ config USB_MASS_STORAGE
          Say "y" to link the driver statically, or "m" to build
          a dynamically linked module called "g_mass_storage".

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

This illustrates that USB_GADGET_TARGET has been added, if you enable this option in your kernel and recompile / reinstall the kernel then you will be able to use target mode in linux with USB. Note that you have to enable TARGET_CORE as well.

More information can be found at:

share|improve this answer

FireWire is a peer-to-peer architecture, so all that is required for a PC to pretend to be a hard disk is some software.

USB, on the other hand, has a strict distinction between the host (the PC) and devices. Whether your hardware can run as a host or as a device (or both, in the case of USB-On-The-Go) depends on what your USB interface chip was designed to do.

Linux runs on both PCs and on devices, so it has drivers for both kinds of USB interfaces. However, all the "USB Gadget" drivers require that the interface chip supports device mode, and none of the controllers built into PCs do.

Your only chance to run this code would be to use some embedded device, like a router, a NAS box, or a phone.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.