svn commit: r277846 - stable/9/sys/dev/usb
Hans Petter Selasky
hselasky at FreeBSD.org
Wed Jan 28 19:43:34 UTC 2015
Author: hselasky
Date: Wed Jan 28 19:43:33 2015
New Revision: 277846
URL: https://svnweb.freebsd.org/changeset/base/277846
Log:
MFC r277417:
Fix returned data for the USB_GET_DEV_PORT_PATH IOCTL in particular
the value returned in the "udp_port_level" field.
Modified:
stable/9/sys/dev/usb/usb_generic.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/dev/ (props changed)
Modified: stable/9/sys/dev/usb/usb_generic.c
==============================================================================
--- stable/9/sys/dev/usb/usb_generic.c Wed Jan 28 19:41:31 2015 (r277845)
+++ stable/9/sys/dev/usb/usb_generic.c Wed Jan 28 19:43:33 2015 (r277846)
@@ -1837,14 +1837,13 @@ ugen_get_port_path(struct usb_fifo *f, s
if (nlevel > USB_DEVICE_PORT_PATH_MAX)
goto error;
+ /* store total level of ports */
+ dpp->udp_port_level = nlevel;
+
/* store port index array */
next = udev;
while (next->parent_hub != NULL) {
- nlevel--;
-
- dpp->udp_port_no[nlevel] = next->port_no;
- dpp->udp_port_level = nlevel;
-
+ dpp->udp_port_no[--nlevel] = next->port_no;
next = next->parent_hub;
}
return (0); /* success */
More information about the svn-src-stable-9
mailing list