* [PATCH 0/2] Small fixes for ASMedia host controllers
@ 2020-07-27 9:06 Forest Crossman
2020-07-27 9:06 ` [PATCH 1/2] usb: xhci: define IDs for various " Forest Crossman
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Forest Crossman @ 2020-07-27 9:06 UTC (permalink / raw)
To: linux-usb; +Cc: Forest Crossman, mathias.nyman, gregkh, linux-kernel
The first patch just defines some host controller device IDs to make the
code a bit easier to read (since the controller part number is not
always the same as the DID) and to prepare for the next patch.
The second patch defines a new device ID for the ASM1142 and enables the
XHCI_NO_64BIT_SUPPORT quirk for that device, since it has the same
problem with truncating the higher bits as the ASM2142/ASM3142.
Forest Crossman (2):
usb: xhci: define IDs for various ASMedia host controllers
usb: xhci: Fix ASMedia ASM1142 DMA addressing
drivers/usb/host/xhci-pci.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 12+ messages in thread* [PATCH 1/2] usb: xhci: define IDs for various ASMedia host controllers 2020-07-27 9:06 [PATCH 0/2] Small fixes for ASMedia host controllers Forest Crossman @ 2020-07-27 9:06 ` Forest Crossman 2020-07-27 9:26 ` Greg KH 2020-07-27 9:06 ` [PATCH 2/2] usb: xhci: Fix ASMedia ASM1142 DMA addressing Forest Crossman 2020-07-28 4:24 ` [PATCH v2 0/2] Small fixes for ASMedia host controllers Forest Crossman 2 siblings, 1 reply; 12+ messages in thread From: Forest Crossman @ 2020-07-27 9:06 UTC (permalink / raw) To: linux-usb; +Cc: Forest Crossman, mathias.nyman, gregkh, linux-kernel Signed-off-by: Forest Crossman <cyrozap@gmail.com> --- drivers/usb/host/xhci-pci.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 9234c82e70e4..baa5af88ca67 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -57,7 +57,9 @@ #define PCI_DEVICE_ID_AMD_PROMONTORYA_3 0x43ba #define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb #define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc +#define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 +#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142 static const char hcd_name[] = "xhci_hcd"; @@ -260,13 +262,13 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |= XHCI_LPM_SUPPORT; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == 0x1042) + pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) xhci->quirks |= XHCI_BROKEN_STREAMS; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == 0x1142) + pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == 0x2142) + pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI) xhci->quirks |= XHCI_NO_64BIT_SUPPORT; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] usb: xhci: define IDs for various ASMedia host controllers 2020-07-27 9:06 ` [PATCH 1/2] usb: xhci: define IDs for various " Forest Crossman @ 2020-07-27 9:26 ` Greg KH 2020-07-27 10:03 ` Forest Crossman 0 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2020-07-27 9:26 UTC (permalink / raw) To: Forest Crossman; +Cc: linux-usb, mathias.nyman, linux-kernel On Mon, Jul 27, 2020 at 04:06:28AM -0500, Forest Crossman wrote: > Signed-off-by: Forest Crossman <cyrozap@gmail.com> I can not take patches without any changelog text, sorry. greg k-h ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] usb: xhci: define IDs for various ASMedia host controllers 2020-07-27 9:26 ` Greg KH @ 2020-07-27 10:03 ` Forest Crossman 2020-07-27 10:12 ` Greg KH 0 siblings, 1 reply; 12+ messages in thread From: Forest Crossman @ 2020-07-27 10:03 UTC (permalink / raw) To: Greg KH; +Cc: linux-usb, mathias.nyman, linux-kernel On Mon, Jul 27, 2020 at 4:26 AM Greg KH <gregkh@linuxfoundation.org> wrote: > > On Mon, Jul 27, 2020 at 04:06:28AM -0500, Forest Crossman wrote: > > Signed-off-by: Forest Crossman <cyrozap@gmail.com> > > I can not take patches without any changelog text, sorry. Ah, whoops, I'm very sorry about that! Should I send a v2 of just this patch? Or would it be better to send the whole series again? Thanks, Forest ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] usb: xhci: define IDs for various ASMedia host controllers 2020-07-27 10:03 ` Forest Crossman @ 2020-07-27 10:12 ` Greg KH 0 siblings, 0 replies; 12+ messages in thread From: Greg KH @ 2020-07-27 10:12 UTC (permalink / raw) To: Forest Crossman; +Cc: linux-usb, mathias.nyman, linux-kernel On Mon, Jul 27, 2020 at 05:03:43AM -0500, Forest Crossman wrote: > On Mon, Jul 27, 2020 at 4:26 AM Greg KH <gregkh@linuxfoundation.org> wrote: > > > > On Mon, Jul 27, 2020 at 04:06:28AM -0500, Forest Crossman wrote: > > > Signed-off-by: Forest Crossman <cyrozap@gmail.com> > > > > I can not take patches without any changelog text, sorry. > > Ah, whoops, I'm very sorry about that! Should I send a v2 of just this > patch? Or would it be better to send the whole series again? Whole series is always easier to handle. thanks, greg k-h ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/2] usb: xhci: Fix ASMedia ASM1142 DMA addressing 2020-07-27 9:06 [PATCH 0/2] Small fixes for ASMedia host controllers Forest Crossman 2020-07-27 9:06 ` [PATCH 1/2] usb: xhci: define IDs for various " Forest Crossman @ 2020-07-27 9:06 ` Forest Crossman 2020-07-28 4:24 ` [PATCH v2 0/2] Small fixes for ASMedia host controllers Forest Crossman 2 siblings, 0 replies; 12+ messages in thread From: Forest Crossman @ 2020-07-27 9:06 UTC (permalink / raw) To: linux-usb; +Cc: Forest Crossman, mathias.nyman, gregkh, linux-kernel I've confirmed that the ASMedia ASM1142 has the same problem as the ASM2142/ASM3142, in that it too reports that it supports 64-bit DMA addresses when in fact it does not. As with the ASM2142/ASM3142, this can cause problems on systems where the upper bits matter, and adding the XHCI_NO_64BIT_SUPPORT quirk completely fixes the issue. Signed-off-by: Forest Crossman <cyrozap@gmail.com> --- drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index baa5af88ca67..3feaafebfe58 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -59,6 +59,7 @@ #define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc #define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 +#define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242 #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142 static const char hcd_name[] = "xhci_hcd"; @@ -268,7 +269,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI) + (pdev->device == PCI_DEVICE_ID_ASMEDIA_1142_XHCI || + pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI)) xhci->quirks |= XHCI_NO_64BIT_SUPPORT; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 0/2] Small fixes for ASMedia host controllers 2020-07-27 9:06 [PATCH 0/2] Small fixes for ASMedia host controllers Forest Crossman 2020-07-27 9:06 ` [PATCH 1/2] usb: xhci: define IDs for various " Forest Crossman 2020-07-27 9:06 ` [PATCH 2/2] usb: xhci: Fix ASMedia ASM1142 DMA addressing Forest Crossman @ 2020-07-28 4:24 ` Forest Crossman 2020-07-28 4:24 ` [PATCH v2 1/2] usb: xhci: define IDs for various " Forest Crossman ` (2 more replies) 2 siblings, 3 replies; 12+ messages in thread From: Forest Crossman @ 2020-07-28 4:24 UTC (permalink / raw) To: linux-usb; +Cc: Forest Crossman, mathias.nyman, gregkh, linux-kernel The first patch just defines some host controller device IDs to make the code a bit easier to read (since the controller part number is not always the same as the DID) and to prepare for the next patch. The second patch defines a new device ID for the ASM1142 and enables the XHCI_NO_64BIT_SUPPORT quirk for that device, since it has the same problem with truncating the higher bits as the ASM2142/ASM3142. Changes since v1: - Added changelog text to the first patch. Forest Crossman (2): usb: xhci: define IDs for various ASMedia host controllers usb: xhci: Fix ASMedia ASM1142 DMA addressing drivers/usb/host/xhci-pci.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 2.20.1 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 1/2] usb: xhci: define IDs for various ASMedia host controllers 2020-07-28 4:24 ` [PATCH v2 0/2] Small fixes for ASMedia host controllers Forest Crossman @ 2020-07-28 4:24 ` Forest Crossman 2020-07-29 18:08 ` Sergei Shtylyov 2020-07-28 4:24 ` [PATCH v2 2/2] usb: xhci: Fix ASMedia ASM1142 DMA addressing Forest Crossman 2020-07-28 11:16 ` [PATCH v2 0/2] Small fixes for ASMedia host controllers Greg KH 2 siblings, 1 reply; 12+ messages in thread From: Forest Crossman @ 2020-07-28 4:24 UTC (permalink / raw) To: linux-usb; +Cc: Forest Crossman, mathias.nyman, gregkh, linux-kernel Not all ASMedia host controllers have a device ID that matches its part number. #define some of these IDs to make it clearer at a glance which chips require what quirks. Signed-off-by: Forest Crossman <cyrozap@gmail.com> --- drivers/usb/host/xhci-pci.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 9234c82e70e4..baa5af88ca67 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -57,7 +57,9 @@ #define PCI_DEVICE_ID_AMD_PROMONTORYA_3 0x43ba #define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb #define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc +#define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 +#define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142 static const char hcd_name[] = "xhci_hcd"; @@ -260,13 +262,13 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |= XHCI_LPM_SUPPORT; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == 0x1042) + pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) xhci->quirks |= XHCI_BROKEN_STREAMS; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == 0x1142) + pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == 0x2142) + pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI) xhci->quirks |= XHCI_NO_64BIT_SUPPORT; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/2] usb: xhci: define IDs for various ASMedia host controllers 2020-07-28 4:24 ` [PATCH v2 1/2] usb: xhci: define IDs for various " Forest Crossman @ 2020-07-29 18:08 ` Sergei Shtylyov 0 siblings, 0 replies; 12+ messages in thread From: Sergei Shtylyov @ 2020-07-29 18:08 UTC (permalink / raw) To: Forest Crossman, linux-usb; +Cc: mathias.nyman, gregkh, linux-kernel Hello! On 7/28/20 7:24 AM, Forest Crossman wrote: > Not all ASMedia host controllers have a device ID that matches its part > number. #define some of these IDs to make it clearer at a glance which > chips require what quirks. > > Signed-off-by: Forest Crossman <cyrozap@gmail.com> > --- > drivers/usb/host/xhci-pci.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c > index 9234c82e70e4..baa5af88ca67 100644 > --- a/drivers/usb/host/xhci-pci.c > +++ b/drivers/usb/host/xhci-pci.c [...] > @@ -260,13 +262,13 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) > xhci->quirks |= XHCI_LPM_SUPPORT; > > if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && > - pdev->device == 0x1042) > + pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) You shouldn't have un-indented it, blends with the branch below. The 80-column line length limit is history now. :-) > xhci->quirks |= XHCI_BROKEN_STREAMS; > if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && > - pdev->device == 0x1142) > + pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) > xhci->quirks |= XHCI_TRUST_TX_LENGTH; > if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && > - pdev->device == 0x2142) > + pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI) > xhci->quirks |= XHCI_NO_64BIT_SUPPORT; > > if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && MBR, Sergei ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 2/2] usb: xhci: Fix ASMedia ASM1142 DMA addressing 2020-07-28 4:24 ` [PATCH v2 0/2] Small fixes for ASMedia host controllers Forest Crossman 2020-07-28 4:24 ` [PATCH v2 1/2] usb: xhci: define IDs for various " Forest Crossman @ 2020-07-28 4:24 ` Forest Crossman 2020-07-28 11:16 ` [PATCH v2 0/2] Small fixes for ASMedia host controllers Greg KH 2 siblings, 0 replies; 12+ messages in thread From: Forest Crossman @ 2020-07-28 4:24 UTC (permalink / raw) To: linux-usb; +Cc: Forest Crossman, mathias.nyman, gregkh, linux-kernel I've confirmed that the ASMedia ASM1142 has the same problem as the ASM2142/ASM3142, in that it too reports that it supports 64-bit DMA addresses when in fact it does not. As with the ASM2142/ASM3142, this can cause problems on systems where the upper bits matter, and adding the XHCI_NO_64BIT_SUPPORT quirk completely fixes the issue. Signed-off-by: Forest Crossman <cyrozap@gmail.com> --- drivers/usb/host/xhci-pci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index baa5af88ca67..3feaafebfe58 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -59,6 +59,7 @@ #define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc #define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 +#define PCI_DEVICE_ID_ASMEDIA_1142_XHCI 0x1242 #define PCI_DEVICE_ID_ASMEDIA_2142_XHCI 0x2142 static const char hcd_name[] = "xhci_hcd"; @@ -268,7 +269,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) xhci->quirks |= XHCI_TRUST_TX_LENGTH; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI) + (pdev->device == PCI_DEVICE_ID_ASMEDIA_1142_XHCI || + pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI)) xhci->quirks |= XHCI_NO_64BIT_SUPPORT; if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/2] Small fixes for ASMedia host controllers 2020-07-28 4:24 ` [PATCH v2 0/2] Small fixes for ASMedia host controllers Forest Crossman 2020-07-28 4:24 ` [PATCH v2 1/2] usb: xhci: define IDs for various " Forest Crossman 2020-07-28 4:24 ` [PATCH v2 2/2] usb: xhci: Fix ASMedia ASM1142 DMA addressing Forest Crossman @ 2020-07-28 11:16 ` Greg KH 2020-07-28 12:40 ` Mathias Nyman 2 siblings, 1 reply; 12+ messages in thread From: Greg KH @ 2020-07-28 11:16 UTC (permalink / raw) To: Forest Crossman; +Cc: linux-usb, mathias.nyman, linux-kernel On Mon, Jul 27, 2020 at 11:24:06PM -0500, Forest Crossman wrote: > The first patch just defines some host controller device IDs to make the > code a bit easier to read (since the controller part number is not > always the same as the DID) and to prepare for the next patch. > > The second patch defines a new device ID for the ASM1142 and enables the > XHCI_NO_64BIT_SUPPORT quirk for that device, since it has the same > problem with truncating the higher bits as the ASM2142/ASM3142. > > > Changes since v1: > - Added changelog text to the first patch. > > > Forest Crossman (2): > usb: xhci: define IDs for various ASMedia host controllers > usb: xhci: Fix ASMedia ASM1142 DMA addressing > > drivers/usb/host/xhci-pci.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) Mathias, any objection for me just taking these now? thanks, greg k-h ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/2] Small fixes for ASMedia host controllers 2020-07-28 11:16 ` [PATCH v2 0/2] Small fixes for ASMedia host controllers Greg KH @ 2020-07-28 12:40 ` Mathias Nyman 0 siblings, 0 replies; 12+ messages in thread From: Mathias Nyman @ 2020-07-28 12:40 UTC (permalink / raw) To: Greg KH, Forest Crossman; +Cc: linux-usb, mathias.nyman, linux-kernel On 28.7.2020 14.16, Greg KH wrote: > On Mon, Jul 27, 2020 at 11:24:06PM -0500, Forest Crossman wrote: >> The first patch just defines some host controller device IDs to make the >> code a bit easier to read (since the controller part number is not >> always the same as the DID) and to prepare for the next patch. >> >> The second patch defines a new device ID for the ASM1142 and enables the >> XHCI_NO_64BIT_SUPPORT quirk for that device, since it has the same >> problem with truncating the higher bits as the ASM2142/ASM3142. >> >> >> Changes since v1: >> - Added changelog text to the first patch. >> >> >> Forest Crossman (2): >> usb: xhci: define IDs for various ASMedia host controllers >> usb: xhci: Fix ASMedia ASM1142 DMA addressing >> >> drivers/usb/host/xhci-pci.c | 10 +++++++--- >> 1 file changed, 7 insertions(+), 3 deletions(-) > > Mathias, any objection for me just taking these now? > No objection Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com> Note that I'll be away most of this and the the next week so response will be slow. Thanks -Mathias ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-07-29 18:08 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-07-27 9:06 [PATCH 0/2] Small fixes for ASMedia host controllers Forest Crossman 2020-07-27 9:06 ` [PATCH 1/2] usb: xhci: define IDs for various " Forest Crossman 2020-07-27 9:26 ` Greg KH 2020-07-27 10:03 ` Forest Crossman 2020-07-27 10:12 ` Greg KH 2020-07-27 9:06 ` [PATCH 2/2] usb: xhci: Fix ASMedia ASM1142 DMA addressing Forest Crossman 2020-07-28 4:24 ` [PATCH v2 0/2] Small fixes for ASMedia host controllers Forest Crossman 2020-07-28 4:24 ` [PATCH v2 1/2] usb: xhci: define IDs for various " Forest Crossman 2020-07-29 18:08 ` Sergei Shtylyov 2020-07-28 4:24 ` [PATCH v2 2/2] usb: xhci: Fix ASMedia ASM1142 DMA addressing Forest Crossman 2020-07-28 11:16 ` [PATCH v2 0/2] Small fixes for ASMedia host controllers Greg KH 2020-07-28 12:40 ` Mathias Nyman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox