[PATCH 3/6] pci: layerscape: limit fixup to layerscape controllers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ls_pcie_fixup() assumes the fixed up device is attached to the layerscape
PCI controller. This may not be true when there's another controller
active in the system, so limit the execution of the fixup to the right
controller only.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 drivers/pci/pci-layerscape.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pci/pci-layerscape.c b/drivers/pci/pci-layerscape.c
index 0fb742af9a..12a0ec71a7 100644
--- a/drivers/pci/pci-layerscape.c
+++ b/drivers/pci/pci-layerscape.c
@@ -551,6 +551,9 @@ static void ls_pcie_fixup(struct pci_dev *pcidev)
 	uint32_t devid;
 	int base_bus_num = 0;
 
+	if (!of_match_device(ls_pcie_of_match, host->parent))
+		return;
+
 	stream_id = ls_pcie_next_streamid(lspcie);
 	index = ls_pcie_next_lut_index(lspcie);
 
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux