All of lore.kernel.org
 help / color / mirror / Atom feed
* [4/4] xhci: Fix front USB ports on ASUS PRIME B350M-A
@ 2018-03-09  3:29 Kai-Heng Feng
  0 siblings, 0 replies; 4+ messages in thread
From: Kai-Heng Feng @ 2018-03-09  3:29 UTC (permalink / raw)
  To: Greg KH; +Cc: Mathias Nyman, linux-usb

Hi,

> On Mar 9, 2018, at 1:06 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Thu, Mar 08, 2018 at 05:17:17PM +0200, Mathias Nyman wrote:
>> From: Kai-Heng Feng <kai.heng.feng@canonical.com>
>>
>> When a USB device gets plugged on ASUS PRIME B350M-A's front ports, the
>> xHC stops working:
>> [  549.114587] xhci_hcd 0000:02:00.0: WARN: xHC CMD_RUN timeout
>> [  549.114608] suspend_common(): xhci_pci_suspend+0x0/0xc0 returns -110
>> [  549.114638] xhci_hcd 0000:02:00.0: can't suspend  
>> (hcd_pci_runtime_suspend returned -110)
>>
>> Delay before running xHC command CMD_RUN can workaround the issue.
>>
>> Use a new quirk to make the delay only targets to the affected xHC.
>>
>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>> ---
>>  drivers/usb/host/xhci-pci.c | 3 +++
>>  drivers/usb/host/xhci.c     | 3 +++
>>  drivers/usb/host/xhci.h     | 1 +
>>  3 files changed, 7 insertions(+)
>
> Any reason this shouldn't go to the stable kernel trees?

It would be really nice to have this in stable tree.

Kai-Heng

>
> thanks,
>
> greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [4/4] xhci: Fix front USB ports on ASUS PRIME B350M-A
@ 2018-03-09 17:06 Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2018-03-09 17:06 UTC (permalink / raw)
  To: Kai Heng Feng; +Cc: Mathias Nyman, linux-usb

On Fri, Mar 09, 2018 at 11:29:20AM +0800, Kai Heng Feng wrote:
> Hi,
> 
> > On Mar 9, 2018, at 1:06 AM, Greg KH <gregkh@linuxfoundation.org> wrote:
> > 
> > On Thu, Mar 08, 2018 at 05:17:17PM +0200, Mathias Nyman wrote:
> > > From: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > > 
> > > When a USB device gets plugged on ASUS PRIME B350M-A's front ports, the
> > > xHC stops working:
> > > [  549.114587] xhci_hcd 0000:02:00.0: WARN: xHC CMD_RUN timeout
> > > [  549.114608] suspend_common(): xhci_pci_suspend+0x0/0xc0 returns -110
> > > [  549.114638] xhci_hcd 0000:02:00.0: can't suspend
> > > (hcd_pci_runtime_suspend returned -110)
> > > 
> > > Delay before running xHC command CMD_RUN can workaround the issue.
> > > 
> > > Use a new quirk to make the delay only targets to the affected xHC.
> > > 
> > > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > > Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> > > ---
> > >  drivers/usb/host/xhci-pci.c | 3 +++
> > >  drivers/usb/host/xhci.c     | 3 +++
> > >  drivers/usb/host/xhci.h     | 1 +
> > >  3 files changed, 7 insertions(+)
> > 
> > Any reason this shouldn't go to the stable kernel trees?
> 
> It would be really nice to have this in stable tree.

Great, will do so, thanks for the quick response.

greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [4/4] xhci: Fix front USB ports on ASUS PRIME B350M-A
@ 2018-03-08 17:06 Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2018-03-08 17:06 UTC (permalink / raw)
  To: Mathias Nyman; +Cc: linux-usb, Kai-Heng Feng

On Thu, Mar 08, 2018 at 05:17:17PM +0200, Mathias Nyman wrote:
> From: Kai-Heng Feng <kai.heng.feng@canonical.com>
> 
> When a USB device gets plugged on ASUS PRIME B350M-A's front ports, the
> xHC stops working:
> [  549.114587] xhci_hcd 0000:02:00.0: WARN: xHC CMD_RUN timeout
> [  549.114608] suspend_common(): xhci_pci_suspend+0x0/0xc0 returns -110
> [  549.114638] xhci_hcd 0000:02:00.0: can't suspend (hcd_pci_runtime_suspend returned -110)
> 
> Delay before running xHC command CMD_RUN can workaround the issue.
> 
> Use a new quirk to make the delay only targets to the affected xHC.
> 
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> ---
>  drivers/usb/host/xhci-pci.c | 3 +++
>  drivers/usb/host/xhci.c     | 3 +++
>  drivers/usb/host/xhci.h     | 1 +
>  3 files changed, 7 insertions(+)

Any reason this shouldn't go to the stable kernel trees?

thanks,

greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [4/4] xhci: Fix front USB ports on ASUS PRIME B350M-A
@ 2018-03-08 15:17 Mathias Nyman
  0 siblings, 0 replies; 4+ messages in thread
From: Mathias Nyman @ 2018-03-08 15:17 UTC (permalink / raw)
  To: gregkh; +Cc: linux-usb, Kai-Heng Feng, Mathias Nyman

From: Kai-Heng Feng <kai.heng.feng@canonical.com>

When a USB device gets plugged on ASUS PRIME B350M-A's front ports, the
xHC stops working:
[  549.114587] xhci_hcd 0000:02:00.0: WARN: xHC CMD_RUN timeout
[  549.114608] suspend_common(): xhci_pci_suspend+0x0/0xc0 returns -110
[  549.114638] xhci_hcd 0000:02:00.0: can't suspend (hcd_pci_runtime_suspend returned -110)

Delay before running xHC command CMD_RUN can workaround the issue.

Use a new quirk to make the delay only targets to the affected xHC.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
 drivers/usb/host/xhci-pci.c | 3 +++
 drivers/usb/host/xhci.c     | 3 +++
 drivers/usb/host/xhci.h     | 1 +
 3 files changed, 7 insertions(+)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 5262fa5..d9f831b 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -126,6 +126,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 	if (pdev->vendor == PCI_VENDOR_ID_AMD && usb_amd_find_chipset_info())
 		xhci->quirks |= XHCI_AMD_PLL_FIX;
 
+	if (pdev->vendor == PCI_VENDOR_ID_AMD && pdev->device == 0x43bb)
+		xhci->quirks |= XHCI_SUSPEND_DELAY;
+
 	if (pdev->vendor == PCI_VENDOR_ID_AMD)
 		xhci->quirks |= XHCI_TRUST_TX_LENGTH;
 
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 25d4b748..5d37700 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -877,6 +877,9 @@ int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup)
 	clear_bit(HCD_FLAG_POLL_RH, &xhci->shared_hcd->flags);
 	del_timer_sync(&xhci->shared_hcd->rh_timer);
 
+	if (xhci->quirks & XHCI_SUSPEND_DELAY)
+		usleep_range(1000, 1500);
+
 	spin_lock_irq(&xhci->lock);
 	clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
 	clear_bit(HCD_FLAG_HW_ACCESSIBLE, &xhci->shared_hcd->flags);
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index d20e57b..866e141 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1826,6 +1826,7 @@ struct xhci_hcd {
 #define XHCI_U2_DISABLE_WAKE	(1 << 27)
 #define XHCI_ASMEDIA_MODIFY_FLOWCONTROL	(1 << 28)
 #define XHCI_HW_LPM_DISABLE	(1 << 29)
+#define XHCI_SUSPEND_DELAY	(1 << 30)
 
 	unsigned int		num_active_eps;
 	unsigned int		limit_active_eps;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-09 17:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-09  3:29 [4/4] xhci: Fix front USB ports on ASUS PRIME B350M-A Kai-Heng Feng
  -- strict thread matches above, loose matches on Subject: below --
2018-03-09 17:06 Greg Kroah-Hartman
2018-03-08 17:06 Greg Kroah-Hartman
2018-03-08 15:17 Mathias Nyman

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.