]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: xhci: Add port test modes support for usb2.
authorGuoqing Zhang <guoqing.zhang@intel.com>
Fri, 7 Apr 2017 14:56:54 +0000 (17:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 10:17:40 +0000 (12:17 +0200)
commit0f1d832ed1fb9527a4cc5fcb8511e85fd0a85185
tree5c597054f52b31cb69971d0bd4393a03d25be646
parent26bba5c767de6724f330cdc2ad28bb783674f5a0
usb: xhci: Add port test modes support for usb2.

For usb2 ports, the port test mode Test_J_State, Test_K_State,
Test_Packet, Test_SE0_NAK and Test_Force_En can be enabled
as described in usb2 spec.

USB2 test mode is a required hardware feature for system integrators
validating their hardware according to USB spec, regarding signal
strength and stuff. It is purely a hardware test feature.

Usually you need an oscilloscope and have to enable those test modes on
the hardware. This will send some specific test patterns on D+/D-. There
is no report available (in Linux itself) as it is purely externally
visible. Regular USB usage is not possible at that time.
Anyone (well access to e.g. /dev/bus/usb/001/001 provided) can use it by
sending appropriate USB_PORT_FEAT_TEST requests to the hub.

[Add better commit message by Alexander Stein  -Mathias]
Signed-off-by: Guoqing Zhang <guoqing.zhang@intel.com>
Cc: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-hub.c
drivers/usb/host/xhci.h