From: ZhenHua <zhen-hual@hp.com>
To: ZhenHua <zhen-hual@hp.com>, "Li, Zhen-Hua" <zhen-hual@hp.com>,
stern@rowland.harvard.edu, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] driver,usb: Fix a warning in uhci-hcd driver
Date: Fri, 26 Apr 2013 16:10:56 +0800 [thread overview]
Message-ID: <517A3690.7000806@hp.com> (raw)
In-Reply-To: <517A31A9.5070504@hp.com>
On 04/26/2013 03:50 PM, ZhenHua wrote:
> I think there is another patch needed. As Alan said in another
> mail, in the UHCI_RH_RUNNING_NODEVS case, it should not be stopped
> if the uhci device is HP iLo virtual usb.
>
correct: it should not be auto stopped if the uhci device is HP iLo
virtual usb.
>
> Thanks
> Zhen-Hua
>
> On 04/26/2013 03:38 PM, Li, Zhen-Hua wrote:
>> This patch is trying to fix this bug on SLES11 SP2:
>> https://bugzilla.novell.com/show_bug.cgi?id=817035
>>
>> On a large HP system with 64T memory and 60 logical cpus, when usb
>> driver inits the iLo Virtual USB Controller, there comes a warning
>> "Controller not stopped yet!". It is because the HP iLo virtual usb
>> device requires a longer delay.
>>
>> Signed-off-by: Li, Zhen-Hua <zhen-hual@hp.com>
>> ---
>> drivers/usb/host/uhci-hcd.c | 5 +++++
>> drivers/usb/host/uhci-hub.c | 12 +++++++-----
>> 2 files changed, 12 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
>> index 4a86b63..af30517 100644
>> --- a/drivers/usb/host/uhci-hcd.c
>> +++ b/drivers/usb/host/uhci-hcd.c
>> @@ -355,6 +355,11 @@ __acquires(uhci->lock)
>> if (uhci->dead)
>> return;
>> }
>> +
>> + /* HP's iLo Virtual USB Controller requires a longer delay. */
>> + if (uhci->wait_for_hp)
>> + wait_for_HP(uhci, USBSTS, USBSTS_HCH, 1000);
>> +
>> if (!(uhci_readw(uhci, USBSTS) & USBSTS_HCH))
>> dev_warn(uhci_dev(uhci), "Controller not stopped yet!\n");
>> diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c
>> index f87bee6..c3f772c 100644
>> --- a/drivers/usb/host/uhci-hub.c
>> +++ b/drivers/usb/host/uhci-hub.c
>> @@ -120,14 +120,15 @@ static void uhci_finish_suspend(struct uhci_hcd
>> *uhci, int port,
>> }
>> /* Wait for the UHCI controller in HP's iLO2 server management chip.
>> - * It can take up to 250 us to finish a reset and set the CSC bit.
>> + * It can take up to max_wait us to finish the operation.
>> */
>> -static void wait_for_HP(struct uhci_hcd *uhci, unsigned long port_addr)
>> +static void wait_for_HP(struct uhci_hcd *uhci, unsigned long port_addr,
>> + u16 status, int max_wait)
>> {
>> int i;
>> - for (i = 10; i < 250; i += 10) {
>> - if (uhci_readw(uhci, port_addr) & USBPORTSC_CSC)
>> + for (i = 10; i < max_wait; i += 10) {
>> + if (uhci_readw(uhci, port_addr) & status)
>> return;
>> udelay(10);
>> }
>> @@ -151,7 +152,8 @@ static void uhci_check_ports(struct uhci_hcd *uhci)
>> /* HP's server management chip requires
>> * a longer delay. */
>> if (uhci->wait_for_hp)
>> - wait_for_HP(uhci, port_addr);
>> + wait_for_HP(uhci, port_addr,
>> + USBPORTSC_CSC, 250);
>> /* If the port was enabled before, turning
>> * reset on caused a port enable change.
>
next prev parent reply other threads:[~2013-04-26 8:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 7:38 [PATCH 1/1] driver,usb: Fix a warning in uhci-hcd driver Li, Zhen-Hua
2013-04-26 7:50 ` ZhenHua
2013-04-26 8:10 ` ZhenHua [this message]
2013-04-26 16:51 ` Alan Stern
2013-04-27 0:16 ` ZhenHua
2013-04-27 15:14 ` Alan Stern
2013-04-28 1:51 ` ZhenHua
2013-04-28 18:55 ` Alan Stern
2013-05-06 1:43 ` Li, Zhen-Hua (USL-China)
-- strict thread matches above, loose matches on Subject: below --
2013-04-25 7:11 Li, Zhen-Hua
2013-04-25 7:12 ` ZhenHua
2013-04-25 14:33 ` Alan Stern
2013-04-25 14:56 ` Alan Stern
2013-04-23 7:15 Li, Zhen-Hua
2013-04-23 14:07 ` Greg KH
2013-04-23 15:10 ` Alan Stern
2013-04-25 1:22 ` ZhenHua
2013-04-25 14:54 ` Alan Stern
2013-04-26 1:10 ` ZhenHua
2013-04-23 23:55 ` ZhenHua
2013-04-24 1:57 ` Greg KH
2013-04-24 2:05 ` ZhenHua
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=517A3690.7000806@hp.com \
--to=zhen-hual@hp.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--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