Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 May 2020 08:05:46 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361577 - head/sys/dev/usb
Message-ID:  <202005280805.04S85kF3069439@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005280805.04S85kF3069439>