linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: dwc/intel-gw: Fix enabling the legacy PCI interrupt lines
@ 2021-01-06 13:55 Martin Blumenstingl
  2021-03-23 11:35 ` Lorenzo Pieralisi
  2021-06-23 14:10 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 7+ messages in thread
From: Martin Blumenstingl @ 2021-01-06 13:55 UTC (permalink / raw)
  To: lorenzo.pieralisi, robh, linux-pci
  Cc: bhelgaas, linux-kernel, Martin Blumenstingl

The legacy PCI interrupt lines need to be enabled using PCIE_APP_IRNEN
bits 13 (INTA), 14 (INTB), 15 (INTC) and 16 (INTD). The old code however
was taking (for example) "13" as raw value instead of taking BIT(13).
Define the legacy PCI interrupt bits using the BIT() macro and then use
these in PCIE_APP_IRN_INT.

Fixes: ed22aaaede44 ("PCI: dwc: intel: PCIe RC controller driver")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 drivers/pci/controller/dwc/pcie-intel-gw.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-intel-gw.c b/drivers/pci/controller/dwc/pcie-intel-gw.c
index 0cedd1f95f37..ae96bfbb6c83 100644
--- a/drivers/pci/controller/dwc/pcie-intel-gw.c
+++ b/drivers/pci/controller/dwc/pcie-intel-gw.c
@@ -39,6 +39,10 @@
 #define PCIE_APP_IRN_PM_TO_ACK		BIT(9)
 #define PCIE_APP_IRN_LINK_AUTO_BW_STAT	BIT(11)
 #define PCIE_APP_IRN_BW_MGT		BIT(12)
+#define PCIE_APP_IRN_INTA		BIT(13)
+#define PCIE_APP_IRN_INTB		BIT(14)
+#define PCIE_APP_IRN_INTC		BIT(15)
+#define PCIE_APP_IRN_INTD		BIT(16)
 #define PCIE_APP_IRN_MSG_LTR		BIT(18)
 #define PCIE_APP_IRN_SYS_ERR_RC		BIT(29)
 #define PCIE_APP_INTX_OFST		12
@@ -48,10 +52,8 @@
 	PCIE_APP_IRN_RX_VDM_MSG | PCIE_APP_IRN_SYS_ERR_RC | \
 	PCIE_APP_IRN_PM_TO_ACK | PCIE_APP_IRN_MSG_LTR | \
 	PCIE_APP_IRN_BW_MGT | PCIE_APP_IRN_LINK_AUTO_BW_STAT | \
-	(PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTA) | \
-	(PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTB) | \
-	(PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTC) | \
-	(PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTD))
+	PCIE_APP_IRN_INTA | PCIE_APP_IRN_INTB | \
+	PCIE_APP_IRN_INTC | PCIE_APP_IRN_INTD)
 
 #define BUS_IATU_OFFSET			SZ_256M
 #define RESET_INTERVAL_MS		100
-- 
2.30.0


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

* Re: [PATCH] PCI: dwc/intel-gw: Fix enabling the legacy PCI interrupt lines
  2021-01-06 13:55 [PATCH] PCI: dwc/intel-gw: Fix enabling the legacy PCI interrupt lines Martin Blumenstingl
@ 2021-03-23 11:35 ` Lorenzo Pieralisi
  2021-04-08 20:39   ` Martin Blumenstingl
  2021-06-23 14:10 ` Lorenzo Pieralisi
  1 sibling, 1 reply; 7+ messages in thread
From: Lorenzo Pieralisi @ 2021-03-23 11:35 UTC (permalink / raw)
  To: Martin Blumenstingl, Dilip Kota; +Cc: robh, linux-pci, bhelgaas, linux-kernel

On Wed, Jan 06, 2021 at 02:55:40PM +0100, Martin Blumenstingl wrote:
> The legacy PCI interrupt lines need to be enabled using PCIE_APP_IRNEN
> bits 13 (INTA), 14 (INTB), 15 (INTC) and 16 (INTD). The old code however
> was taking (for example) "13" as raw value instead of taking BIT(13).
> Define the legacy PCI interrupt bits using the BIT() macro and then use
> these in PCIE_APP_IRN_INT.
> 
> Fixes: ed22aaaede44 ("PCI: dwc: intel: PCIe RC controller driver")
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  drivers/pci/controller/dwc/pcie-intel-gw.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-intel-gw.c b/drivers/pci/controller/dwc/pcie-intel-gw.c
> index 0cedd1f95f37..ae96bfbb6c83 100644
> --- a/drivers/pci/controller/dwc/pcie-intel-gw.c
> +++ b/drivers/pci/controller/dwc/pcie-intel-gw.c
> @@ -39,6 +39,10 @@
>  #define PCIE_APP_IRN_PM_TO_ACK		BIT(9)
>  #define PCIE_APP_IRN_LINK_AUTO_BW_STAT	BIT(11)
>  #define PCIE_APP_IRN_BW_MGT		BIT(12)
> +#define PCIE_APP_IRN_INTA		BIT(13)
> +#define PCIE_APP_IRN_INTB		BIT(14)
> +#define PCIE_APP_IRN_INTC		BIT(15)
> +#define PCIE_APP_IRN_INTD		BIT(16)
>  #define PCIE_APP_IRN_MSG_LTR		BIT(18)
>  #define PCIE_APP_IRN_SYS_ERR_RC		BIT(29)
>  #define PCIE_APP_INTX_OFST		12
> @@ -48,10 +52,8 @@
>  	PCIE_APP_IRN_RX_VDM_MSG | PCIE_APP_IRN_SYS_ERR_RC | \
>  	PCIE_APP_IRN_PM_TO_ACK | PCIE_APP_IRN_MSG_LTR | \
>  	PCIE_APP_IRN_BW_MGT | PCIE_APP_IRN_LINK_AUTO_BW_STAT | \
> -	(PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTA) | \
> -	(PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTB) | \
> -	(PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTC) | \
> -	(PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTD))
> +	PCIE_APP_IRN_INTA | PCIE_APP_IRN_INTB | \
> +	PCIE_APP_IRN_INTC | PCIE_APP_IRN_INTD)
>  
>  #define BUS_IATU_OFFSET			SZ_256M
>  #define RESET_INTERVAL_MS		100

This looks like a significant bug - which in turn raises the question
on how well this driver has been tested.

Dilip, can you review and ACK asap please ?

Thanks,
Lorenzo

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

* Re: [PATCH] PCI: dwc/intel-gw: Fix enabling the legacy PCI interrupt lines
  2021-03-23 11:35 ` Lorenzo Pieralisi
@ 2021-04-08 20:39   ` Martin Blumenstingl
  2021-04-09 10:17     ` Rahul Tanwar
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Blumenstingl @ 2021-04-08 20:39 UTC (permalink / raw)
  To: Lorenzo Pieralisi, rtanwar
  Cc: Dilip Kota, robh, linux-pci, bhelgaas, linux-kernel

Hi Lorenzo,

On Tue, Mar 23, 2021 at 12:36 PM Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
>
> On Wed, Jan 06, 2021 at 02:55:40PM +0100, Martin Blumenstingl wrote:
> > The legacy PCI interrupt lines need to be enabled using PCIE_APP_IRNEN
> > bits 13 (INTA), 14 (INTB), 15 (INTC) and 16 (INTD). The old code however
> > was taking (for example) "13" as raw value instead of taking BIT(13).
> > Define the legacy PCI interrupt bits using the BIT() macro and then use
> > these in PCIE_APP_IRN_INT.
> >
> > Fixes: ed22aaaede44 ("PCI: dwc: intel: PCIe RC controller driver")
> > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> > ---
> >  drivers/pci/controller/dwc/pcie-intel-gw.c | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pcie-intel-gw.c b/drivers/pci/controller/dwc/pcie-intel-gw.c
> > index 0cedd1f95f37..ae96bfbb6c83 100644
> > --- a/drivers/pci/controller/dwc/pcie-intel-gw.c
> > +++ b/drivers/pci/controller/dwc/pcie-intel-gw.c
> > @@ -39,6 +39,10 @@
> >  #define PCIE_APP_IRN_PM_TO_ACK               BIT(9)
> >  #define PCIE_APP_IRN_LINK_AUTO_BW_STAT       BIT(11)
> >  #define PCIE_APP_IRN_BW_MGT          BIT(12)
> > +#define PCIE_APP_IRN_INTA            BIT(13)
> > +#define PCIE_APP_IRN_INTB            BIT(14)
> > +#define PCIE_APP_IRN_INTC            BIT(15)
> > +#define PCIE_APP_IRN_INTD            BIT(16)
> >  #define PCIE_APP_IRN_MSG_LTR         BIT(18)
> >  #define PCIE_APP_IRN_SYS_ERR_RC              BIT(29)
> >  #define PCIE_APP_INTX_OFST           12
> > @@ -48,10 +52,8 @@
> >       PCIE_APP_IRN_RX_VDM_MSG | PCIE_APP_IRN_SYS_ERR_RC | \
> >       PCIE_APP_IRN_PM_TO_ACK | PCIE_APP_IRN_MSG_LTR | \
> >       PCIE_APP_IRN_BW_MGT | PCIE_APP_IRN_LINK_AUTO_BW_STAT | \
> > -     (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTA) | \
> > -     (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTB) | \
> > -     (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTC) | \
> > -     (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTD))
> > +     PCIE_APP_IRN_INTA | PCIE_APP_IRN_INTB | \
> > +     PCIE_APP_IRN_INTC | PCIE_APP_IRN_INTD)
> >
> >  #define BUS_IATU_OFFSET                      SZ_256M
> >  #define RESET_INTERVAL_MS            100
>
> This looks like a significant bug - which in turn raises the question
> on how well this driver has been tested.
to give them the benefit of doubt: maybe only MSIs were tested

> Dilip, can you review and ACK asap please ?
From "Re: MaxLinear, please maintain your drivers was Re: [PATCH]
leds: lgm: fix gpiolib dependency" [0]:
> Please send any Lightning Mountain SoC related issues email to Rahul
> Tanwar (rtanwar@maxlinear.com) and I will ensure that I address the
> issues in a timely manner.
so I added rtanwar@maxlinear.com to this email


Best regards,
Martin


[0] https://lkml.org/lkml/2021/3/16/282

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

* Re: [PATCH] PCI: dwc/intel-gw: Fix enabling the legacy PCI interrupt lines
  2021-04-08 20:39   ` Martin Blumenstingl
@ 2021-04-09 10:17     ` Rahul Tanwar
  2021-04-09 10:29       ` Lorenzo Pieralisi
  0 siblings, 1 reply; 7+ messages in thread
From: Rahul Tanwar @ 2021-04-09 10:17 UTC (permalink / raw)
  To: Martin Blumenstingl, Lorenzo Pieralisi
  Cc: robh, linux-pci, bhelgaas, linux-kernel, Cheol Yong Kim,
	Qiming Wu, Lei Chuan Hua

On 9/4/2021 4:40 am, Martin Blumenstingl wrote:
> This email was sent from outside of MaxLinear.
> 
> Hi Lorenzo,
> 
> On Tue, Mar 23, 2021 at 12:36 PM Lorenzo Pieralisi
> <lorenzo.pieralisi@arm.com> wrote:
>  >
>  > On Wed, Jan 06, 2021 at 02:55:40PM +0100, Martin Blumenstingl wrote:
>  > > The legacy PCI interrupt lines need to be enabled using PCIE_APP_IRNEN
>  > > bits 13 (INTA), 14 (INTB), 15 (INTC) and 16 (INTD). The old code 
> however
>  > > was taking (for example) "13" as raw value instead of taking BIT(13).
>  > > Define the legacy PCI interrupt bits using the BIT() macro and then use
>  > > these in PCIE_APP_IRN_INT.
>  > >
>  > > Fixes: ed22aaaede44 ("PCI: dwc: intel: PCIe RC controller driver")
>  > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>  > > ---
>  > > drivers/pci/controller/dwc/pcie-intel-gw.c | 10 ++++++----
>  > > 1 file changed, 6 insertions(+), 4 deletions(-)
>  > >
>  > > diff --git a/drivers/pci/controller/dwc/pcie-intel-gw.c 
> b/drivers/pci/controller/dwc/pcie-intel-gw.c
>  > > index 0cedd1f95f37..ae96bfbb6c83 100644
>  > > --- a/drivers/pci/controller/dwc/pcie-intel-gw.c
>  > > +++ b/drivers/pci/controller/dwc/pcie-intel-gw.c
>  > > @@ -39,6 +39,10 @@
>  > > #define PCIE_APP_IRN_PM_TO_ACK BIT(9)
>  > > #define PCIE_APP_IRN_LINK_AUTO_BW_STAT BIT(11)
>  > > #define PCIE_APP_IRN_BW_MGT BIT(12)
>  > > +#define PCIE_APP_IRN_INTA BIT(13)
>  > > +#define PCIE_APP_IRN_INTB BIT(14)
>  > > +#define PCIE_APP_IRN_INTC BIT(15)
>  > > +#define PCIE_APP_IRN_INTD BIT(16)
>  > > #define PCIE_APP_IRN_MSG_LTR BIT(18)
>  > > #define PCIE_APP_IRN_SYS_ERR_RC BIT(29)
>  > > #define PCIE_APP_INTX_OFST 12
>  > > @@ -48,10 +52,8 @@
>  > > PCIE_APP_IRN_RX_VDM_MSG | PCIE_APP_IRN_SYS_ERR_RC | \
>  > > PCIE_APP_IRN_PM_TO_ACK | PCIE_APP_IRN_MSG_LTR | \
>  > > PCIE_APP_IRN_BW_MGT | PCIE_APP_IRN_LINK_AUTO_BW_STAT | \
>  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTA) | \
>  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTB) | \
>  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTC) | \
>  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTD))
>  > > + PCIE_APP_IRN_INTA | PCIE_APP_IRN_INTB | \
>  > > + PCIE_APP_IRN_INTC | PCIE_APP_IRN_INTD)
>  > >
>  > > #define BUS_IATU_OFFSET SZ_256M
>  > > #define RESET_INTERVAL_MS 100
>  >
>  > This looks like a significant bug - which in turn raises the question
>  > on how well this driver has been tested.
> to give them the benefit of doubt: maybe only MSIs were tested
> 
>  > Dilip, can you review and ACK asap please ?
>  From "Re: MaxLinear, please maintain your drivers was Re: [PATCH]
> leds: lgm: fix gpiolib dependency" [0]:
>  > Please send any Lightning Mountain SoC related issues email to Rahul
>  > Tanwar (rtanwar@maxlinear.com) and I will ensure that I address the
>  > issues in a timely manner.
> so I added rtanwar@maxlinear.com to this email
> 
> 
> Best regards,
> Martin
> 
> 
> [0] https://lkml.org/lkml/2021/3/16/282 
> <https://lkml.org/lkml/2021/3/16/282>


Dilip has left the org. So not sure how exactly he tested it (maybe only 
MSIs). But i have confirmed it to be a bug. Thanks Martin for fixing it.

Acked-by: Rahul Tanwar <rtanwar@maxlinear.com>

Regards,
Rahul






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

* Re: [PATCH] PCI: dwc/intel-gw: Fix enabling the legacy PCI interrupt lines
  2021-04-09 10:17     ` Rahul Tanwar
@ 2021-04-09 10:29       ` Lorenzo Pieralisi
  2021-06-23 13:54         ` Lorenzo Pieralisi
  0 siblings, 1 reply; 7+ messages in thread
From: Lorenzo Pieralisi @ 2021-04-09 10:29 UTC (permalink / raw)
  To: Rahul Tanwar
  Cc: Martin Blumenstingl, robh, linux-pci, bhelgaas, linux-kernel,
	Cheol Yong Kim, Qiming Wu, Lei Chuan Hua

On Fri, Apr 09, 2021 at 10:17:12AM +0000, Rahul Tanwar wrote:
> On 9/4/2021 4:40 am, Martin Blumenstingl wrote:
> > This email was sent from outside of MaxLinear.
> > 
> > Hi Lorenzo,
> > 
> > On Tue, Mar 23, 2021 at 12:36 PM Lorenzo Pieralisi
> > <lorenzo.pieralisi@arm.com> wrote:
> >  >
> >  > On Wed, Jan 06, 2021 at 02:55:40PM +0100, Martin Blumenstingl wrote:
> >  > > The legacy PCI interrupt lines need to be enabled using PCIE_APP_IRNEN
> >  > > bits 13 (INTA), 14 (INTB), 15 (INTC) and 16 (INTD). The old code 
> > however
> >  > > was taking (for example) "13" as raw value instead of taking BIT(13).
> >  > > Define the legacy PCI interrupt bits using the BIT() macro and then use
> >  > > these in PCIE_APP_IRN_INT.
> >  > >
> >  > > Fixes: ed22aaaede44 ("PCI: dwc: intel: PCIe RC controller driver")
> >  > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> >  > > ---
> >  > > drivers/pci/controller/dwc/pcie-intel-gw.c | 10 ++++++----
> >  > > 1 file changed, 6 insertions(+), 4 deletions(-)
> >  > >
> >  > > diff --git a/drivers/pci/controller/dwc/pcie-intel-gw.c 
> > b/drivers/pci/controller/dwc/pcie-intel-gw.c
> >  > > index 0cedd1f95f37..ae96bfbb6c83 100644
> >  > > --- a/drivers/pci/controller/dwc/pcie-intel-gw.c
> >  > > +++ b/drivers/pci/controller/dwc/pcie-intel-gw.c
> >  > > @@ -39,6 +39,10 @@
> >  > > #define PCIE_APP_IRN_PM_TO_ACK BIT(9)
> >  > > #define PCIE_APP_IRN_LINK_AUTO_BW_STAT BIT(11)
> >  > > #define PCIE_APP_IRN_BW_MGT BIT(12)
> >  > > +#define PCIE_APP_IRN_INTA BIT(13)
> >  > > +#define PCIE_APP_IRN_INTB BIT(14)
> >  > > +#define PCIE_APP_IRN_INTC BIT(15)
> >  > > +#define PCIE_APP_IRN_INTD BIT(16)
> >  > > #define PCIE_APP_IRN_MSG_LTR BIT(18)
> >  > > #define PCIE_APP_IRN_SYS_ERR_RC BIT(29)
> >  > > #define PCIE_APP_INTX_OFST 12
> >  > > @@ -48,10 +52,8 @@
> >  > > PCIE_APP_IRN_RX_VDM_MSG | PCIE_APP_IRN_SYS_ERR_RC | \
> >  > > PCIE_APP_IRN_PM_TO_ACK | PCIE_APP_IRN_MSG_LTR | \
> >  > > PCIE_APP_IRN_BW_MGT | PCIE_APP_IRN_LINK_AUTO_BW_STAT | \
> >  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTA) | \
> >  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTB) | \
> >  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTC) | \
> >  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTD))
> >  > > + PCIE_APP_IRN_INTA | PCIE_APP_IRN_INTB | \
> >  > > + PCIE_APP_IRN_INTC | PCIE_APP_IRN_INTD)
> >  > >
> >  > > #define BUS_IATU_OFFSET SZ_256M
> >  > > #define RESET_INTERVAL_MS 100
> >  >
> >  > This looks like a significant bug - which in turn raises the question
> >  > on how well this driver has been tested.
> > to give them the benefit of doubt: maybe only MSIs were tested
> > 
> >  > Dilip, can you review and ACK asap please ?
> >  From "Re: MaxLinear, please maintain your drivers was Re: [PATCH]
> > leds: lgm: fix gpiolib dependency" [0]:
> >  > Please send any Lightning Mountain SoC related issues email to Rahul
> >  > Tanwar (rtanwar@maxlinear.com) and I will ensure that I address the
> >  > issues in a timely manner.
> > so I added rtanwar@maxlinear.com to this email
> > 
> > 
> > Best regards,
> > Martin
> > 
> > 
> > [0] https://lkml.org/lkml/2021/3/16/282 
> > <https://lkml.org/lkml/2021/3/16/282>
> 
> 
> Dilip has left the org. So not sure how exactly he tested it (maybe only 
> MSIs). But i have confirmed it to be a bug. Thanks Martin for fixing it.

Can you take on maintainership for this driver please ?

If yes please send a MAINTAINERS file patch.

Thanks,
Lorenzo

> Acked-by: Rahul Tanwar <rtanwar@maxlinear.com>
> 
> Regards,
> Rahul
> 
> 
> 
> 
> 

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

* Re: [PATCH] PCI: dwc/intel-gw: Fix enabling the legacy PCI interrupt lines
  2021-04-09 10:29       ` Lorenzo Pieralisi
@ 2021-06-23 13:54         ` Lorenzo Pieralisi
  0 siblings, 0 replies; 7+ messages in thread
From: Lorenzo Pieralisi @ 2021-06-23 13:54 UTC (permalink / raw)
  To: Rahul Tanwar
  Cc: Martin Blumenstingl, robh, linux-pci, bhelgaas, linux-kernel,
	Cheol Yong Kim, Qiming Wu, Lei Chuan Hua

On Fri, Apr 09, 2021 at 11:29:46AM +0100, Lorenzo Pieralisi wrote:
> On Fri, Apr 09, 2021 at 10:17:12AM +0000, Rahul Tanwar wrote:
> > On 9/4/2021 4:40 am, Martin Blumenstingl wrote:
> > > This email was sent from outside of MaxLinear.
> > > 
> > > Hi Lorenzo,
> > > 
> > > On Tue, Mar 23, 2021 at 12:36 PM Lorenzo Pieralisi
> > > <lorenzo.pieralisi@arm.com> wrote:
> > >  >
> > >  > On Wed, Jan 06, 2021 at 02:55:40PM +0100, Martin Blumenstingl wrote:
> > >  > > The legacy PCI interrupt lines need to be enabled using PCIE_APP_IRNEN
> > >  > > bits 13 (INTA), 14 (INTB), 15 (INTC) and 16 (INTD). The old code 
> > > however
> > >  > > was taking (for example) "13" as raw value instead of taking BIT(13).
> > >  > > Define the legacy PCI interrupt bits using the BIT() macro and then use
> > >  > > these in PCIE_APP_IRN_INT.
> > >  > >
> > >  > > Fixes: ed22aaaede44 ("PCI: dwc: intel: PCIe RC controller driver")
> > >  > > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> > >  > > ---
> > >  > > drivers/pci/controller/dwc/pcie-intel-gw.c | 10 ++++++----
> > >  > > 1 file changed, 6 insertions(+), 4 deletions(-)
> > >  > >
> > >  > > diff --git a/drivers/pci/controller/dwc/pcie-intel-gw.c 
> > > b/drivers/pci/controller/dwc/pcie-intel-gw.c
> > >  > > index 0cedd1f95f37..ae96bfbb6c83 100644
> > >  > > --- a/drivers/pci/controller/dwc/pcie-intel-gw.c
> > >  > > +++ b/drivers/pci/controller/dwc/pcie-intel-gw.c
> > >  > > @@ -39,6 +39,10 @@
> > >  > > #define PCIE_APP_IRN_PM_TO_ACK BIT(9)
> > >  > > #define PCIE_APP_IRN_LINK_AUTO_BW_STAT BIT(11)
> > >  > > #define PCIE_APP_IRN_BW_MGT BIT(12)
> > >  > > +#define PCIE_APP_IRN_INTA BIT(13)
> > >  > > +#define PCIE_APP_IRN_INTB BIT(14)
> > >  > > +#define PCIE_APP_IRN_INTC BIT(15)
> > >  > > +#define PCIE_APP_IRN_INTD BIT(16)
> > >  > > #define PCIE_APP_IRN_MSG_LTR BIT(18)
> > >  > > #define PCIE_APP_IRN_SYS_ERR_RC BIT(29)
> > >  > > #define PCIE_APP_INTX_OFST 12
> > >  > > @@ -48,10 +52,8 @@
> > >  > > PCIE_APP_IRN_RX_VDM_MSG | PCIE_APP_IRN_SYS_ERR_RC | \
> > >  > > PCIE_APP_IRN_PM_TO_ACK | PCIE_APP_IRN_MSG_LTR | \
> > >  > > PCIE_APP_IRN_BW_MGT | PCIE_APP_IRN_LINK_AUTO_BW_STAT | \
> > >  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTA) | \
> > >  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTB) | \
> > >  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTC) | \
> > >  > > - (PCIE_APP_INTX_OFST + PCI_INTERRUPT_INTD))
> > >  > > + PCIE_APP_IRN_INTA | PCIE_APP_IRN_INTB | \
> > >  > > + PCIE_APP_IRN_INTC | PCIE_APP_IRN_INTD)
> > >  > >
> > >  > > #define BUS_IATU_OFFSET SZ_256M
> > >  > > #define RESET_INTERVAL_MS 100
> > >  >
> > >  > This looks like a significant bug - which in turn raises the question
> > >  > on how well this driver has been tested.
> > > to give them the benefit of doubt: maybe only MSIs were tested
> > > 
> > >  > Dilip, can you review and ACK asap please ?
> > >  From "Re: MaxLinear, please maintain your drivers was Re: [PATCH]
> > > leds: lgm: fix gpiolib dependency" [0]:
> > >  > Please send any Lightning Mountain SoC related issues email to Rahul
> > >  > Tanwar (rtanwar@maxlinear.com) and I will ensure that I address the
> > >  > issues in a timely manner.
> > > so I added rtanwar@maxlinear.com to this email
> > > 
> > > 
> > > Best regards,
> > > Martin
> > > 
> > > 
> > > [0] https://lkml.org/lkml/2021/3/16/282 
> > > <https://lkml.org/lkml/2021/3/16/282>
> > 
> > 
> > Dilip has left the org. So not sure how exactly he tested it (maybe only 
> > MSIs). But i have confirmed it to be a bug. Thanks Martin for fixing it.
> 
> Can you take on maintainership for this driver please ?

I have not received any reply on this - this driver has no maintainer
(with HW to test it) looking after it, it'd be great if we can add
one - please let me know.

Lorenzo

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

* Re: [PATCH] PCI: dwc/intel-gw: Fix enabling the legacy PCI interrupt lines
  2021-01-06 13:55 [PATCH] PCI: dwc/intel-gw: Fix enabling the legacy PCI interrupt lines Martin Blumenstingl
  2021-03-23 11:35 ` Lorenzo Pieralisi
@ 2021-06-23 14:10 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 7+ messages in thread
From: Lorenzo Pieralisi @ 2021-06-23 14:10 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-pci, robh
  Cc: Lorenzo Pieralisi, linux-kernel, bhelgaas

On Wed, 6 Jan 2021 14:55:40 +0100, Martin Blumenstingl wrote:
> The legacy PCI interrupt lines need to be enabled using PCIE_APP_IRNEN
> bits 13 (INTA), 14 (INTB), 15 (INTC) and 16 (INTD). The old code however
> was taking (for example) "13" as raw value instead of taking BIT(13).
> Define the legacy PCI interrupt bits using the BIT() macro and then use
> these in PCIE_APP_IRN_INT.

Applied to pci/dwc, thanks!

[1/1] PCI: dwc/intel-gw: Fix enabling the legacy PCI interrupt lines
      https://git.kernel.org/lpieralisi/pci/c/263dcd1abf

Thanks,
Lorenzo

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

end of thread, other threads:[~2021-06-23 14:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06 13:55 [PATCH] PCI: dwc/intel-gw: Fix enabling the legacy PCI interrupt lines Martin Blumenstingl
2021-03-23 11:35 ` Lorenzo Pieralisi
2021-04-08 20:39   ` Martin Blumenstingl
2021-04-09 10:17     ` Rahul Tanwar
2021-04-09 10:29       ` Lorenzo Pieralisi
2021-06-23 13:54         ` Lorenzo Pieralisi
2021-06-23 14:10 ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).