aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2017-03-10 11:25:46 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-03-31 16:57:07 +1100
commit7c4a326bea502fc1f3b8b767f6ff9c02b7d1b254 (patch)
tree4c971e7636e18250ed6456107ea244aa51cdda88 /core
parent07f17c3c7db3df48f9f681edf8453312837e6119 (diff)
downloadskiboot-7c4a326bea502fc1f3b8b767f6ff9c02b7d1b254.zip
skiboot-7c4a326bea502fc1f3b8b767f6ff9c02b7d1b254.tar.gz
skiboot-7c4a326bea502fc1f3b8b767f6ff9c02b7d1b254.tar.bz2
core/pci: Disable surprise hotplug on root port
We are creating PCI slot on root port, where the PCI slot isn't supported from hardware. For this case, the surprised hotplug functionality shouldn't be enabled even the link state change reporting is supported in hardware. This disables surprise hotplug if PCI slot isn't supported in hardware. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/pcie-slot.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/core/pcie-slot.c b/core/pcie-slot.c
index aca59dd..022668a 100644
--- a/core/pcie-slot.c
+++ b/core/pcie-slot.c
@@ -500,12 +500,14 @@ struct pci_slot *pcie_slot_create(struct phb *phb, struct pci_device *pd)
* Its PDC (Presence Detection Change) isn't reliable. To mark that as
* broken on them.
*/
- if (slot->slot_cap & PCICAP_EXP_SLOTCAP_HPLUG_SURP) {
- slot->surprise_pluggable = 1;
- } else if (slot->link_cap & PCICAP_EXP_LCAP_DL_ACT_REP) {
- slot->surprise_pluggable = 1;
+ if (slot->pcie_cap & PCICAP_EXP_CAP_SLOT) {
+ if (slot->slot_cap & PCICAP_EXP_SLOTCAP_HPLUG_SURP) {
+ slot->surprise_pluggable = 1;
+ } else if (slot->link_cap & PCICAP_EXP_LCAP_DL_ACT_REP) {
+ slot->surprise_pluggable = 1;
- pci_slot_add_flags(slot, PCI_SLOT_FLAG_BROKEN_PDC);
+ pci_slot_add_flags(slot, PCI_SLOT_FLAG_BROKEN_PDC);
+ }
}
/* Standard slot operations */