Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: ehci: using wIndex + 1 for hub port

The roothub's index per controller is from 0, but the hub port index per hub
is from 1, this patch fixes "can't find device at roohub" problem for connecting
test fixture at roohub when do USB-IF Embedded Host High-Speed Electrical Test.

This patch is for v3.12+.

Cc: stable@vger.kernel.org
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Chen and committed by
Greg Kroah-Hartman
5cbcc35e a7e69ddb

+1 -1
+1 -1
drivers/usb/host/ehci-hub.c
··· 1230 1230 if (selector == EHSET_TEST_SINGLE_STEP_SET_FEATURE) { 1231 1231 spin_unlock_irqrestore(&ehci->lock, flags); 1232 1232 retval = ehset_single_step_set_feature(hcd, 1233 - wIndex); 1233 + wIndex + 1); 1234 1234 spin_lock_irqsave(&ehci->lock, flags); 1235 1235 break; 1236 1236 }