aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-12-05 11:50:04 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-12-05 11:50:04 -0500
commit6b0b3bda3d77c35fa9cf20067c0b62daff98c042 (patch)
tree8676c3a42edd187a25c8678a0ce8a9e611bdb158 /tools
parent54b9937082cda4b80ff8772807d31b30f6e74fcc (diff)
parent80e457699a8dbdd70f2d26911e46f538645c55fc (diff)
Merge tag 'usb-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg KH: "Here are a few minor USB fixes for 4.15-rc3. The largest here is the Kconfig text and configuration changes for the USB TypeC build options that you reported during the -rc1 merge window. The others are all just small fixes for reported issues, as well as some new device ids. The most "interesting" of anything here is the usbip fixes as it seems lots of people are starting to pay attention to that driver at the moment. These fixes should resolve all of the reported problems as of now. Of course there are the usual xhci and gadget fixes as well, can't go a pull request without those... All of these have been in linux-next for a while with no reported issues" * tag 'usb-4.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (22 commits) usb: xhci: fix panic in xhci_free_virt_devices_depth_first xhci: Don't show incorrect WARN message about events for empty rings usbip: fix usbip attach to find a port that matches the requested speed usbip: Fix USB device hang due to wrong enabling of scatter-gather uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub usb: build drivers/usb/common/ when USB_SUPPORT is set usb: hub: Cycle HUB power when initialization fails USB: core: Add type-specific length check of BOS descriptors usb: host: fix incorrect updating of offset USB: ulpi: fix bus-node lookup USB: usbfs: Filter flags passed in from user space usb: add user selectable option for the whole USB Type-C Support usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT usb: gadget: core: Fix ->udc_set_speed() speed handling usb: gadget: allow to enable legacy drivers without USB_ETH usb: gadget: udc: renesas_usb3: fix number of the pipes usb: gadget: don't dereference g until after it has been null checked USB: serial: usb_debug: add new USB device id usb: bdc: fix platform_no_drv_owner.cocci warnings ...
Diffstat (limited to 'tools')
-rw-r--r--tools/usb/usbip/libsrc/vhci_driver.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/usb/usbip/libsrc/vhci_driver.c b/tools/usb/usbip/libsrc/vhci_driver.c
index 5727dfb15a83..8a1cd1616de4 100644
--- a/tools/usb/usbip/libsrc/vhci_driver.c
+++ b/tools/usb/usbip/libsrc/vhci_driver.c
@@ -329,9 +329,17 @@ err:
329int usbip_vhci_get_free_port(uint32_t speed) 329int usbip_vhci_get_free_port(uint32_t speed)
330{ 330{
331 for (int i = 0; i < vhci_driver->nports; i++) { 331 for (int i = 0; i < vhci_driver->nports; i++) {
332 if (speed == USB_SPEED_SUPER && 332
333 vhci_driver->idev[i].hub != HUB_SPEED_SUPER) 333 switch (speed) {
334 continue; 334 case USB_SPEED_SUPER:
335 if (vhci_driver->idev[i].hub != HUB_SPEED_SUPER)
336 continue;
337 break;
338 default:
339 if (vhci_driver->idev[i].hub != HUB_SPEED_HIGH)
340 continue;
341 break;
342 }
335 343
336 if (vhci_driver->idev[i].status == VDEV_ST_NULL) 344 if (vhci_driver->idev[i].status == VDEV_ST_NULL)
337 return vhci_driver->idev[i].port; 345 return vhci_driver->idev[i].port;