summaryrefslogtreecommitdiff
path: root/tools/usb/usbip/src/usbip_attach.c
diff options
context:
space:
mode:
authorYuyang Du <yuyang.du@intel.com>2017-06-08 13:04:10 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-13 10:51:10 +0200
commit1c9de5bf428612458427943b724bea51abde520a (patch)
treedeb6f9bed592da3a5952239dc5212e721ff4ab5f /tools/usb/usbip/src/usbip_attach.c
parent03cd00d538a6feb0492cd153edf256ef7d7bd95e (diff)
usbip: vhci-hcd: Add USB3 SuperSpeed support
This patch adds a USB3 HCD to an existing USB2 HCD and provides the support of SuperSpeed, in case the device can only be enumerated with SuperSpeed. The bulk of the added code in usb3_bos_desc and hub_control to support SuperSpeed is borrowed from the commit 1cd8fd2887e162ad ("usb: gadget: dummy_hcd: add SuperSpeed support"). With this patch, each vhci will have VHCI_HC_PORTS HighSpeed ports and VHCI_HC_PORTS SuperSpeed ports. Suggested-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Yuyang Du <yuyang.du@intel.com> Acked-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/usb/usbip/src/usbip_attach.c')
-rw-r--r--tools/usb/usbip/src/usbip_attach.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/usb/usbip/src/usbip_attach.c b/tools/usb/usbip/src/usbip_attach.c
index 62a297ff647a..6e89768ffe30 100644
--- a/tools/usb/usbip/src/usbip_attach.c
+++ b/tools/usb/usbip/src/usbip_attach.c
@@ -94,6 +94,7 @@ static int import_device(int sockfd, struct usbip_usb_device *udev)
{
int rc;
int port;
+ uint32_t speed = udev->speed;
rc = usbip_vhci_driver_open();
if (rc < 0) {
@@ -101,7 +102,7 @@ static int import_device(int sockfd, struct usbip_usb_device *udev)
return -1;
}
- port = usbip_vhci_get_free_port();
+ port = usbip_vhci_get_free_port(speed);
if (port < 0) {
err("no free port");
usbip_vhci_driver_close();