aboutsummaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2017-02-20 10:57:50 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-02-22 16:51:18 +1100
commit99343c26ac8c6e49041bd2718c8b16e5d664f8fd (patch)
treefacf02e39b1a468f2f4686acaf26ac556f3d1d09 /platforms
parentaa295110d9487d2b4b3ff31b6369bf59e1cba824 (diff)
downloadskiboot-99343c26ac8c6e49041bd2718c8b16e5d664f8fd.zip
skiboot-99343c26ac8c6e49041bd2718c8b16e5d664f8fd.tar.gz
skiboot-99343c26ac8c6e49041bd2718c8b16e5d664f8fd.tar.bz2
astbmc/p8dnu: Enable PCI slot's power supply on PEX9733 in hot-add path
This issue is reported from superMicro's "p8dnu" platform. PEX9733 is connected to PHB direct slot. We create dynamic PCI slots for its (5) downstream ports and all of them support surprise hotplug capability. The problem is power supply lost on hot-remove and it isn't turned on automatically on hot-add. It means the PCIe link behind the slot isn't up and the PCI adapter behind the slot can't be probed successfully. This fixes the issue by forcing to turn on the power supply on hardware when user (kernel) requests to do so. Those PCI slots are identified by additional flag (PCI_SLOT_FLAG_FORCE_POWERON). Reported-by: Hank Chang <hankmax0000@gmail.com> Signed-off-by: Gavin Shan <gwhsan@linux.vnet.ibm.com> Tested-by: Willie Liauw <williel@supermicro.com.tw> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r--platforms/astbmc/slots.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/platforms/astbmc/slots.c b/platforms/astbmc/slots.c
index aeca007..f28ad7d 100644
--- a/platforms/astbmc/slots.c
+++ b/platforms/astbmc/slots.c
@@ -166,6 +166,19 @@ static void create_dynamic_slot(struct phb *phb, struct pci_device *pd)
slot = pcie_slot_create(phb, pd);
assert(slot);
init_slot_info(slot, true, NULL);
+
+ /* On superMicro's "p8dnu" platform, we create dynamic PCI slots
+ * for all downstream ports of PEX9733 that is connected to PHB
+ * direct slot. The power supply to the PCI slot is lost after
+ * PCI adapter is removed from it. The power supply can't be
+ * turned on when the slot is in empty state. The power supply
+ * isn't turned on automatically when inserting PCI adapter to
+ * the slot at later point. We set a flag to the slot here, to
+ * turn on the power supply in (suprise or managed) hot-add path.
+ */
+ if (dt_node_is_compatible(dt_root, "supermicro,p8dnu") &&
+ slot->pd && slot->pd->vdid == 0x973310b5)
+ pci_slot_add_flags(slot, PCI_SLOT_FLAG_FORCE_POWERON);
}
void slot_table_get_slot_info(struct phb *phb, struct pci_device *pd)