linux-stable/tools/usb/usbip/libsrc
Maciej Żenczykowski 0d41c7b386 usbip: fix vhci_hcd controller counting
[ Upstream commit e0a2e73e50 ]

Without this usbip fails on a machine with devices
that lexicographically come after vhci_hcd.

ie.
  $ ls -l /sys/devices/platform
  ...
  drwxr-xr-x. 4 root root    0 Sep 19 16:21 serial8250
  -rw-r--r--. 1 root root 4096 Sep 19 23:50 uevent
  drwxr-xr-x. 6 root root    0 Sep 20 13:15 vhci_hcd.0
  drwxr-xr-x. 4 root root    0 Sep 19 16:22 w83627hf.656

Because it detects 'w83627hf.656' as another vhci_hcd controller,
and then fails to be able to talk to it.

Note: this doesn't actually fix usbip's support for multiple
controllers... that's still broken for other reasons
("vhci_hcd.0" is hardcoded in a string macro), but is enough to
actually make it work on the above machine.

See also:
  https://bugzilla.redhat.com/show_bug.cgi?id=1631148

Cc: Jonathan Dieter <jdieter@gmail.com>
Cc: Valentina Manea <valentina.manea.m@gmail.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Maciej Żenczykowski <zenczykowski@gmail.com>
Acked-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Tested-by: Jonathan Dieter <jdieter@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-20 09:16:01 +02:00
..
list.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile.am License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
names.c
names.h
sysfs_utils.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysfs_utils.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
usbip_common.c usbip: tools: add more error codes for usbip request/reply messages 2018-03-09 09:17:08 -08:00
usbip_common.h usbip: tools: add more error codes for usbip request/reply messages 2018-03-09 09:17:08 -08:00
usbip_device_driver.c tools: usb: usbip: fix fd leak in case of 'fread' failure 2018-01-04 17:05:55 +01:00
usbip_device_driver.h usbip: tools: Add vudc backend to usbip tools 2016-04-26 15:19:50 -07:00
usbip_host_common.c usbip: usbip_host_common: Use new error codes to return request status 2018-03-09 09:17:08 -08:00
usbip_host_common.h usbip: tools: Extract generic code to be shared with vudc backend 2016-04-26 15:19:50 -07:00
usbip_host_driver.c usbip: tools: Extract generic code to be shared with vudc backend 2016-04-26 15:19:50 -07:00
usbip_host_driver.h usbip: tools: Extract generic code to be shared with vudc backend 2016-04-26 15:19:50 -07:00
vhci_driver.c usbip: fix vhci_hcd controller counting 2019-04-20 09:16:01 +02:00
vhci_driver.h usbip: dynamically allocate idev by nports found in sysfs 2018-05-31 12:43:14 +02:00