[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [linux-usb-devel] [PATCH] Re-power USB ports on wakeup



> Another idea. Is it harmful to "re-power" already powered ports? For
> example like this:
>
> Signed-off-by: Colin Leroy <colin@colino.net>
> --- a/drivers/usb/host/ehci-hcd.c	2005-03-15 17:28:52.000000000 +0100
> +++ b/drivers/usb/host/ehci-hcd.c	2005-03-16 14:44:06.000000000 +0100
> @@ -773,14 +775,12 @@
>  		/* here we "know" root ports should always stay powered;
>  		 * but some controllers may lost all power.
>  		 */
> -		if (powerup) {
> -			ehci_dbg (ehci, "...powerup ports...\n");
> -			for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; )
> -				(void) ehci_hub_control(hcd,
> -					SetPortFeature, USB_PORT_FEAT_POWER,
> -						port--, NULL, 0);
> -			msleep(20);
> -		}
> +		ehci_dbg (ehci, "...powerup ports...\n");
> +		for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; )
> +			(void) ehci_hub_control(hcd,
> +				SetPortFeature, USB_PORT_FEAT_POWER,
> +					port--, NULL, 0);
> +		msleep(20);
>  	}
>
>  	return retval;

Doesn't work for me ... the device attached to the port is still powered
down after wakeup.

	Michael



Reply to: