Date: Fri, 4 Jul 2008 13:21:20 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 144614 for review Message-ID: <200807041321.m64DLKSO011939@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=144614 Change 144614 by hselasky@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));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807041321.m64DLKSO011939>