On Sun, 18 Jan 2015, Chechun Kuo wrote:

> for some platform ehci controller, it is possible there is no port power 
> control capability in the root hub.
> And we add port power control determination when getting root hub port status.

Why do you need to do this?  Doesn't the current code always give the 
right result?

Alan Stern

> Signed-off-by: Chechun Kuo <vichy....@gmail.com>
> ---
>  drivers/usb/host/ehci-hub.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
> index 5728829..1923984 100644
> --- a/drivers/usb/host/ehci-hub.c
> +++ b/drivers/usb/host/ehci-hub.c
> @@ -1118,7 +1118,7 @@ int ehci_hub_control(
>                       status |= USB_PORT_STAT_OVERCURRENT;
>               if (temp & PORT_RESET)
>                       status |= USB_PORT_STAT_RESET;
> -             if (temp & PORT_POWER)
> +             if (HCS_PPC(ehci->hcs_params) && (temp & PORT_POWER))
>                       status |= USB_PORT_STAT_POWER;
>               if (test_bit(wIndex, &ehci->port_c_suspend))
>                       status |= USB_PORT_STAT_C_SUSPEND << 16;
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to