linux/Documentation/ABI/testing
Pratyush Anand ce21bfe603 USB: Add LVS Test device driver
OTG3 and EH Compliance Plan 1.0 talks about Super Speed OTG Verification
system (SS-OVS) which consists of an excersizer and analyzer.

USB Compliance Suite from Lecroy or Ellisys can act as such SS-OVS for
Link Layer Validation (LVS).

Some modifications are needed for an embedded Linux USB host to pass all
these tests.  Most of these tests require just Link to be in U0. They do
not work with default Linux USB stack since, default stack does port
reset and then starts sending setup packet, which is not expected by
Link Layer Validation (LVS) device of Lecroy Compliance Suit.  Then,
There are many Link Layer Tests which need host to generate specific
traffic.

This patch supports specific traffic generation cases. As of now all the
host Lecroy Link Layer-USBIF tests (except TD7.26) passes
with this patch for single run using  Lecroy USB Compliance Suite
Version 1.98 Build 239 and Lecroy USB Protocol Analyzer version 4.80
Build 1603. Therefore patch seems to be a good candidate for inclusion.
Further modification can be done on top of it.

lvstest driver will not bind to any device by default. It can bind
manually to a super speed USB host controller root hub. Therefore, regular
hub driver must be unbound before this driver is bound. For example, if
2-0:1.0 is the xhci root hub, then execute following to unbind hub driver.

 echo 2-0:1.0 > /sys/bus/usb/drivers/hub/unbind

Then write Linux Foundation's vendor ID which is used by root hubs and
SS root hub's device ID into new_id file. Writing IDs into new_id file
will also bind the lvs driver with any available SS root hub interfaces.

 echo "1D6B 3" > /sys/bus/usb/drivers/lvs/new_id

Now connect LVS device with root hub port.

Test case specific traffic can be generated as follows whenever needed:

1. To issue "Get Device descriptor" command for TD.7.06:
 echo  > /sys/bus/usb/devices/2-0\:1.0/get_dev_desc

2. To set U1 timeout to 127 for TD.7.18
 echo 127 > /sys/bus/usb/devices/2-0\:1.0/u1_timeout

3. To set U2 timeout to 0 for TD.7.18
 echo 0 > /sys/bus/usb/devices/2-0\:1.0/u2_timeout

4. To issue "Hot Reset" for TD.7.29
 echo  > /sys/bus/usb/devices/2-0\:1.0/hot_reset

5. To issue "U3 Entry" for TD.7.35
 echo  > /sys/bus/usb/devices/2-0\:1.0/u3_entry

6. To issue "U3 Exit" for TD.7.36
 echo  > /sys/bus/usb/devices/2-0\:1.0/u3_exit

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-17 17:11:09 -07:00
..
configfs-spear-pcie-gadget
configfs-usb-gadget usb: gadget: configfs: OS Extended Properties descriptors support 2014-05-14 09:39:51 -05:00
configfs-usb-gadget-acm Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-ecm Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-eem Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-ffs Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-loopback Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-mass-storage Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-ncm Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-obex Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-phonet Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-rndis Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-serial Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-sourcesink Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
configfs-usb-gadget-subset Documentation: fix multiple typo occurences s/KenelVersion/KernelVersion/ 2014-01-29 16:22:40 -08:00
debugfs-driver-genwqe GenWQE Debugfs interfaces 2013-12-18 16:51:15 -08:00
debugfs-ec
debugfs-ideapad
debugfs-olpc
debugfs-pfo-nx-crypto
debugfs-pktcdvd
dev-kmsg
evm
ima_policy ima: audit log files opened with O_DIRECT flag 2014-06-03 14:21:50 -05:00
procfs-diskstats
pstore
sysfs-ata
sysfs-block
sysfs-block-bcache
sysfs-block-dm
sysfs-block-rssd
sysfs-block-zram zram: make compression algorithm selection possible 2014-04-07 16:36:01 -07:00
sysfs-bus-acpi
sysfs-bus-bcma
sysfs-bus-css
sysfs-bus-event_source-devices-events powerpc/perf: Make some new raw event codes available in sysfs 2014-03-24 09:48:23 +11:00
sysfs-bus-event_source-devices-format
sysfs-bus-event_source-devices-hv_24x7 powerpc/perf/hv_{gpci, 24x7}: Add documentation of device attributes 2014-03-24 09:48:33 +11:00
sysfs-bus-event_source-devices-hv_gpci powerpc/perf/hv_{gpci, 24x7}: Add documentation of device attributes 2014-03-24 09:48:33 +11:00
sysfs-bus-fcoe
sysfs-bus-hsi
sysfs-bus-i2c-devices-fsa9480
sysfs-bus-i2c-devices-hm6352
sysfs-bus-i2c-devices-lm3533
sysfs-bus-iio iio: Add ABI documentation for illuminance 2014-05-03 11:45:26 +01:00
sysfs-bus-iio-frequency-ad9523
sysfs-bus-iio-frequency-adf4350
sysfs-bus-iio-light-lm3533-als
sysfs-bus-iio-mpu6050
sysfs-bus-iio-proximity-as3935 iio: Add AS3935 lightning sensor support 2014-03-16 18:00:32 +00:00
sysfs-bus-mdio net: phy: expose phydev->has_fixups to sysfs 2014-02-12 19:08:49 -05:00
sysfs-bus-media
sysfs-bus-mei
sysfs-bus-pci Merge branches 'pci/hotplug', 'pci/pci_is_bridge' and 'pci/virtualization' into next 2014-05-28 16:21:07 -06:00
sysfs-bus-pci-devices-cciss
sysfs-bus-pci-drivers-ehci_hcd
sysfs-bus-rbd rbd: add support for single-major device number allocation scheme 2013-12-31 20:31:59 +02:00
sysfs-bus-rpmsg
sysfs-bus-umc
sysfs-bus-usb usb: core: allow a reference device for new_id 2014-01-10 16:54:35 -08:00
sysfs-bus-usb-devices-usbsevseg
sysfs-bus-usb-lvstest USB: Add LVS Test device driver 2014-07-17 17:11:09 -07:00
sysfs-c2port
sysfs-cfq-target-latency
sysfs-class
sysfs-class-backlight-driver-adp8870
sysfs-class-backlight-driver-lm3533
sysfs-class-bdi
sysfs-class-devfreq
sysfs-class-extcon
sysfs-class-lcd
sysfs-class-led
sysfs-class-led-driver-lm3533
sysfs-class-mic.txt misc: mic: Enable OSPM suspend and resume support. 2013-10-05 18:01:42 -07:00
sysfs-class-mtd mtd: add MTD_MLCNANDFLASH case for mtd_type_show() 2013-10-27 16:27:06 -07:00
sysfs-class-net net: sysfs: add missing phys_port_id documentation 2014-05-26 01:01:47 -04:00
sysfs-class-net-batman-adv batman-adv: update email address for Marek Lindner 2013-10-19 14:53:48 +02:00
sysfs-class-net-cdc_ncm net: cdc_ncm: document the sysfs API 2014-06-02 16:01:31 -07:00
sysfs-class-net-grcan
sysfs-class-net-mesh batman-adv: Modified forwarding behaviour for multicast packets 2014-03-22 09:18:57 +01:00
sysfs-class-net-queues net: sysfs: add documentation entries for /sys/class/<iface>/queues 2014-05-26 01:01:47 -04:00
sysfs-class-net-statistics net: sysfs: document /sys/class/net/statistics/* 2014-05-26 01:02:20 -04:00
sysfs-class-pktcdvd
sysfs-class-power
sysfs-class-powercap PowerCap: Documentation 2013-10-17 00:36:06 +02:00
sysfs-class-pwm
sysfs-class-rc [media] rc: add wakeup_protocols sysfs file 2014-03-11 13:28:20 -03:00
sysfs-class-regulator
sysfs-class-rtc-rtc0-device-rtc_calibration
sysfs-class-scsi_host [SCSI] hpsa: allow user to disable accelerated i/o path 2014-03-15 10:19:07 -07:00
sysfs-class-uwb_rc
sysfs-class-uwb_rc-wusbhc
sysfs-dev
sysfs-devices
sysfs-devices-edac
sysfs-devices-firmware_node
sysfs-devices-lpss_ltr
sysfs-devices-memory
sysfs-devices-mmc
sysfs-devices-online
sysfs-devices-platform-_UDC_-gadget
sysfs-devices-platform-docg3
sysfs-devices-platform-sh_mobile_lcdc_fb
sysfs-devices-power PM / wakeup: Correct presence vs. emptiness of wakeup_* attributes 2014-04-07 14:18:24 +02:00
sysfs-devices-power_resources_D0
sysfs-devices-power_resources_D1
sysfs-devices-power_resources_D2
sysfs-devices-power_resources_D3hot
sysfs-devices-power_resources_wakeup
sysfs-devices-power_state
sysfs-devices-real_power_state
sysfs-devices-resource_in_use
sysfs-devices-soc
sysfs-devices-sun
sysfs-devices-system-cpu cpufreq: Make linux-pm@vger.kernel.org official mailing list 2014-05-01 01:15:32 +02:00
sysfs-devices-system-ibm-rtl
sysfs-devices-system-xen_cpu
sysfs-driver-genwqe GenWQE Sysfs interfaces 2013-12-18 16:51:15 -08:00
sysfs-driver-hid
sysfs-driver-hid-lenovo-tpkbd
sysfs-driver-hid-logitech-lg4ff
sysfs-driver-hid-multitouch
sysfs-driver-hid-picolcd
sysfs-driver-hid-prodikeys
sysfs-driver-hid-roccat-arvo
sysfs-driver-hid-roccat-isku
sysfs-driver-hid-roccat-kone
sysfs-driver-hid-roccat-koneplus
sysfs-driver-hid-roccat-konepure
sysfs-driver-hid-roccat-kovaplus
sysfs-driver-hid-roccat-lua
sysfs-driver-hid-roccat-pyra
sysfs-driver-hid-roccat-ryos HID: roccat: add support for Ryos MK keyboards 2013-10-30 14:17:31 +01:00
sysfs-driver-hid-roccat-savu
sysfs-driver-hid-srws1
sysfs-driver-hid-wiimote HID: wiimote: add pro-controller analog stick calibration 2013-10-30 14:13:29 +01:00
sysfs-driver-intel-rapid-start
sysfs-driver-ppi
sysfs-driver-samsung-laptop
sysfs-driver-sunxi-sid ARM: sunxi: Initial support for Allwinner's Security ID fuses 2013-09-26 13:47:36 -07:00
sysfs-driver-wacom
sysfs-driver-xen-blkback
sysfs-driver-xen-blkfront
sysfs-firmware-acpi
sysfs-firmware-dmi
sysfs-firmware-efi efi: Export more EFI table variables to sysfs 2013-12-21 15:29:36 +00:00
sysfs-firmware-efi-runtime-map efi: Export EFI runtime memory mapping to sysfs 2013-12-21 15:29:36 +00:00
sysfs-firmware-gsmi
sysfs-firmware-log
sysfs-firmware-memmap
sysfs-firmware-ofw of: Make device nodes kobjects so they show up in sysfs 2014-03-11 20:48:26 +00:00
sysfs-firmware-sfi
sysfs-firmware-sgi_uv
sysfs-fs-ext4
sysfs-fs-f2fs f2fs: add missing documentation for dir_level 2014-03-20 22:10:10 +09:00
sysfs-gpio
sysfs-i2c-bmp085
sysfs-ibft
sysfs-kernel-boot_params x86: Export x86 boot_params to sysfs 2013-12-29 13:09:07 +00:00
sysfs-kernel-fscaps
sysfs-kernel-iommu_groups
sysfs-kernel-mm
sysfs-kernel-mm-hugepages
sysfs-kernel-mm-ksm
sysfs-kernel-slab
sysfs-kernel-uids
sysfs-kernel-vmcoreinfo kdump: add /sys/kernel/vmcoreinfo ABI documentation 2014-01-23 16:37:03 -08:00
sysfs-memory-page-offline
sysfs-module Use 'E' instead of 'X' for unsigned module taint flag. 2014-03-31 14:52:43 +10:30
sysfs-ocfs2
sysfs-platform-asus-laptop
sysfs-platform-asus-wmi
sysfs-platform-at91
sysfs-platform-brcmstb-gisb-arb Documentation: sysfs: add Broadcom GISB arbiter sysfs properties 2014-05-24 00:58:44 +02:00
sysfs-platform-chipidea-usb-otg Documentation: ABI: usb: sysfs Description for chipidea USB OTG HNP and SRP 2014-04-24 12:56:35 -07:00
sysfs-platform-eeepc-laptop
sysfs-platform-ideapad-laptop
sysfs-platform-kim
sysfs-platform-msi-laptop
sysfs-platform-tahvo-usb usb: omap1: Tahvo USB transceiver driver 2013-12-06 14:46:32 -06:00
sysfs-platform-ts5500
sysfs-power PM / sleep: Introduce command line argument for sleep state enumeration 2014-05-26 13:40:59 +02:00
sysfs-pps
sysfs-profiling
sysfs-ptp ptp: expose the programmable pins via sysfs 2014-03-21 14:21:14 -04:00
sysfs-tty Revert "tty: Set correct tty name in 'active' sysfs attribute" 2014-02-22 14:31:04 -08:00
sysfs-wusb_cbaf