All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Julius Werner <jwerner@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	Alan Stern <stern@rowland.harvard.edu>,
	Sarah Sharp <sarah.a.sharp@linux.intel.com>,
	Benson Leung <bleung@chromium.org>,
	Vincent Palatin <vpalatin@chromium.org>,
	Duncan Laurie <dlaurie@chromium.org>
Subject: Re: [PATCH] usb: hub: Clear Port Reset Change during init/resume
Date: Wed, 16 Oct 2013 01:32:06 +0400	[thread overview]
Message-ID: <525DB456.1040006@cogentembedded.com> (raw)
In-Reply-To: <1381872227-24757-1-git-send-email-jwerner@chromium.org>

Hello.

On 10/16/2013 01:23 AM, Julius Werner wrote:

> This patch adds the Port Reset Change flag to the set of bits that are
> preemptively cleared on init/resume of a hub. In theory this bit should
> never be set unexpectedly... in practice it can still happen if BIOS,
> SMM or ACPI code plays around with USB devices without cleaning up
> correctly. This is especially dangerous for XHCI root hubs, which don't
> generate any more Port Status Change Events until all change bits are
> cleared, so this is a good precaution to have (similar to how it's
> already done for the Warm Port Reset Change flag).

> Signed-off-by: Julius Werner <jwerner@chromium.org>
> ---
>   drivers/usb/core/hub.c | 5 +++++
>   1 file changed, 5 insertions(+)

> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index e6b682c..c9ef5b8 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -1130,6 +1130,11 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
>   			usb_clear_port_feature(hub->hdev, port1,
>   					USB_PORT_FEAT_C_ENABLE);
>   		}
> +		if ((portchange & USB_PORT_STAT_C_RESET)) {

    Hm, why these double parens?

WBR, Sergei


  reply	other threads:[~2013-10-15 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15 21:23 [PATCH] usb: hub: Clear Port Reset Change during init/resume Julius Werner
2013-10-15 21:32 ` Sergei Shtylyov [this message]
2013-10-16  0:42   ` Julius Werner
2013-10-16  0:45     ` [PATCH v2] " Julius Werner
2013-10-16 14:40       ` Alan Stern
2013-10-16 23:57       ` Sarah Sharp
2013-10-17  0:05         ` Benson Leung
2013-10-17  0:53         ` Julius Werner

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=525DB456.1040006@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=bleung@chromium.org \
    --cc=dlaurie@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jwerner@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    --cc=vpalatin@chromium.org \
    /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.