* PATCH: Fix problem with xhci resume from suspend
@ 2024-09-17 18:47 Jose Alberto Reguero
2024-09-17 20:45 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Jose Alberto Reguero @ 2024-09-17 18:47 UTC (permalink / raw)
To: linux-usb, Mathias Nyman
I have a ASUS PN51 S mini pc that has two xhci devices. One from AMD,
and other from ASMEDIA. The one from ASMEDIA have problems when resume
from suspend, and keep broken until unplug the power cord. I use this
kernel parameter: xhci-hcd.quirks=128 and then it works ok. I make a
path to reset only the ASMEDIA xhci.
Signed-off-by: Jose Alberto Reguero <jose.alberto.reguero@gmail.com>
diff -ur linux-6.10.8/drivers/usb/host/xhci-pci.c
linux-6.10.8.new/drivers/usb/host/xhci-pci.c
--- linux-6.10.8/drivers/usb/host/xhci-pci.c 2024-09-04 13:30:16.000000000 +0200
+++ linux-6.10.8.new/drivers/usb/host/xhci-pci.c 2024-09-12
19:37:14.378870385 +0200
@@ -76,6 +76,7 @@
#define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
#define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
+#define PCI_DEVICE_ID_ASMEDIA_3042_XHCI 0x3042
#define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
static const char hcd_name[] = "xhci_hcd";
@@ -447,6 +448,10 @@
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
+ if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
+ pdev->device == PCI_DEVICE_ID_ASMEDIA_3042_XHCI)
+ xhci->quirks |= XHCI_RESET_ON_RESUME;
+
if (pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241)
xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: Fix problem with xhci resume from suspend
2024-09-17 18:47 PATCH: Fix problem with xhci resume from suspend Jose Alberto Reguero
@ 2024-09-17 20:45 ` Greg KH
2024-09-17 21:35 ` Jose Alberto Reguero
2024-09-17 22:10 ` jose.alberto.reguero
0 siblings, 2 replies; 6+ messages in thread
From: Greg KH @ 2024-09-17 20:45 UTC (permalink / raw)
To: Jose Alberto Reguero; +Cc: linux-usb, Mathias Nyman
On Tue, Sep 17, 2024 at 08:47:43PM +0200, Jose Alberto Reguero wrote:
> I have a ASUS PN51 S mini pc that has two xhci devices. One from AMD,
> and other from ASMEDIA. The one from ASMEDIA have problems when resume
> from suspend, and keep broken until unplug the power cord. I use this
> kernel parameter: xhci-hcd.quirks=128 and then it works ok. I make a
> path to reset only the ASMEDIA xhci.
>
>
> Signed-off-by: Jose Alberto Reguero <jose.alberto.reguero@gmail.com>
>
> diff -ur linux-6.10.8/drivers/usb/host/xhci-pci.c
> linux-6.10.8.new/drivers/usb/host/xhci-pci.c
> --- linux-6.10.8/drivers/usb/host/xhci-pci.c 2024-09-04 13:30:16.000000000 +0200
> +++ linux-6.10.8.new/drivers/usb/host/xhci-pci.c 2024-09-12
> 19:37:14.378870385 +0200
> @@ -76,6 +76,7 @@
> #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
> #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
> #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
> +#define PCI_DEVICE_ID_ASMEDIA_3042_XHCI 0x3042
> #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
>
> static const char hcd_name[] = "xhci_hcd";
> @@ -447,6 +448,10 @@
> pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
> xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
>
> + if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
> + pdev->device == PCI_DEVICE_ID_ASMEDIA_3042_XHCI)
> + xhci->quirks |= XHCI_RESET_ON_RESUME;
Something went wrong with the whitespace here, can you try sending it
again? You can't use cut/paste from a web client for patches, the email
documentation should explain how to do this properly from gmail if you
have problems.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: Fix problem with xhci resume from suspend
2024-09-17 20:45 ` Greg KH
@ 2024-09-17 21:35 ` Jose Alberto Reguero
2024-09-18 5:39 ` Greg KH
2024-09-17 22:10 ` jose.alberto.reguero
1 sibling, 1 reply; 6+ messages in thread
From: Jose Alberto Reguero @ 2024-09-17 21:35 UTC (permalink / raw)
To: Greg KH; +Cc: linux-usb, Mathias Nyman
Than you. I resubmit the patch.
Jose Alberto Reguero
diff -ur linux-6.10.8/drivers/usb/host/xhci-pci.c
linux-6.10.8.new/drivers/usb/host/xhci-pci.c
--- linux-6.10.8/drivers/usb/host/xhci-pci.c 2024-09-04
13:30:16.000000000 +0200
+++ linux-6.10.8.new/drivers/usb/host/xhci-pci.c 2024-09-12
19:37:14.378870385 +0200
@@ -76,6 +76,7 @@
#define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
#define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
+#define PCI_DEVICE_ID_ASMEDIA_3042_XHCI 0x3042
#define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
static const char hcd_name[] = "xhci_hcd";
@@ -447,6 +448,10 @@
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
+ if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
+ pdev->device == PCI_DEVICE_ID_ASMEDIA_3042_XHCI)
+ xhci->quirks |= XHCI_RESET_ON_RESUME;
+
if (pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241)
xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7;
El mar, 17 sept 2024 a las 22:45, Greg KH
(<gregkh@linuxfoundation.org>) escribió:
>
> On Tue, Sep 17, 2024 at 08:47:43PM +0200, Jose Alberto Reguero wrote:
> > I have a ASUS PN51 S mini pc that has two xhci devices. One from AMD,
> > and other from ASMEDIA. The one from ASMEDIA have problems when resume
> > from suspend, and keep broken until unplug the power cord. I use this
> > kernel parameter: xhci-hcd.quirks=128 and then it works ok. I make a
> > path to reset only the ASMEDIA xhci.
> >
> >
> > Signed-off-by: Jose Alberto Reguero <jose.alberto.reguero@gmail.com>
> >
> > diff -ur linux-6.10.8/drivers/usb/host/xhci-pci.c
> > linux-6.10.8.new/drivers/usb/host/xhci-pci.c
> > --- linux-6.10.8/drivers/usb/host/xhci-pci.c 2024-09-04 13:30:16.000000000 +0200
> > +++ linux-6.10.8.new/drivers/usb/host/xhci-pci.c 2024-09-12
> > 19:37:14.378870385 +0200
> > @@ -76,6 +76,7 @@
> > #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
> > #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
> > #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
> > +#define PCI_DEVICE_ID_ASMEDIA_3042_XHCI 0x3042
> > #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
> >
> > static const char hcd_name[] = "xhci_hcd";
> > @@ -447,6 +448,10 @@
> > pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
> > xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
> >
> > + if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
> > + pdev->device == PCI_DEVICE_ID_ASMEDIA_3042_XHCI)
> > + xhci->quirks |= XHCI_RESET_ON_RESUME;
>
> Something went wrong with the whitespace here, can you try sending it
> again? You can't use cut/paste from a web client for patches, the email
> documentation should explain how to do this properly from gmail if you
> have problems.
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: Fix problem with xhci resume from suspend
2024-09-17 20:45 ` Greg KH
2024-09-17 21:35 ` Jose Alberto Reguero
@ 2024-09-17 22:10 ` jose.alberto.reguero
2024-09-18 5:39 ` Greg KH
1 sibling, 1 reply; 6+ messages in thread
From: jose.alberto.reguero @ 2024-09-17 22:10 UTC (permalink / raw)
To: Greg KH; +Cc: linux-usb, Mathias Nyman
El mar, 17-09-2024 a las 22:45 +0200, Greg KH escribió:
> On Tue, Sep 17, 2024 at 08:47:43PM +0200, Jose Alberto Reguero wrote:
> > I have a ASUS PN51 S mini pc that has two xhci devices. One from
> > AMD,
> > and other from ASMEDIA. The one from ASMEDIA have problems when
> > resume
> > from suspend, and keep broken until unplug the power cord. I use
> > this
> > kernel parameter: xhci-hcd.quirks=128 and then it works ok. I make
> > a
> > path to reset only the ASMEDIA xhci.
> >
> >
> > Signed-off-by: Jose Alberto Reguero
> > <jose.alberto.reguero@gmail.com>
> >
> > diff -ur linux-6.10.8/drivers/usb/host/xhci-pci.c
> > linux-6.10.8.new/drivers/usb/host/xhci-pci.c
> > --- linux-6.10.8/drivers/usb/host/xhci-pci.c 2024-09-04
> > 13:30:16.000000000 +0200
> > +++ linux-6.10.8.new/drivers/usb/host/xhci-pci.c 2024-09-12
> > 19:37:14.378870385 +0200
> > @@ -76,6 +76,7 @@
> > #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
> > #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
> > #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
> > +#define PCI_DEVICE_ID_ASMEDIA_3042_XHCI 0x3042
> > #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
> >
> > static const char hcd_name[] = "xhci_hcd";
> > @@ -447,6 +448,10 @@
> > pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
> > xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
> >
> > + if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
> > + pdev->device == PCI_DEVICE_ID_ASMEDIA_3042_XHCI)
> > + xhci->quirks |= XHCI_RESET_ON_RESUME;
>
> Something went wrong with the whitespace here, can you try sending it
> again? You can't use cut/paste from a web client for patches, the
> email
> documentation should explain how to do this properly from gmail if
> you
> have problems.
>
> thanks,
>
> greg k-h
Sorry, submit it again. Hope this time is alright.
Jose Alberto Reguero
diff -ur linux-6.10.8/drivers/usb/host/xhci-pci.c linux-
6.10.8.new/drivers/usb/host/xhci-pci.c
--- linux-6.10.8/drivers/usb/host/xhci-pci.c 2024-09-04
13:30:16.000000000 +0200
+++ linux-6.10.8.new/drivers/usb/host/xhci-pci.c 2024-09-12
19:37:14.378870385 +0200
@@ -76,6 +76,7 @@
#define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
#define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
+#define PCI_DEVICE_ID_ASMEDIA_3042_XHCI 0x3042
#define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
static const char hcd_name[] = "xhci_hcd";
@@ -447,6 +448,10 @@
pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
+ if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
+ pdev->device == PCI_DEVICE_ID_ASMEDIA_3042_XHCI)
+ xhci->quirks |= XHCI_RESET_ON_RESUME;
+
if (pdev->vendor == PCI_VENDOR_ID_TI && pdev->device ==
0x8241)
xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7;
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: Fix problem with xhci resume from suspend
2024-09-17 22:10 ` jose.alberto.reguero
@ 2024-09-18 5:39 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2024-09-18 5:39 UTC (permalink / raw)
To: jose.alberto.reguero; +Cc: linux-usb, Mathias Nyman
On Wed, Sep 18, 2024 at 12:10:24AM +0200, jose.alberto.reguero@gmail.com wrote:
> El mar, 17-09-2024 a las 22:45 +0200, Greg KH escribió:
> > On Tue, Sep 17, 2024 at 08:47:43PM +0200, Jose Alberto Reguero wrote:
> > > I have a ASUS PN51 S mini pc that has two xhci devices. One from
> > > AMD,
> > > and other from ASMEDIA. The one from ASMEDIA have problems when
> > > resume
> > > from suspend, and keep broken until unplug the power cord. I use
> > > this
> > > kernel parameter: xhci-hcd.quirks=128 and then it works ok. I make
> > > a
> > > path to reset only the ASMEDIA xhci.
> > >
> > >
> > > Signed-off-by: Jose Alberto Reguero
> > > <jose.alberto.reguero@gmail.com>
> > >
> > > diff -ur linux-6.10.8/drivers/usb/host/xhci-pci.c
> > > linux-6.10.8.new/drivers/usb/host/xhci-pci.c
> > > --- linux-6.10.8/drivers/usb/host/xhci-pci.c 2024-09-04
> > > 13:30:16.000000000 +0200
> > > +++ linux-6.10.8.new/drivers/usb/host/xhci-pci.c 2024-09-12
> > > 19:37:14.378870385 +0200
> > > @@ -76,6 +76,7 @@
> > > #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
> > > #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
> > > #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
> > > +#define PCI_DEVICE_ID_ASMEDIA_3042_XHCI 0x3042
> > > #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
> > >
> > > static const char hcd_name[] = "xhci_hcd";
> > > @@ -447,6 +448,10 @@
> > > pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
> > > xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
> > >
> > > + if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
> > > + pdev->device == PCI_DEVICE_ID_ASMEDIA_3042_XHCI)
> > > + xhci->quirks |= XHCI_RESET_ON_RESUME;
> >
> > Something went wrong with the whitespace here, can you try sending it
> > again? You can't use cut/paste from a web client for patches, the
> > email
> > documentation should explain how to do this properly from gmail if
> > you
> > have problems.
> >
> > thanks,
> >
> > greg k-h
>
> Sorry, submit it again. Hope this time is alright.
>
> Jose Alberto Reguero
>
> diff -ur linux-6.10.8/drivers/usb/host/xhci-pci.c linux-
> 6.10.8.new/drivers/usb/host/xhci-pci.c
> --- linux-6.10.8/drivers/usb/host/xhci-pci.c 2024-09-04
> 13:30:16.000000000 +0200
> +++ linux-6.10.8.new/drivers/usb/host/xhci-pci.c 2024-09-12
> 19:37:14.378870385 +0200
> @@ -76,6 +76,7 @@
> #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
> #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
> #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
> +#define PCI_DEVICE_ID_ASMEDIA_3042_XHCI 0x3042
> #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
>
> static const char hcd_name[] = "xhci_hcd";
> @@ -447,6 +448,10 @@
> pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
> xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
>
> + if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
> + pdev->device == PCI_DEVICE_ID_ASMEDIA_3042_XHCI)
> + xhci->quirks |= XHCI_RESET_ON_RESUME;
> +
> if (pdev->vendor == PCI_VENDOR_ID_TI && pdev->device ==
> 0x8241)
It is line-wrapped :(
Try sending it to yourself first, and then see if you can apply it to
the tree from that email.
Or use 'git send-email' that will do it all properly for you, we
recommend that.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: PATCH: Fix problem with xhci resume from suspend
2024-09-17 21:35 ` Jose Alberto Reguero
@ 2024-09-18 5:39 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2024-09-18 5:39 UTC (permalink / raw)
To: Jose Alberto Reguero; +Cc: linux-usb, Mathias Nyman
On Tue, Sep 17, 2024 at 11:35:53PM +0200, Jose Alberto Reguero wrote:
> Than you. I resubmit the patch.
>
> Jose Alberto Reguero
>
> diff -ur linux-6.10.8/drivers/usb/host/xhci-pci.c
> linux-6.10.8.new/drivers/usb/host/xhci-pci.c
> --- linux-6.10.8/drivers/usb/host/xhci-pci.c 2024-09-04
> 13:30:16.000000000 +0200
> +++ linux-6.10.8.new/drivers/usb/host/xhci-pci.c 2024-09-12
> 19:37:14.378870385 +0200
> @@ -76,6 +76,7 @@
> #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142
> #define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242
> #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142
> +#define PCI_DEVICE_ID_ASMEDIA_3042_XHCI 0x3042
> #define PCI_DEVICE_ID_ASMEDIA_3242_XHCI 0x3242
>
> static const char hcd_name[] = "xhci_hcd";
> @@ -447,6 +448,10 @@
> pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
> xhci->quirks |= XHCI_ASMEDIA_MODIFY_FLOWCONTROL;
>
> + if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
> + pdev->device == PCI_DEVICE_ID_ASMEDIA_3042_XHCI)
> + xhci->quirks |= XHCI_RESET_ON_RESUME;
> +
> if (pdev->vendor == PCI_VENDOR_ID_TI && pdev->device == 0x8241)
> xhci->quirks |= XHCI_LIMIT_ENDPOINT_INTERVAL_7;
Tabs are all stripped out :(
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-09-18 5:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-17 18:47 PATCH: Fix problem with xhci resume from suspend Jose Alberto Reguero
2024-09-17 20:45 ` Greg KH
2024-09-17 21:35 ` Jose Alberto Reguero
2024-09-18 5:39 ` Greg KH
2024-09-17 22:10 ` jose.alberto.reguero
2024-09-18 5:39 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox