Re: [PATCH v3] usb: host: ehci-platform: add a quirk to avoid stuck

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>

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 */




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux