Patchwork [PATCHv5,15/20] PCI: mobiveil: Fix the checking of valid device

login
register
mail settings
Submitter Zhiqiang Hou
Date April 12, 2019, 8:36 a.m.
Message ID <20190412083635.33626-16-Zhiqiang.Hou@nxp.com>
Download mbox | patch
Permalink /patch/771351/
State New
Headers show

Comments

Zhiqiang Hou - April 12, 2019, 8:36 a.m.
From: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>


Allow CFG transactions to all functions of Endpoint implemented
multiple functions.

Fixes: 9af6bcb11e12 ("PCI: mobiveil: Add Mobiveil PCIe Host Bridge IP driver")
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>

Reviewed-by: Minghuan Lian <Minghuan.Lian@nxp.com>

---
V5:
 - Corrected and retouched the subject and changelog.

 drivers/pci/controller/pcie-mobiveil.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Patch

diff --git a/drivers/pci/controller/pcie-mobiveil.c b/drivers/pci/controller/pcie-mobiveil.c

index 9210165fe8c0..621852078caf 100644

--- a/drivers/pci/controller/pcie-mobiveil.c

+++ b/drivers/pci/controller/pcie-mobiveil.c

@@ -291,7 +291,7 @@  static bool mobiveil_pcie_valid_device(struct pci_bus *bus, unsigned int devfn)

 	 * Do not read more than one device on the bus directly
 	 * attached to RC
 	 */
-	if ((bus->primary == pcie->root_bus_nr) && (devfn > 0))

+	if ((bus->primary == pcie->root_bus_nr) && (PCI_SLOT(devfn) > 0))

 		return false;
 
 	return true;