diff mbox series

[v2,3/3] USB: Disable LPM on WD19's Realtek Hub

Message ID 20200110080211.22626-1-kai.heng.feng@canonical.com (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Kai-Heng Feng Jan. 10, 2020, 8:02 a.m. UTC
Realtek Hub (0bda:0x0487) used in Dell Dock WD19 sometimes drops off the
bus when bringing underlying ports from U3 to U0.

Disabling LPM on the hub during setting link state is not enough, so
let's disable LPM completely for this hub.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/usb/core/quirks.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Alan Stern Jan. 10, 2020, 3:40 p.m. UTC | #1
On Fri, 10 Jan 2020, Kai-Heng Feng wrote:

> Realtek Hub (0bda:0x0487) used in Dell Dock WD19 sometimes drops off the
> bus when bringing underlying ports from U3 to U0.
> 
> Disabling LPM on the hub during setting link state is not enough, so
> let's disable LPM completely for this hub.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/usb/core/quirks.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
> index 6b6413073584..2fb7c1602280 100644
> --- a/drivers/usb/core/quirks.c
> +++ b/drivers/usb/core/quirks.c
> @@ -371,6 +371,9 @@ static const struct usb_device_id usb_quirk_list[] = {
>  	{ USB_DEVICE(0x0b05, 0x17e0), .driver_info =
>  			USB_QUIRK_IGNORE_REMOTE_WAKEUP },
>  
> +	/* Realtek hub in Dell WD19 (Type-C) */
> +	{ USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM },
> +
>  	/* Action Semiconductor flash disk */
>  	{ USB_DEVICE(0x10d6, 0x2200), .driver_info =
>  			USB_QUIRK_STRING_FETCH_255 },
> 

This is a very partial patch.  There were four hunks in the original 
version but there's only one hunk in V2.

Alan Stern
Kai-Heng Feng Jan. 10, 2020, 3:51 p.m. UTC | #2
On Fri, Jan 10, 2020 at 11:40 PM Alan Stern <stern@rowland.harvard.edu> wrote:
>
> On Fri, 10 Jan 2020, Kai-Heng Feng wrote:
>
> > Realtek Hub (0bda:0x0487) used in Dell Dock WD19 sometimes drops off the
> > bus when bringing underlying ports from U3 to U0.
> >
> > Disabling LPM on the hub during setting link state is not enough, so
> > let's disable LPM completely for this hub.
> >
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > ---
> >  drivers/usb/core/quirks.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
> > index 6b6413073584..2fb7c1602280 100644
> > --- a/drivers/usb/core/quirks.c
> > +++ b/drivers/usb/core/quirks.c
> > @@ -371,6 +371,9 @@ static const struct usb_device_id usb_quirk_list[] = {
> >       { USB_DEVICE(0x0b05, 0x17e0), .driver_info =
> >                       USB_QUIRK_IGNORE_REMOTE_WAKEUP },
> >
> > +     /* Realtek hub in Dell WD19 (Type-C) */
> > +     { USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM },
> > +
> >       /* Action Semiconductor flash disk */
> >       { USB_DEVICE(0x10d6, 0x2200), .driver_info =
> >                       USB_QUIRK_STRING_FETCH_255 },
> >
>
> This is a very partial patch.  There were four hunks in the original
> version but there's only one hunk in V2.

Because the original approach is insufficient, it significantly
reduced the fail rate but the issue is still there.
USB_QUIRK_NO_LPM is used instead so no other parts are needed.

Kai-Heng

>
> Alan Stern
>
Alan Stern Jan. 10, 2020, 4:36 p.m. UTC | #3
On Fri, 10 Jan 2020, Kai-Heng Feng wrote:

> On Fri, Jan 10, 2020 at 11:40 PM Alan Stern <stern@rowland.harvard.edu> wrote:
> >
> > On Fri, 10 Jan 2020, Kai-Heng Feng wrote:
> >
> > > Realtek Hub (0bda:0x0487) used in Dell Dock WD19 sometimes drops off the
> > > bus when bringing underlying ports from U3 to U0.
> > >
> > > Disabling LPM on the hub during setting link state is not enough, so
> > > let's disable LPM completely for this hub.
> > >
> > > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > > ---
> > >  drivers/usb/core/quirks.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
> > > index 6b6413073584..2fb7c1602280 100644
> > > --- a/drivers/usb/core/quirks.c
> > > +++ b/drivers/usb/core/quirks.c
> > > @@ -371,6 +371,9 @@ static const struct usb_device_id usb_quirk_list[] = {
> > >       { USB_DEVICE(0x0b05, 0x17e0), .driver_info =
> > >                       USB_QUIRK_IGNORE_REMOTE_WAKEUP },
> > >
> > > +     /* Realtek hub in Dell WD19 (Type-C) */
> > > +     { USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM },
> > > +
> > >       /* Action Semiconductor flash disk */
> > >       { USB_DEVICE(0x10d6, 0x2200), .driver_info =
> > >                       USB_QUIRK_STRING_FETCH_255 },
> > >
> >
> > This is a very partial patch.  There were four hunks in the original
> > version but there's only one hunk in V2.
> 
> Because the original approach is insufficient, it significantly
> reduced the fail rate but the issue is still there.
> USB_QUIRK_NO_LPM is used instead so no other parts are needed.

Oh, all right.  This change looks okay to me.  Has AceLan Kao tested 
it?

Alan Stern
Kai-Heng Feng Jan. 10, 2020, 4:46 p.m. UTC | #4
On Sat, Jan 11, 2020 at 12:36 AM Alan Stern <stern@rowland.harvard.edu> wrote:
>
> On Fri, 10 Jan 2020, Kai-Heng Feng wrote:
>
> > On Fri, Jan 10, 2020 at 11:40 PM Alan Stern <stern@rowland.harvard.edu> wrote:
> > >
> > > On Fri, 10 Jan 2020, Kai-Heng Feng wrote:
> > >
> > > > Realtek Hub (0bda:0x0487) used in Dell Dock WD19 sometimes drops off the
> > > > bus when bringing underlying ports from U3 to U0.
> > > >
> > > > Disabling LPM on the hub during setting link state is not enough, so
> > > > let's disable LPM completely for this hub.
> > > >
> > > > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > > > ---
> > > >  drivers/usb/core/quirks.c | 3 +++
> > > >  1 file changed, 3 insertions(+)
> > > >
> > > > diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
> > > > index 6b6413073584..2fb7c1602280 100644
> > > > --- a/drivers/usb/core/quirks.c
> > > > +++ b/drivers/usb/core/quirks.c
> > > > @@ -371,6 +371,9 @@ static const struct usb_device_id usb_quirk_list[] = {
> > > >       { USB_DEVICE(0x0b05, 0x17e0), .driver_info =
> > > >                       USB_QUIRK_IGNORE_REMOTE_WAKEUP },
> > > >
> > > > +     /* Realtek hub in Dell WD19 (Type-C) */
> > > > +     { USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM },
> > > > +
> > > >       /* Action Semiconductor flash disk */
> > > >       { USB_DEVICE(0x10d6, 0x2200), .driver_info =
> > > >                       USB_QUIRK_STRING_FETCH_255 },
> > > >
> > >
> > > This is a very partial patch.  There were four hunks in the original
> > > version but there's only one hunk in V2.
> >
> > Because the original approach is insufficient, it significantly
> > reduced the fail rate but the issue is still there.
> > USB_QUIRK_NO_LPM is used instead so no other parts are needed.
>
> Oh, all right.  This change looks okay to me.  Has AceLan Kao tested
> it?

He didn't test it. I have physical access to the hardware and I've
thoroughly tested it.

Kai-Heng

>
> Alan Stern
>
Greg Kroah-Hartman Jan. 11, 2020, 7:23 p.m. UTC | #5
On Fri, Jan 10, 2020 at 04:02:11PM +0800, Kai-Heng Feng wrote:
> Realtek Hub (0bda:0x0487) used in Dell Dock WD19 sometimes drops off the
> bus when bringing underlying ports from U3 to U0.
> 
> Disabling LPM on the hub during setting link state is not enough, so
> let's disable LPM completely for this hub.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/usb/core/quirks.c | 3 +++
>  1 file changed, 3 insertions(+)

What changed from v1?  Always put that below the --- line.

Also I only see 1 patch here, what happened to the first two?

Please resend the whole series, and properly document what went on, you
know this...

thanks,

greg k-h
Kai-Heng Feng Jan. 13, 2020, 9:06 a.m. UTC | #6
On Sun, Jan 12, 2020 at 4:01 AM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Fri, Jan 10, 2020 at 04:02:11PM +0800, Kai-Heng Feng wrote:
> > Realtek Hub (0bda:0x0487) used in Dell Dock WD19 sometimes drops off the
> > bus when bringing underlying ports from U3 to U0.
> >
> > Disabling LPM on the hub during setting link state is not enough, so
> > let's disable LPM completely for this hub.
> >
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > ---
> >  drivers/usb/core/quirks.c | 3 +++
> >  1 file changed, 3 insertions(+)
>
> What changed from v1?  Always put that below the --- line.
>
> Also I only see 1 patch here, what happened to the first two?

The first two are can be actually treat separately, since they are
more generic fixes for xHCI.

>
> Please resend the whole series, and properly document what went on, you
> know this...

I forgot that, will do in next version.

Kai-Heng

>
> thanks,
>
> greg k-h
diff mbox series

Patch

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 6b6413073584..2fb7c1602280 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -371,6 +371,9 @@  static const struct usb_device_id usb_quirk_list[] = {
 	{ USB_DEVICE(0x0b05, 0x17e0), .driver_info =
 			USB_QUIRK_IGNORE_REMOTE_WAKEUP },
 
+	/* Realtek hub in Dell WD19 (Type-C) */
+	{ USB_DEVICE(0x0bda, 0x0487), .driver_info = USB_QUIRK_NO_LPM },
+
 	/* Action Semiconductor flash disk */
 	{ USB_DEVICE(0x10d6, 0x2200), .driver_info =
 			USB_QUIRK_STRING_FETCH_255 },