Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Jan 2009 10:24:00 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        hselasky@FreeBSD.org
Cc:        perforce@FreeBSD.org
Subject:   Re: PERFORCE change 155750 for review
Message-ID:  <20090108.102400.-1877578186.imp@bsdimp.com>
In-Reply-To: <200901071041.n07AfHG9061148@repoman.freebsd.org>
References:  <200901071041.n07AfHG9061148@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200901071041.n07AfHG9061148@repoman.freebsd.org>
            Hans Petter Selasky <hselasky@FreeBSD.org> writes:
: 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.

Can you please use more descriptive commits?  This doesn't tell us
much about what the problems were, or how this fixes them.

Warner

: 	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?20090108.102400.-1877578186.imp>