From: Lan Tianyu <tianyu.lan@intel.com>
To: Andiry Xu <andiry.xu@amd.com>
Cc: gregkh@linuxfoundation.org, lenb@kernel.org,
linux-usb@vger.kernel.org, linux-acpi@vger.kernel.org,
stern@rowland.harvard.edu, sarah.a.sharp@linux.intel.com
Subject: Re: [RFC PATCH 1/3] xhci: Add clear PORT_POWER feature process in the xhci_hub_control()
Date: Mon, 28 May 2012 13:54:50 +0800 [thread overview]
Message-ID: <4FC3132A.1080502@intel.com> (raw)
In-Reply-To: <4FC35358.6080700@amd.com>
On 2012年05月28日 18:28, Andiry Xu wrote:
> 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@intel.com>
>> ---
>> 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.
hi andiry:
Thanks for your reminder and I will take the first one.
>
> Thanks,
> Andiry
>
>> + xhci_writel(xhci, temp, port_array[wIndex]);
>> + break;
>> default:
>> goto error;
>> }
>
>
--
Best Regards
Tianyu Lan
linux kernel enabling team
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-05-28 6:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 5:47 [RFC PATCH 0/3] USB/ACPI: Add usb port power off mechanism Lan Tianyu
[not found] ` <1337924882-17332-1-git-send-email-tianyu.lan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2012-05-25 5:48 ` [RFC PATCH 1/3] xhci: Add clear PORT_POWER feature process in the xhci_hub_control() Lan Tianyu
2012-05-28 10:28 ` Andiry Xu
2012-05-28 5:54 ` Lan Tianyu [this message]
2012-05-25 5:48 ` [RFC PATCH 2/3] USB/ACPI: Add usb port's acpi power control in the xhci PORT_POWER feature request process Lan Tianyu
2012-05-25 5:48 ` [RFC PATCH 3/3] usb : Add sysfs files to control usb port's power Lan Tianyu
2012-05-25 15:41 ` Alan Stern
2012-05-28 5:35 ` Lan Tianyu
2012-05-28 15:14 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FC3132A.1080502@intel.com \
--to=tianyu.lan@intel.com \
--cc=andiry.xu@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).