diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2017-05-26 11:53:04 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-15 18:03:26 +1000 |
commit | b1065edb66652ba682e8b4c3064c52ab2e4f7822 (patch) | |
tree | 267d2343a51bcb1b189ebc528e2889422f7d8dda | |
parent | f3105cbf8d44f45a8c294ecb4cfc124065825131 (diff) | |
download | skiboot-b1065edb66652ba682e8b4c3064c52ab2e4f7822.zip skiboot-b1065edb66652ba682e8b4c3064c52ab2e4f7822.tar.gz skiboot-b1065edb66652ba682e8b4c3064c52ab2e4f7822.tar.bz2 |
core/pci: Make the conditions for device type quirk obvious
The device type should be fixed to downstream port when it seats
behinds behind a upstream port, which is connected to root port
directly and its VDID is 0x874810b5.
This reorders the conditions to make it a bit obvious: parent,
parent's device type, device's VDID and device type in sequence.
No logicial changes.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | core/pci.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -171,9 +171,8 @@ static void pci_init_pcie_cap(struct phb *phb, struct pci_device *pd) */ pci_cfg_read16(phb, pd->bdfn, ecap + PCICAP_EXP_CAPABILITY_REG, ®); pd->dev_type = GETFIELD(PCICAP_EXP_CAP_TYPE, reg); - if (pd->parent && pd->dev_type == PCIE_TYPE_SWITCH_UPPORT && - pd->parent->dev_type == PCIE_TYPE_SWITCH_UPPORT && - pd->vdid == 0x874810b5) { + if (pd->parent && pd->parent->dev_type == PCIE_TYPE_SWITCH_UPPORT && + pd->vdid == 0x874810b5 && pd->dev_type == PCIE_TYPE_SWITCH_UPPORT) { PCIDBG(phb, pd->bdfn, "Fixing up bad PLX downstream port !\n"); pd->dev_type = PCIE_TYPE_SWITCH_DNPORT; } |