PERFORCE change 177779 for review

Hans Petter Selasky hselasky at FreeBSD.org
Wed May 5 19:58:38 UTC 2010


http://p4web.freebsd.org/@@177779?ac=10

Change 177779 by hselasky at hselasky_laptop001 on 2010/05/05 19:58:31

	
	USB CORE:
		- provide more information about the device location in the
		USB system via the sysctl interface.
		- patch by: HPS @

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/usb_hub.c#42 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/usb_hub.c#42 (text+ko) ====

@@ -73,7 +73,7 @@
 #define	UHUB_INTR_INTERVAL 250		/* ms */
 #define	UHUB_N_TRANSFER 1
 
-#if USB_DEBUG
+#ifdef USB_DEBUG
 static int uhub_debug = 0;
 
 SYSCTL_NODE(_hw_usb, OID_AUTO, uhub, CTLFLAG_RW, 0, "USB HUB");
@@ -1010,8 +1010,10 @@
 		}
 		goto done;
 	}
-	snprintf(buf, buflen, "port=%u interface=%u",
-	    res.portno, res.iface_index);
+	snprintf(buf, buflen, "bus=%u hubaddr=%u port=%u devaddr=%u interface=%u",
+	    (res.udev->parent_hub != NULL) ? res.udev->parent_hub->device_index : 0,
+	    res.portno, device_get_unit(res.udev->bus->bdev),
+	    res.udev->device_index, res.iface_index);
 done:
 	mtx_unlock(&Giant);
 


More information about the p4-projects mailing list