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

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

 



Hi Shimoda-san,

On Thu, Jan 23, 2020 at 1:08 PM Yoshihiro Shimoda
<yoshihiro.shimoda.uh@xxxxxxxxxxx> 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>

Thanks for your patch!

> --- a/drivers/usb/host/ehci-platform.c
> +++ b/drivers/usb/host/ehci-platform.c

> +static const struct soc_device_attribute quirk_poll_match[] = {
> +       { .soc_id = "r8a7795" },
> +       { .soc_id = "r8a77951" },

As .soc_id is derived from the main compatible value, it is "r8a7795" for both
R-Car H3 ES1.x (R8A77950) and ES2.0+ (R8A77951).

> +       { .soc_id = "r8a7796" },
> +       { .soc_id = "r8a77961" },
> +       { .soc_id = "r8a77965" },
> +       { .soc_id = "r8a77990" },
> +       { .soc_id = "r8a77995" },

Instead of matching on .soc_id, you can also match on .family = "R-Car Gen3"
(until we discover a future family member that is not affected?).

I guess this affects RZ/G2, too? .family = "RZ/G2".

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



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

  Powered by Linux