svn commit: r220436 - stable/8/sys/dev/usb
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Apr 8 06:20:43 UTC 2011
Author: hselasky
Date: Fri Apr 8 06:20:43 2011
New Revision: 220436
URL: http://svn.freebsd.org/changeset/base/220436
Log:
MFC r219395.
- Bugfix: Root HUBs do not support re-enumeration.
Approved by: thompsa (mentor)
Modified:
stable/8/sys/dev/usb/usb_generic.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/dev/usb/usb_generic.c
==============================================================================
--- stable/8/sys/dev/usb/usb_generic.c Fri Apr 8 06:13:19 2011 (r220435)
+++ stable/8/sys/dev/usb/usb_generic.c Fri Apr 8 06:20:43 2011 (r220436)
@@ -953,8 +953,14 @@ ugen_re_enumerate(struct usb_fifo *f)
}
if (udev->flags.usb_mode != USB_MODE_HOST) {
/* not possible in device side mode */
+ DPRINTFN(6, "device mode\n");
return (ENOTTY);
}
+ if (udev->parent_hub == NULL) {
+ /* the root HUB cannot be re-enumerated */
+ DPRINTFN(6, "cannot reset root HUB\n");
+ return (EINVAL);
+ }
/* make sure all FIFO's are gone */
/* else there can be a deadlock */
if (ugen_fs_uninit(f)) {
More information about the svn-src-all
mailing list