Re: [RFC PATCH 1/3] xhci: Add clear PORT_POWER feature process in the xhci_hub_control()

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

 



On 05/25/2012 01:48 PM, Lan Tianyu wrote:
> This patch is to add process of clearing PORT_POWER feature request
> for xhci hub.
> 
> Signed-off-by: Lan Tianyu <tianyu.lan@xxxxxxxxx>
> ---
>  drivers/usb/host/xhci-hub.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
> index 2732ef6..feb515e 100644
> --- a/drivers/usb/host/xhci-hub.c
> +++ b/drivers/usb/host/xhci-hub.c
> @@ -827,6 +827,11 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
>  			xhci_disable_port(hcd, xhci, wIndex,
>  					port_array[wIndex], temp);
>  			break;
> +		case USB_PORT_FEAT_POWER:
> +			temp = xhci_readl(xhci, port_array[wIndex])
> +				& ~PORT_POWER;

You should not read the register again. Simply use temp &= ~PORT_POWER
is enough.

Otherwise you must call xhci_port_state_to_neutral(temp) again before
write it back to register.

Thanks,
Andiry

> +			xhci_writel(xhci, temp,	port_array[wIndex]);
> +			break;
>  		default:
>  			goto error;
>  		}


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


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux