linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: portdrv: fix irq initialization on FSL pcie host controller
@ 2011-04-22  7:43 Lei Xu
  2011-04-28  8:01 ` Xu Lei
  0 siblings, 1 reply; 3+ messages in thread
From: Lei Xu @ 2011-04-22  7:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-pci, kumar.gala, linuxppc-dev, Lei Xu

Root complex ports for Freescale PCIe host controller only receive
interrupts, so if there is no irq setting for RC, it should not return
error, otherwise it may result the PCIe host controller is disabled.

Signed-off-by: Lei Xu <B33228@freescale.com>
---
 drivers/pci/pcie/portdrv_core.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 595654a..95e64c8 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -209,7 +209,10 @@ static int init_service_irqs(struct pci_dev *dev, int *irqs, int mask)
 		irqs[i] = irq;
 	irqs[PCIE_PORT_SERVICE_VC_SHIFT] = -1;
 
-	if (irq < 0)
+	/* Root complex ports for Freescale PCIe host controller only
+	 * receive interrupts, so if there is no irq setting for RC,
+	 * it should not return error. */
+	if ((irq < 0) && (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT))
 		return -ENODEV;
 	return 0;
 }
-- 
1.7.0.4

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

* Re: [PATCH] PCI: portdrv: fix irq initialization on FSL pcie host controller
  2011-04-22  7:43 [PATCH] PCI: portdrv: fix irq initialization on FSL pcie host controller Lei Xu
@ 2011-04-28  8:01 ` Xu Lei
  2011-05-07 16:21   ` Kumar Gala
  0 siblings, 1 reply; 3+ messages in thread
From: Xu Lei @ 2011-04-28  8:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-pci, kumar.gala, linuxppc-dev


	Any feedback on this patch? Thanks.

On Friday, 2011-04-22 at 15:43 +0800, Lei Xu wrote:
> Root complex ports for Freescale PCIe host controller only receive
> interrupts, so if there is no irq setting for RC, it should not return
> error, otherwise it may result the PCIe host controller is disabled.
> 
> Signed-off-by: Lei Xu <B33228@freescale.com>
> ---
>  drivers/pci/pcie/portdrv_core.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
> index 595654a..95e64c8 100644
> --- a/drivers/pci/pcie/portdrv_core.c
> +++ b/drivers/pci/pcie/portdrv_core.c
> @@ -209,7 +209,10 @@ static int init_service_irqs(struct pci_dev *dev, int *irqs, int mask)
>  		irqs[i] = irq;
>  	irqs[PCIE_PORT_SERVICE_VC_SHIFT] = -1;
>  
> -	if (irq < 0)
> +	/* Root complex ports for Freescale PCIe host controller only
> +	 * receive interrupts, so if there is no irq setting for RC,
> +	 * it should not return error. */
> +	if ((irq < 0) && (dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT))
>  		return -ENODEV;
>  	return 0;
>  }

-- 
Regards

Lei

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

* Re: [PATCH] PCI: portdrv: fix irq initialization on FSL pcie host controller
  2011-04-28  8:01 ` Xu Lei
@ 2011-05-07 16:21   ` Kumar Gala
  0 siblings, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2011-05-07 16:21 UTC (permalink / raw)
  To: Xu Lei; +Cc: linux-pci, linuxppc-dev, linux-kernel


On Apr 28, 2011, at 3:01 AM, Xu Lei wrote:

>=20
> 	Any feedback on this patch? Thanks.
>=20
> On Friday, 2011-04-22 at 15:43 +0800, Lei Xu wrote:
>> Root complex ports for Freescale PCIe host controller only receive
>> interrupts, so if there is no irq setting for RC, it should not =
return
>> error, otherwise it may result the PCIe host controller is disabled.
>>=20
>> Signed-off-by: Lei Xu <B33228@freescale.com>
>> ---
>> drivers/pci/pcie/portdrv_core.c |    5 ++++-
>> 1 files changed, 4 insertions(+), 1 deletions(-)
>>=20
>> diff --git a/drivers/pci/pcie/portdrv_core.c =
b/drivers/pci/pcie/portdrv_core.c
>> index 595654a..95e64c8 100644
>> --- a/drivers/pci/pcie/portdrv_core.c
>> +++ b/drivers/pci/pcie/portdrv_core.c
>> @@ -209,7 +209,10 @@ static int init_service_irqs(struct pci_dev =
*dev, int *irqs, int mask)
>> 		irqs[i] =3D irq;
>> 	irqs[PCIE_PORT_SERVICE_VC_SHIFT] =3D -1;
>>=20
>> -	if (irq < 0)
>> +	/* Root complex ports for Freescale PCIe host controller only
>> +	 * receive interrupts, so if there is no irq setting for RC,
>> +	 * it should not return error. */
>> +	if ((irq < 0) && (dev->pcie_type !=3D PCI_EXP_TYPE_ROOT_PORT))
>> 		return -ENODEV;
>> 	return 0;
>> }
>=20
> --=20
> Regards
>=20
> Lei
>=20

Reviewing this in more detail this is not the right solution.  We should =
have an dev->irq set and need to fix that.

The means to accomplish that is by fixing up the device tree to properly =
get the interrupt assigned to the root complex node.

- k=

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

end of thread, other threads:[~2011-05-07 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-22  7:43 [PATCH] PCI: portdrv: fix irq initialization on FSL pcie host controller Lei Xu
2011-04-28  8:01 ` Xu Lei
2011-05-07 16:21   ` Kumar Gala

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).