Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7a2f297

Browse files
m-v-bgregkh
authored andcommitted
usbip: Implement a match function to fix usbip
Commit88b7381 ("USB: Select better matching USB drivers whenavailable") introduced the use of a "match" function to select anon-generic/better driver for a particular USB device. Thisunfortunately breaks the operation of usbip in general, as reported inthe kernel bugzilla with bug 208267 (linked below).Upon inspecting the aforementioned commit, one can observe that theoriginal code in the usb_device_match function used to return 1unconditionally, but the aforementioned commit makes the usb_device_matchfunction use identifier tables and "match" virtual functions, if either ofthem are available.Hence, this commit implements a match function for usbip thatunconditionally returns true to ensure that usbip is functional again.This change has been verified to restore usbip functionality, with av5.7.y kernel on an up-to-date version of Qubes OS 4.0, which usesusbip to redirect USB devices between VMs.Thanks to Jonathan Dieter for the effort in bisecting this issue downto the aforementioned commit.Fixes:88b7381 ("USB: Select better matching USB drivers when available")Link:https://bugzilla.kernel.org/show_bug.cgi?id=208267Link:https://bugzilla.redhat.com/show_bug.cgi?id=1856443Link:QubesOS/qubes-issues#5905Signed-off-by: M. Vefa Bicakci <m.v.b@runbox.com>Cc: <stable@vger.kernel.org> # 5.7Cc: Valentina Manea <valentina.manea.m@gmail.com>Cc: Alan Stern <stern@rowland.harvard.edu>Reviewed-by: Bastien Nocera <hadess@hadess.net>Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>Link:https://lore.kernel.org/r/20200810160017.46002-1-m.v.b@runbox.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parentd66a57b commit7a2f297

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎drivers/usb/usbip/stub_dev.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,11 @@ static void stub_disconnect(struct usb_device *udev)
461461
return;
462462
}
463463

464+
staticboolusbip_match(structusb_device*udev)
465+
{
466+
return true;
467+
}
468+
464469
#ifdefCONFIG_PM
465470

466471
/* These functions need usb_port_suspend and usb_port_resume,
@@ -486,6 +491,7 @@ struct usb_device_driver stub_driver = {
486491
.name="usbip-host",
487492
.probe=stub_probe,
488493
.disconnect=stub_disconnect,
494+
.match=usbip_match,
489495
#ifdefCONFIG_PM
490496
.suspend=stub_suspend,
491497
.resume=stub_resume,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp