Target based UAS + BOT gadget

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was tested with dummy_hcd on a local machine. HS, SS + stream support
works, command tagging is supported. I also got it running on my omap
board and tested against WindowsXP on HS. Yes, that means BOT is
supported. I don't think that I will include CBI (as an alternative to
BOT) as the spec says not to include it in any new design.

v1..v2:
- adding the bot protocol
- moving core around and structure it a little
- move the direction lookup table into the gadget instead of target core

The gadget is configured via configfs like the remaining part of the
target framework. This gadget has a _few_ dependencies to get everything
working including a few bug fixes in the linux UAS driver for HS or some
extensions to the target framework itself. Each patch was posted earlier here
or there. My working tree can be found at in the git repository at:

  git://git.linutronix.de/users/bigeasy/linux.git target_uas

it is Linux 3.2 based. The patch attached is against 
  git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core.git qla_tgt-3.3

It compiles. If someone wants to do some testing I suggest to use my tree
tree from above as it has all the stuff that I depend on like Greg's next,
Felipe's gadget tree and a few of my own.....

Here is my script which which I used for testing:

|#!/bin/sh
|
|#modprobe dummy_hcd is_super_speed=1
|modprobe dummy_hcd
|modprobe target_core_mod
|modprobe tcm_usb_gadget
|mount a -t configfs /sys/kernel/config
| 
|CONFIGFS=/sys/kernel/config/;
|TARGET=$CONFIGFS/target/core/
|FABRIC=$CONFIGFS/target/usb_gadget/
|
|# RD
|mkdir -p $TARGET/rd_mcp_0/ramdisk
|echo rd_pages=32768 > $TARGET/rd_mcp_0/ramdisk/control
|echo 1 > $TARGET/rd_mcp_0/ramdisk/enable
|
|# file
|mkdir -p $TARGET/fileio_0/fileio
|echo "fd_dev_name=/root/file.bin,fd_dev_size=31457280" > $TARGET/fileio_0/fileio/control
|echo 1 > $TARGET/fileio_0/fileio/enable
|
|mkdir -p $FABRIC/naa.6001405c3214b06a/tpgt_1
|mkdir $FABRIC/naa.6001405c3214b06a/tpgt_1/lun/lun_0
|mkdir $FABRIC/naa.6001405c3214b06a/tpgt_1/lun/lun_1
|echo naa.6001405c3214b06b > $FABRIC/naa.6001405c3214b06a/tpgt_1/nexus
| 
|ln -s $TARGET/rd_mcp_0/ramdisk $FABRIC/naa.6001405c3214b06a/tpgt_1/lun/lun_0/virtual_scsi_port
|ln -s $TARGET/fileio_0/fileio $FABRIC/naa.6001405c3214b06a/tpgt_1/lun/lun_1/virtual_scsi_port

later to connect the gadget:
|echo 1 > /sys/kernel/config/target/usb_gadget/naa.6001405c3214b06a/tpgt_1/enable

This setups a device with two luns.

Now I try to look at target-cli....

Sebastian

[PATCH v2] target: add usb gadget fabric module
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux