[PATCH v6 1/4] usb: xhci: Add helper function xhci_set_power_on().

2016-11-30 Thread Guoqing Zhang
Refactoring port power on/off related code into a helper function xhci_set_power_on() which can be reused when enabling test mode. Signed-off-by: Guoqing Zhang --- drivers/usb/host/xhci-hub.c | 64 ++--- 1 file changed, 43 insertions(+), 21 deletions

[PATCH v6 2/4] usb: xhci: Add helper function xhci_disable_slot().

2016-11-30 Thread Guoqing Zhang
Refactoring slot disable related code into a helper function xhci_disable_slot() which can be used when enabling test mode. Signed-off-by: Guoqing Zhang --- drivers/usb/host/xhci.c | 49 +++-- drivers/usb/host/xhci.h | 2 ++ 2 files changed, 33

[PATCH v6 4/4] usb: xhci: Add port test modes support for usb2.

2016-11-30 Thread Guoqing Zhang
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. Signed-off-by: Guoqing Zhang --- drivers/usb/host/xhci-hub.c | 84 + drivers/usb/host/xhci.h | 2

[PATCH v6 3/4] usb: xhci: Expose xhci_start() function.

2016-11-30 Thread Guoqing Zhang
Change the visability of xhci_start() so that it can be used when enabling test mode. Signed-off-by: Guoqing Zhang --- drivers/usb/host/xhci.c | 2 +- drivers/usb/host/xhci.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c

[PATCH] USB: xhci: add port test modes support for USB2

2016-10-04 Thread Guoqing Zhang
For USB2 ports, the port test modes TEST_J_State, Test_K_State, Test_Packet and Test_SE0_NAK can be enabled as described in USB2 spec. Signed-off-by: Guoqing Zhang --- drivers/usb/host/xhci-hub.c | 55 +++-- 1 file changed, 53 insertions(+), 2 deletions