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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1471595078-26297-1-git-send-email-lftan@altera.com>
Date:   Fri, 19 Aug 2016 16:24:38 +0800
From:   Ley Foon Tan <lftan@...era.com>
To:     Bjorn Helgaas <bhelgaas@...gle.com>
CC:     <linux-kernel@...r.kernel.org>, <linux-pci@...r.kernel.org>,
        Ley Foon Tan <lftan.linux@...il.com>,
        Ley Foon Tan <lftan@...era.com>
Subject: [PATCH v2] PCI: altera: Retrain link in rootport mode only

Altera PCIe IP can be configured as rootport or device and they might have
same vendor ID. It will cause the system hang issue if Altera PCIe is in
endpoint mode and work with other PCIe rootport that from other vendors.
So, add the rootport mode checking in link retrain fixup function.

Signed-off-by: Ley Foon Tan <lftan@...era.com>
---
v2: change to check PCIe type is PCI_EXP_TYPE_ROOT_PORT
---
 drivers/pci/host/pcie-altera.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c
index 58eef99..33b6968 100644
--- a/drivers/pci/host/pcie-altera.c
+++ b/drivers/pci/host/pcie-altera.c
@@ -139,6 +139,9 @@ static void altera_pcie_retrain(struct pci_dev *dev)
 	u16 linkcap, linkstat;
 	struct altera_pcie *pcie = dev->bus->sysdata;
 
+	if (pci_pcie_type(dev) != PCI_EXP_TYPE_ROOT_PORT)
+		return;
+
 	if (!altera_pcie_link_is_up(pcie))
 		return;
 
-- 
1.8.2.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ