lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1303458219-31915-1-git-send-email-B33228@freescale.com>
Date:	Fri, 22 Apr 2011 15:43:39 +0800
From:	Lei Xu <B33228@...escale.com>
To:	<linux-kernel@...r.kernel.org>
CC:	<linuxppc-dev@...ts.ozlabs.org>, <linux-pci@...r.kernel.org>,
	<kumar.gala@...escale.com>, Lei Xu <B33228@...escale.com>
Subject: [PATCH] PCI: portdrv: fix irq initialization on FSL pcie host controller

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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ