2020-07-27 09:08:27

by Forest Crossman

[permalink] [raw]
Subject: [PATCH 0/2] Small fixes for ASMedia host controllers

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


2020-07-27 09:08:47

by Forest Crossman

[permalink] [raw]
Subject: [PATCH 1/2] usb: xhci: define IDs for various ASMedia host controllers

Signed-off-by: Forest Crossman <[email protected]>
---
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

2020-07-27 09:11:09

by Forest Crossman

[permalink] [raw]
Subject: [PATCH 2/2] usb: xhci: Fix ASMedia ASM1142 DMA addressing

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 <[email protected]>
---
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

2020-07-27 09:29:42

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 1/2] usb: xhci: define IDs for various ASMedia host controllers

On Mon, Jul 27, 2020 at 04:06:28AM -0500, Forest Crossman wrote:
> Signed-off-by: Forest Crossman <[email protected]>

I can not take patches without any changelog text, sorry.

greg k-h

2020-07-27 10:05:01

by Forest Crossman

[permalink] [raw]
Subject: Re: [PATCH 1/2] usb: xhci: define IDs for various ASMedia host controllers

On Mon, Jul 27, 2020 at 4:26 AM Greg KH <[email protected]> wrote:
>
> On Mon, Jul 27, 2020 at 04:06:28AM -0500, Forest Crossman wrote:
> > Signed-off-by: Forest Crossman <[email protected]>
>
> 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

2020-07-27 10:55:50

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 1/2] usb: xhci: define IDs for various ASMedia host controllers

On Mon, Jul 27, 2020 at 05:03:43AM -0500, Forest Crossman wrote:
> On Mon, Jul 27, 2020 at 4:26 AM Greg KH <[email protected]> wrote:
> >
> > On Mon, Jul 27, 2020 at 04:06:28AM -0500, Forest Crossman wrote:
> > > Signed-off-by: Forest Crossman <[email protected]>
> >
> > 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

2020-07-28 04:25:08

by Forest Crossman

[permalink] [raw]
Subject: [PATCH v2 0/2] Small fixes for ASMedia host controllers

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

2020-07-28 04:28:01

by Forest Crossman

[permalink] [raw]
Subject: [PATCH v2 1/2] usb: xhci: define IDs for various ASMedia host controllers

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 <[email protected]>
---
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

2020-07-28 04:29:13

by Forest Crossman

[permalink] [raw]
Subject: [PATCH v2 2/2] usb: xhci: Fix ASMedia ASM1142 DMA addressing

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 <[email protected]>
---
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

2020-07-28 11:18:01

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] Small fixes for ASMedia host controllers

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

2020-07-28 12:39:35

by Mathias Nyman

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] Small fixes for ASMedia host controllers

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 <[email protected]>

Note that I'll be away most of this and the the next week so response will be slow.

Thanks
-Mathias

2020-07-29 18:11:11

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] usb: xhci: define IDs for various ASMedia host controllers

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 <[email protected]>
> ---
> 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