Bug 197607 - usbip attach fails due to vhci_driver not available
Summary: usbip attach fails due to vhci_driver not available
Status: NEW
Alias: None
Product: Other
Classification: Unclassified
Component: Modules (show other bugs)
Hardware: All Linux
: P1 blocking
Assignee: other_modules
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-31 19:22 UTC by Philipp Schaffrath
Modified: 2018-03-18 14:57 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.13.9
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Philipp Schaffrath 2017-10-31 19:22:59 UTC
Binding a device on 4.13.9 and attaching it on a remote 4.9.41 works as expected. Also binding and attaching with two different 4.9.41 machines works fine.

As soon as i am trying to attach a remote device under 4.13.9, i receive the following message:

[phisch@tower:~]$ sudo usbip attach -r 192.168.0.101 -b 1-1.2 (10-31 15:32)
libusbip: error: udev_device_get_sysattr_value failed
usbip: error: open vhci_driver
usbip: error: query
[phisch@tower:~][1]$ lsmod | grep vhci_hcd (10-31 15:32)
vhci_hcd 40960 0
usbip_core 28672 2 vhci_hcd,usbip_host
usbcore 208896 9 usbhid,snd_usb_audio,vhci_hcd,usbip_host,ehci_hcd,xhci_pci,snd_usbmidi_lib,xhci_hcd,ehci_pci
usb_common 16384 3 vhci_hcd,usbcore,usbip_core

But as you can see, vhci_hcd is loaded correctly.

This problem was also reproducible on another machine running 4.11.3, so it might not be such a recent problem, but i haven't found a lot of information about it except a bugreport on arch.

Since it is completely broken, i'll set the severity to blocking.
I am also not sure which component this belongs to, since it might either be an error in usbip (tool), vhci_hcd (driver) or something usb related.
Comment 1 Michael Lipp 2017-12-31 12:41:45 UTC
I can confirm the bug, using usbip 4.14 on both machines. (Server kernel 4.9.70-1-ARCH, client kernel 4.14.9-1-ARCH).

It seems someone has already tracked down the cause: https://bugs.archlinux.org/task/56069 (near the end).
Comment 2 jiangxueqian 2018-03-18 14:57:24 UTC
I came across a similar bug and read through the source. It seems that the developers added supported of multiple vhci controller several months ago, but they used a buggy controller name filter that matches any name greater than "vhci_hcd" in usbip. I rewrote the filter and it works for me now.

This is a link to my patch:
https://gist.github.com/mentha/2c65e69bd8895f0bda264139c6272a5a

Note You need to log in before you can comment on or make changes to this bug.