linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: gregkh@linuxfoundation.org, <linux@prisktech.co.nz>,
	<linux-usb@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH v3] usb: host: ehci-platform: add a quirk to avoid stuck
Date: Fri, 24 Jan 2020 10:18:23 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.2001241012160.1610-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <1579840923-10709-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>

On Fri, 24 Jan 2020, Yoshihiro Shimoda wrote:

> Since EHCI/OHCI controllers on R-Car Gen3 SoCs are possible to
> be getting stuck very rarely after a full/low usb device was
> disconnected. To detect/recover from such a situation, the controllers
> require a special way which poll the EHCI PORTSC register and changes
> the OHCI functional state.
> 
> So, this patch adds a polling timer into the ehci-platform driver,
> and if the ehci driver detects the issue by the EHCI PORTSC register,
> the ehci driver removes a companion device (= the OHCI controller)
> to change the OHCI functional state to USB Reset once. And then,
> the ehci driver adds the companion device again.
> 
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

All good, except for one thing at the end...

> diff --git a/include/linux/usb/ehci_def.h b/include/linux/usb/ehci_def.h
> index a15ce99..0ebfa74 100644
> --- a/include/linux/usb/ehci_def.h
> +++ b/include/linux/usb/ehci_def.h
> @@ -150,6 +150,7 @@ struct ehci_regs {
>  #define PORT_LED_MASK	(3<<14)
>  #define PORT_OWNER	(1<<13)		/* true: companion hc owns this port */
>  #define PORT_POWER	(1<<12)		/* true: has power (see PPC) */
> +#define PORT_LS_MASK	(3<<10)		/* USB 1.1 device */

The comment should say: /* Link status (SE0, K, or J) */ 

>  #define PORT_USB11(x) (((x)&(3<<10)) == (1<<10))	/* USB 1.1 device */
>  /* 11:10 for detecting lowspeed devices (reset vs release ownership) */

You can remove this comment now.  Since there is an actual macro for
bits 11:10, we don't need a separate comment saying what they are.

Alan Stern

>  /* 9 reserved */


  reply	other threads:[~2020-01-24 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24  4:42 [PATCH v3] usb: host: ehci-platform: add a quirk to avoid stuck Yoshihiro Shimoda
2020-01-24 15:18 ` Alan Stern [this message]
2020-01-27  8:08   ` Yoshihiro Shimoda

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.2001241012160.1610-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    --cc=yoshihiro.shimoda.uh@renesas.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;
as well as URLs for NNTP newsgroup(s).