PERFORCE change 144614 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Jul 4 13:21:21 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=144614
Change 144614 by hselasky at hselasky_laptop001 on 2008/07/04 13:20:43
If port power failed once it is likely to fail again.
Only set port power if there was no previous port power
failure. This is will improve the situation when you unplug
the USB HUB too early.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb2/core/usb2_hub.c#9 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_hub.c#9 (text+ko) ====
@@ -736,10 +736,11 @@
if (!UHD_NOT_REMOV(&hubdesc, portno)) {
removable++;
}
- /* turn the power on */
- err = usb2_req_set_port_feature
- (udev, &Giant, portno, UHF_PORT_POWER);
-
+ if (!err) {
+ /* turn the power on */
+ err = usb2_req_set_port_feature
+ (udev, &Giant, portno, UHF_PORT_POWER);
+ }
if (err) {
DPRINTF(-1, "port %d power on failed, %s\n",
portno, usb2_errstr(err));
More information about the p4-projects
mailing list