Re: [PATCH] PCI: portdrv: fix irq initialization on FSL pcie host controller

2011-05-07 Thread Kumar Gala

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

 
   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 b33...@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
 

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
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH] PCI: portdrv: fix irq initialization on FSL pcie host controller

2011-04-28 Thread Xu Lei

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 b33...@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


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] PCI: portdrv: fix irq initialization on FSL pcie host controller

2011-04-22 Thread 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 b33...@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


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev