All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb/host/ehci-hub: Fix the issue EG20T USB host controller has long resuming time, when pen drive is attached.
Date: Wed, 11 Jul 2012 10:24:32 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1207111021020.1559-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <1341966511-4373-1-git-send-email-tomoya.rohm@gmail.com>

On Wed, 11 Jul 2012, Tomoya MORINAGA wrote:

> 
> Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>

There's no patch description.  What is the cause of the problem and how
does the patch fix it?

> ---
>  drivers/usb/host/ehci-hub.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
> index fc9e7cc..d596d0f 100644
> --- a/drivers/usb/host/ehci-hub.c
> +++ b/drivers/usb/host/ehci-hub.c
> @@ -207,6 +207,7 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
>  	int			port;
>  	int			mask;
>  	int			changed;
> +	int			temp;
>  
>  	ehci_dbg(ehci, "suspend root hub\n");
>  
> @@ -324,6 +325,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
>  	 * want, and so we must delete any pending watchdog timer events.
>  	 */
>  	del_timer_sync(&ehci->watchdog);
> +	temp = ehci_readl(ehci, &ehci->regs->status);
> +	if (temp & STS_FLR)
> +		ehci_writel(ehci, STS_FLR, &ehci->regs->status);
>  	return 0;

Operations like this should be done while holding the spinlock.

Also, why do you need the ehci_readl and the test?  You could always 
clear the STS_FLR flag.

Alan Stern


  reply	other threads:[~2012-07-11 14:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11  0:28 [PATCH] usb/host/ehci-hub: Fix the issue EG20T USB host controller has long resuming time, when pen drive is attached Tomoya MORINAGA
2012-07-11 14:24 ` Alan Stern [this message]
2012-07-12  2:53 ` [PATCH v2] " Tomoya MORINAGA
2012-07-12 14:44   ` Alan Stern
2012-07-13  2:43   ` [PATCH v3] " Tomoya MORINAGA
2012-07-13 14:11     ` 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=Pine.LNX.4.44L0.1207111021020.1559-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=tomoya.rohm@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.