All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter
@ 2020-11-06 10:05 Andy Shevchenko
  2020-11-06 10:05 ` [PATCH v2 2/2] PCI: Use predefined Pericom vendor ID Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Andy Shevchenko @ 2020-11-06 10:05 UTC (permalink / raw)
  To: Bjorn Helgaas, linux-pci, johan, linux-usb
  Cc: Andy Shevchenko, alberto.vignani

Pericom PCIe-USB adapter advertises MSI, but documentation says
"The MSI Function is not implemented on this device." in the chapters
7.3.27, 7.3.29-7.3.31.

Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices")
Datasheet: https://www.diodes.com/assets/Datasheets/PI7C9X440SL.pdf
Reported-by: alberto.vignani@fastwebnet.it
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: dropped confusing word (David), added ifdeffery (Ben)
 drivers/pci/quirks.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index f70692ac79c5..e66e0cc8f99b 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -5567,17 +5567,26 @@ static void pci_fixup_no_d0_pme(struct pci_dev *dev)
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASMEDIA, 0x2142, pci_fixup_no_d0_pme);
 
 /*
- * Device [12d8:0x400e] and [12d8:0x400f]
+ * Device 12d8:0x400e [OHCI] and 12d8:0x400f [EHCI]
+ *
  * These devices advertise PME# support in all power states but don't
  * reliably assert it.
+ *
+ * These devices advertise MSI, but documentation (PI7C9X440SL.pdf) says
+ * "The MSI Function is not implemented on this device." in the chapters
+ * 7.3.27, 7.3.29-7.3.31.
  */
-static void pci_fixup_no_pme(struct pci_dev *dev)
+static void pci_fixup_no_msi_no_pme(struct pci_dev *dev)
 {
+#ifdef CONFIG_PCI_MSI
+	pci_info(dev, "The MSI is not implemented on this device, disabling it\n");
+	dev->no_msi = 1;
+#endif
 	pci_info(dev, "PME# is unreliable, disabling it\n");
 	dev->pme_support = 0;
 }
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400e, pci_fixup_no_pme);
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400f, pci_fixup_no_pme);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400e, pci_fixup_no_msi_no_pme);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400f, pci_fixup_no_msi_no_pme);
 
 static void apex_pci_fixup_class(struct pci_dev *pdev)
 {
-- 
2.28.0


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

* [PATCH v2 2/2] PCI: Use predefined Pericom vendor ID
  2020-11-06 10:05 [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter Andy Shevchenko
@ 2020-11-06 10:05 ` Andy Shevchenko
  2020-11-13 23:21 ` [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter Bjorn Helgaas
  2020-11-17 23:32 ` Bjorn Helgaas
  2 siblings, 0 replies; 9+ messages in thread
From: Andy Shevchenko @ 2020-11-06 10:05 UTC (permalink / raw)
  To: Bjorn Helgaas, linux-pci, johan, linux-usb; +Cc: Andy Shevchenko

Pericom has predefined vendor ID, use it instead of hard coded value.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: no changes
 drivers/pci/quirks.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index e66e0cc8f99b..11409f04023c 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2356,9 +2356,9 @@ static void quirk_enable_clear_retrain_link(struct pci_dev *dev)
 	dev->clear_retrain_link = 1;
 	pci_info(dev, "Enable PCIe Retrain Link quirk\n");
 }
-DECLARE_PCI_FIXUP_HEADER(0x12d8, 0xe110, quirk_enable_clear_retrain_link);
-DECLARE_PCI_FIXUP_HEADER(0x12d8, 0xe111, quirk_enable_clear_retrain_link);
-DECLARE_PCI_FIXUP_HEADER(0x12d8, 0xe130, quirk_enable_clear_retrain_link);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PERICOM, 0xe110, quirk_enable_clear_retrain_link);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PERICOM, 0xe111, quirk_enable_clear_retrain_link);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_PERICOM, 0xe130, quirk_enable_clear_retrain_link);
 
 static void fixup_rev1_53c810(struct pci_dev *dev)
 {
-- 
2.28.0


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

* Re: [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter
  2020-11-06 10:05 [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter Andy Shevchenko
  2020-11-06 10:05 ` [PATCH v2 2/2] PCI: Use predefined Pericom vendor ID Andy Shevchenko
@ 2020-11-13 23:21 ` Bjorn Helgaas
  2020-11-16  9:46   ` Andy Shevchenko
  2020-11-17 23:32 ` Bjorn Helgaas
  2 siblings, 1 reply; 9+ messages in thread
From: Bjorn Helgaas @ 2020-11-13 23:21 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Bjorn Helgaas, linux-pci, johan, linux-usb, alberto.vignani

On Fri, Nov 06, 2020 at 12:05:25PM +0200, Andy Shevchenko wrote:
> Pericom PCIe-USB adapter advertises MSI, but documentation says
> "The MSI Function is not implemented on this device." in the chapters
> 7.3.27, 7.3.29-7.3.31.
> 
> Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices")
> Datasheet: https://www.diodes.com/assets/Datasheets/PI7C9X440SL.pdf
> Reported-by: alberto.vignani@fastwebnet.it

Is there a URL to a problem report we can include here?

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> v2: dropped confusing word (David), added ifdeffery (Ben)
>  drivers/pci/quirks.c | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index f70692ac79c5..e66e0cc8f99b 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -5567,17 +5567,26 @@ static void pci_fixup_no_d0_pme(struct pci_dev *dev)
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASMEDIA, 0x2142, pci_fixup_no_d0_pme);
>  
>  /*
> - * Device [12d8:0x400e] and [12d8:0x400f]
> + * Device 12d8:0x400e [OHCI] and 12d8:0x400f [EHCI]
> + *
>   * These devices advertise PME# support in all power states but don't
>   * reliably assert it.
> + *
> + * These devices advertise MSI, but documentation (PI7C9X440SL.pdf) says
> + * "The MSI Function is not implemented on this device." in the chapters
> + * 7.3.27, 7.3.29-7.3.31.
>   */
> -static void pci_fixup_no_pme(struct pci_dev *dev)
> +static void pci_fixup_no_msi_no_pme(struct pci_dev *dev)
>  {
> +#ifdef CONFIG_PCI_MSI
> +	pci_info(dev, "The MSI is not implemented on this device, disabling it\n");
> +	dev->no_msi = 1;
> +#endif
>  	pci_info(dev, "PME# is unreliable, disabling it\n");
>  	dev->pme_support = 0;
>  }
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400e, pci_fixup_no_pme);
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400f, pci_fixup_no_pme);
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400e, pci_fixup_no_msi_no_pme);
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400f, pci_fixup_no_msi_no_pme);
>  
>  static void apex_pci_fixup_class(struct pci_dev *pdev)
>  {
> -- 
> 2.28.0
> 

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

* Re: [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter
  2020-11-13 23:21 ` [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter Bjorn Helgaas
@ 2020-11-16  9:46   ` Andy Shevchenko
  2020-11-16 12:37     ` Bjorn Helgaas
  0 siblings, 1 reply; 9+ messages in thread
From: Andy Shevchenko @ 2020-11-16  9:46 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Bjorn Helgaas, linux-pci, johan, linux-usb, alberto.vignani

On Fri, Nov 13, 2020 at 05:21:38PM -0600, Bjorn Helgaas wrote:
> On Fri, Nov 06, 2020 at 12:05:25PM +0200, Andy Shevchenko wrote:
> > Pericom PCIe-USB adapter advertises MSI, but documentation says
> > "The MSI Function is not implemented on this device." in the chapters
> > 7.3.27, 7.3.29-7.3.31.
> > 
> > Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices")
> > Datasheet: https://www.diodes.com/assets/Datasheets/PI7C9X440SL.pdf
> > Reported-by: alberto.vignani@fastwebnet.it
> 
> Is there a URL to a problem report we can include here?

You mean URL to email archives or something else?

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter
  2020-11-16  9:46   ` Andy Shevchenko
@ 2020-11-16 12:37     ` Bjorn Helgaas
  2020-11-16 13:46       ` Andy Shevchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Bjorn Helgaas @ 2020-11-16 12:37 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Bjorn Helgaas, linux-pci, johan, linux-usb, alberto.vignani

On Mon, Nov 16, 2020 at 11:46:44AM +0200, Andy Shevchenko wrote:
> On Fri, Nov 13, 2020 at 05:21:38PM -0600, Bjorn Helgaas wrote:
> > On Fri, Nov 06, 2020 at 12:05:25PM +0200, Andy Shevchenko wrote:
> > > Pericom PCIe-USB adapter advertises MSI, but documentation says
> > > "The MSI Function is not implemented on this device." in the chapters
> > > 7.3.27, 7.3.29-7.3.31.
> > > 
> > > Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices")
> > > Datasheet: https://www.diodes.com/assets/Datasheets/PI7C9X440SL.pdf
> > > Reported-by: alberto.vignani@fastwebnet.it
> > 
> > Is there a URL to a problem report we can include here?
> 
> You mean URL to email archives or something else?

Yes.  URL to lore email archive, bugzilla, or any other report of the
problem this caused, i.e., how Alberto noticed something wrong.

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

* Re: [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter
  2020-11-16 12:37     ` Bjorn Helgaas
@ 2020-11-16 13:46       ` Andy Shevchenko
  2020-11-16 16:24         ` Andy Shevchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Andy Shevchenko @ 2020-11-16 13:46 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Andy Shevchenko, Bjorn Helgaas, linux-pci, Johan Hovold, USB,
	alberto.vignani

On Mon, Nov 16, 2020 at 2:42 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> On Mon, Nov 16, 2020 at 11:46:44AM +0200, Andy Shevchenko wrote:
> > On Fri, Nov 13, 2020 at 05:21:38PM -0600, Bjorn Helgaas wrote:
> > > On Fri, Nov 06, 2020 at 12:05:25PM +0200, Andy Shevchenko wrote:
> > > > Pericom PCIe-USB adapter advertises MSI, but documentation says
> > > > "The MSI Function is not implemented on this device." in the chapters
> > > > 7.3.27, 7.3.29-7.3.31.
> > > >
> > > > Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices")
> > > > Datasheet: https://www.diodes.com/assets/Datasheets/PI7C9X440SL.pdf
> > > > Reported-by: alberto.vignani@fastwebnet.it
> > >
> > > Is there a URL to a problem report we can include here?
> >
> > You mean URL to email archives or something else?
>
> Yes.  URL to lore email archive, bugzilla, or any other report of the
> problem this caused, i.e., how Alberto noticed something wrong.

Okay, I'll include in v3.

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter
  2020-11-16 13:46       ` Andy Shevchenko
@ 2020-11-16 16:24         ` Andy Shevchenko
  0 siblings, 0 replies; 9+ messages in thread
From: Andy Shevchenko @ 2020-11-16 16:24 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Bjorn Helgaas, linux-pci, Johan Hovold, USB, alberto.vignani

On Mon, Nov 16, 2020 at 03:46:44PM +0200, Andy Shevchenko wrote:
> On Mon, Nov 16, 2020 at 2:42 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Mon, Nov 16, 2020 at 11:46:44AM +0200, Andy Shevchenko wrote:
> > > On Fri, Nov 13, 2020 at 05:21:38PM -0600, Bjorn Helgaas wrote:
> > > > On Fri, Nov 06, 2020 at 12:05:25PM +0200, Andy Shevchenko wrote:
> > > > > Pericom PCIe-USB adapter advertises MSI, but documentation says
> > > > > "The MSI Function is not implemented on this device." in the chapters
> > > > > 7.3.27, 7.3.29-7.3.31.
> > > > >
> > > > > Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices")
> > > > > Datasheet: https://www.diodes.com/assets/Datasheets/PI7C9X440SL.pdf
> > > > > Reported-by: alberto.vignani@fastwebnet.it
> > > >
> > > > Is there a URL to a problem report we can include here?
> > >
> > > You mean URL to email archives or something else?
> >
> > Yes.  URL to lore email archive, bugzilla, or any other report of the
> > problem this caused, i.e., how Alberto noticed something wrong.
> 
> Okay, I'll include in v3.

I may not include that. It misses archives probably due to some footer in the message.
Closest what I have found is [1].
Do you still want me to include that link?

[1]: https://lore.kernel.org/linux-usb/20201030134826.GP4077@smile.fi.intel.com/

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter
  2020-11-06 10:05 [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter Andy Shevchenko
  2020-11-06 10:05 ` [PATCH v2 2/2] PCI: Use predefined Pericom vendor ID Andy Shevchenko
  2020-11-13 23:21 ` [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter Bjorn Helgaas
@ 2020-11-17 23:32 ` Bjorn Helgaas
  2020-11-18 14:11   ` Andy Shevchenko
  2 siblings, 1 reply; 9+ messages in thread
From: Bjorn Helgaas @ 2020-11-17 23:32 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Bjorn Helgaas, linux-pci, johan, linux-usb, alberto.vignani

On Fri, Nov 06, 2020 at 12:05:25PM +0200, Andy Shevchenko wrote:
> Pericom PCIe-USB adapter advertises MSI, but documentation says
> "The MSI Function is not implemented on this device." in the chapters
> 7.3.27, 7.3.29-7.3.31.
> 
> Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices")
> Datasheet: https://www.diodes.com/assets/Datasheets/PI7C9X440SL.pdf
> Reported-by: alberto.vignani@fastwebnet.it
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

I added the URL you sent and applied both of these, thanks!

> ---
> v2: dropped confusing word (David), added ifdeffery (Ben)
>  drivers/pci/quirks.c | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index f70692ac79c5..e66e0cc8f99b 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -5567,17 +5567,26 @@ static void pci_fixup_no_d0_pme(struct pci_dev *dev)
>  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASMEDIA, 0x2142, pci_fixup_no_d0_pme);
>  
>  /*
> - * Device [12d8:0x400e] and [12d8:0x400f]
> + * Device 12d8:0x400e [OHCI] and 12d8:0x400f [EHCI]
> + *
>   * These devices advertise PME# support in all power states but don't
>   * reliably assert it.
> + *
> + * These devices advertise MSI, but documentation (PI7C9X440SL.pdf) says
> + * "The MSI Function is not implemented on this device." in the chapters
> + * 7.3.27, 7.3.29-7.3.31.
>   */
> -static void pci_fixup_no_pme(struct pci_dev *dev)
> +static void pci_fixup_no_msi_no_pme(struct pci_dev *dev)
>  {
> +#ifdef CONFIG_PCI_MSI
> +	pci_info(dev, "The MSI is not implemented on this device, disabling it\n");
> +	dev->no_msi = 1;
> +#endif
>  	pci_info(dev, "PME# is unreliable, disabling it\n");
>  	dev->pme_support = 0;
>  }
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400e, pci_fixup_no_pme);
> -DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400f, pci_fixup_no_pme);
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400e, pci_fixup_no_msi_no_pme);
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_PERICOM, 0x400f, pci_fixup_no_msi_no_pme);
>  
>  static void apex_pci_fixup_class(struct pci_dev *pdev)
>  {
> -- 
> 2.28.0
> 

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

* Re: [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter
  2020-11-17 23:32 ` Bjorn Helgaas
@ 2020-11-18 14:11   ` Andy Shevchenko
  0 siblings, 0 replies; 9+ messages in thread
From: Andy Shevchenko @ 2020-11-18 14:11 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Bjorn Helgaas, linux-pci, johan, linux-usb, alberto.vignani

On Tue, Nov 17, 2020 at 05:32:52PM -0600, Bjorn Helgaas wrote:
> On Fri, Nov 06, 2020 at 12:05:25PM +0200, Andy Shevchenko wrote:

...

> I added the URL you sent and applied both of these, thanks!

Thank you!

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2020-11-18 14:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 10:05 [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter Andy Shevchenko
2020-11-06 10:05 ` [PATCH v2 2/2] PCI: Use predefined Pericom vendor ID Andy Shevchenko
2020-11-13 23:21 ` [PATCH v2 1/2] PCI: Disable MSI for Pericom PCIe-USB adapter Bjorn Helgaas
2020-11-16  9:46   ` Andy Shevchenko
2020-11-16 12:37     ` Bjorn Helgaas
2020-11-16 13:46       ` Andy Shevchenko
2020-11-16 16:24         ` Andy Shevchenko
2020-11-17 23:32 ` Bjorn Helgaas
2020-11-18 14:11   ` Andy Shevchenko

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.