svn commit: r361577 - head/sys/dev/usb
Hans Petter Selasky
hselasky at FreeBSD.org
Thu May 28 08:05:46 UTC 2020
Author: hselasky
Date: Thu May 28 08:05:46 2020
New Revision: 361577
URL: https://svnweb.freebsd.org/changeset/base/361577
Log:
Don't allow USB device drivers to parent own interface.
It will prevent proper USB device detach.
MFC after: 3 days
Sponsored by: Mellanox Technologies
Modified:
head/sys/dev/usb/usb_device.c
Modified: head/sys/dev/usb/usb_device.c
==============================================================================
--- head/sys/dev/usb/usb_device.c Thu May 28 08:00:08 2020 (r361576)
+++ head/sys/dev/usb/usb_device.c Thu May 28 08:05:46 2020 (r361577)
@@ -1402,7 +1402,7 @@ usbd_set_parent_iface(struct usb_device *udev, uint8_t
{
struct usb_interface *iface;
- if (udev == NULL) {
+ if (udev == NULL || iface_index == parent_index) {
/* nothing to do */
return;
}
More information about the svn-src-head
mailing list