Date: Wed, 7 Jan 2009 10:41:17 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 155750 for review Message-ID: <200901071041.n07AfHG9061148@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=155750 Change 155750 by hselasky@hselasky_laptop001 on 2009/01/07 10:40:28 Patch to resolve problems with power mode off. Reported by Alexander Best. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_generic.c#39 edit .. //depot/projects/usb/src/sys/dev/usb2/core/usb2_hub.c#27 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_generic.c#39 (text+ko) ==== @@ -1699,11 +1699,12 @@ } switch (mode) { case USB_POWER_MODE_OFF: - /* clear suspend */ - err = usb2_req_clear_port_feature(udev->parent_hub, - NULL, udev->port_no, UHF_PORT_SUSPEND); - if (err) - break; + /* get the device unconfigured */ + err = ugen_set_config(f, USB_UNCONFIG_INDEX); + if (err) { + DPRINTFN(0, "Could not unconfigure " + "device (ignored)\n"); + } /* clear port enable */ err = usb2_req_clear_port_feature(udev->parent_hub, ==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_hub.c#27 (text+ko) ==== @@ -1823,7 +1823,8 @@ usb2_set_power_mode(struct usb2_device *udev, uint8_t power_mode) { /* filter input argument */ - if (power_mode != USB_POWER_MODE_ON) { + if ((power_mode != USB_POWER_MODE_ON) && + (power_mode != USB_POWER_MODE_OFF)) { power_mode = USB_POWER_MODE_SAVE; } udev->power_mode = power_mode; /* update copy of power mode */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901071041.n07AfHG9061148>