[PATCH 3/3] add spec for the usb_gadget

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

 



|root@squsb:~# mount a -t configfs /sys/kernel/config
|root@squsb:~# modprobe dummy_hcd
|root@squsb:~# targetcli
|Welcome to the targetcli shell:
|
| Copyright (c) 2011 by RisingTide Systems LLC.
|
|Visit us at http://www.risingtidesystems.com.
|
|Can't load fabric module qla2xxx.
|Can't load fabric module ib_srpt.
|Loaded iscsi_target_mod kernel module.
|Created '/sys/kernel/config/target/iscsi'.
|Done loading iscsi fabric module.
|Created '/sys/kernel/config/target/loopback'.
|Done loading loopback fabric module.
|Can't load fabric module tcm_fc.
|Created '/sys/kernel/config/target/usb_gadget'.
|Done loading usb_gadget fabric module.
|
|/backstores/rd_mcp> create disk 256M
|Generating a wwn serial.
|Created rd_mcp ramdisk disk with size 256M.
|Entering new node /backstores/rd_mcp/disk
|
|/usb_gadget> create
|Created target naa.60014052d9f751dd.
|Entering new node /usb_gadget/naa.60014052d9f751dd
|/usb_gadget/n...14052d9f751dd> cd luns
|/usb_gadget/n...d9f751dd/luns> create /backstores/rd_mcp/disk
|Selected LUN 0.
|Successfully created LUN 0.
|Entering new node /usb_gadget/naa.60014052d9f751dd/luns/lun0
|/usb_gadget/n...1dd/luns/lun0>
|/usb_gadget/n...1dd/luns/lun0> cd ..
|/usb_gadget/n...d9f751dd/luns> cd ..
|/usb_gadget/n...14052d9f751dd> disable
|The TPGT has been disabled.
|/usb_gadget/n...14052d9f751dd> enable
|The TPGT has been enabled.

after that on the host side:

|[  227.097768] usb 1-1: configuration #1 chosen from 1 choice
|[  227.100157]  gadget: high-speed config #1: Linux Target
|[  227.102934] Using the BOT protocol
|[  227.115756] Using the UAS protocol
|[  227.121483] scsi1 : uas
|[  227.128314] scsi 1:0:0:0: Direct-Access     LIO-ORG  RAMDISK-MCP      4.0  PQ: 0 ANSI: 5 TAG: 1
|[  227.164322] sd 1:0:0:0: [sda] 524288 512-byte logical blocks: (268 MB/256 MiB)
|[  227.204283] sd 1:0:0:0: [sda] Write Protect is off
|[  227.204904] sd 1:0:0:0: [sda] Mode Sense: 2f 00 00 00
|[  227.220285] sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
|[  227.300319]  sda: unknown partition table
|[  227.376286] sd 1:0:0:0: [sda] Attached SCSI disk

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
 specs/usb_gadget.spec |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 specs/usb_gadget.spec

diff --git a/specs/usb_gadget.spec b/specs/usb_gadget.spec
new file mode 100644
index 0000000..e01d09b
--- /dev/null
+++ b/specs/usb_gadget.spec
@@ -0,0 +1,21 @@
+# The USB-gadget fabric module specification
+#
+# This file is part of RTSLib Community Edition.
+# Copyright (c) 2011 by RisingTide Systems LLC
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, version 3 (AGPLv3).
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+features = nexus
+wwn_type = naa
+kernel_module = tcm_usb_gadget
+configfs_group = "usb_gadget"
-- 
1.7.8.3

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux