public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ZhenHua <zhen-hual@hp.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: stern@rowland.harvard.edu, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, tom.vaden@hp.com
Subject: Re: [PATCH 1/1] driver,usb: Fix a warning in uhci-hcd driver
Date: Wed, 24 Apr 2013 07:55:18 +0800	[thread overview]
Message-ID: <51771F66.3080801@hp.com> (raw)
In-Reply-To: <20130423140734.GA30877@kroah.com>

On 04/23/2013 10:07 PM, Greg KH wrote:
> On Tue, Apr 23, 2013 at 03:15:01PM +0800, Li, Zhen-Hua wrote:
>> From: "Li, Zhen-Hua" <zhen-hual@hp.com>
>>
>> This patch is trying to fix bug QXCR1001261767.
Sorry for the bug number. Please ignore this line.

> What is that bug number?  Where can it be referenced?  If you are going
> to put it in a public place (like a kernel changelog), it needs to be
> publicly accessible.
>
>> On some HP platform, when usb driver inits the iLo Virtual USB Controller, there may be a warning "Controller not stopped yet!". It is because driver does not wait enough time.
> What happened to your line endings?
>
>> This patch adds more time waiting and retries.
> Why not only do this for your device?
>
>> Signed-off-by: Li, Zhen-Hua <zhen-hual@hp.com>
>> ---
>>   drivers/usb/host/uhci-hcd.c |   16 +++++++++++++++-
>>   1 file changed, 15 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
>> index 4a86b63..514e9d7 100644
>> --- a/drivers/usb/host/uhci-hcd.c
>> +++ b/drivers/usb/host/uhci-hcd.c
>> @@ -277,6 +277,9 @@ static int global_suspend_mode_is_broken(struct uhci_hcd *uhci)
>>   		uhci->global_suspend_mode_is_broken(uhci) : 0;
>>   }
>>   
>> +#define UHCI_SUSPENDRH_RETRY_MAX      10
>> +#define UHCI_SUSPENDRH_RETRY_DELAY    100
>> +
>>   static void suspend_rh(struct uhci_hcd *uhci, enum uhci_rh_state new_state)
>>   __releases(uhci->lock)
>>   __acquires(uhci->lock)
>> @@ -284,6 +287,7 @@ __acquires(uhci->lock)
>>   	int auto_stop;
>>   	int int_enable, egsm_enable, wakeup_enable;
>>   	struct usb_device *rhdev = uhci_to_hcd(uhci)->self.root_hub;
>> +	u16 try, stopped;
>>   
>>   	auto_stop = (new_state == UHCI_RH_AUTO_STOPPED);
>>   	dev_dbg(&rhdev->dev, "%s%s\n", __func__,
>> @@ -355,7 +359,17 @@ __acquires(uhci->lock)
>>   		if (uhci->dead)
>>   			return;
>>   	}
>> -	if (!(uhci_readw(uhci, USBSTS) & USBSTS_HCH))
>> +
>> +	for (try = 0; try < UHCI_SUSPENDRH_RETRY_MAX; try++) {
>> +		/*
>> +		 * Sometimes we may need to wait more time and try again.
>> +		 */
> "Sometimes"?  Please be more specific.  Also, a multi-line comment isn't
> needed, make it one line please.
>
> thanks,
>
> greg k-h


  parent reply	other threads:[~2013-04-23 23:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23  7:15 [PATCH 1/1] driver,usb: Fix a warning in uhci-hcd driver 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 [this message]
2013-04-24  1:57     ` Greg KH
2013-04-24  2:05       ` ZhenHua
  -- 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-26  7:38 Li, Zhen-Hua
2013-04-26  7:50 ` ZhenHua
2013-04-26  8:10   ` ZhenHua
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)

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=51771F66.3080801@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 \
    --cc=tom.vaden@hp.com \
    /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