summaryrefslogtreecommitdiffstats
path: root/hw/phb3.c
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2016-10-14 15:26:07 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-10-17 10:33:57 +1100
commit2e19de4c2f4b47f0259ba265ea7d1786f1b44cd7 (patch)
tree25d333f30511ce920ee12d916e17a1f18c067a89 /hw/phb3.c
parent5f3720f2c8ad6c423493be06e6f84418c511ce39 (diff)
downloadblackbird-skiboot-2e19de4c2f4b47f0259ba265ea7d1786f1b44cd7.tar.gz
blackbird-skiboot-2e19de4c2f4b47f0259ba265ea7d1786f1b44cd7.zip
hw/phb3: Override root slot's prepare_link_change() with PHB's
For PCI slot behind root port, its prepare_link_change() should be same to PHB's. Otherwise, the UTL events cannot be masked when the slot is reseted, leading to EEH error because of UTL link-down event. Cc: stable # 5.3.0+ Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/phb3.c')
-rw-r--r--hw/phb3.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/phb3.c b/hw/phb3.c
index 35bc73ab..1c09ffe6 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -284,6 +284,14 @@ static void phb3_root_port_init(struct phb *phb, struct pci_device *dev,
uint16_t val16;
uint32_t val32;
+ /* Use PHB's callback so that the UTL events will be masked
+ * or unmasked when the link is down or up.
+ */
+ if (dev->slot && dev->slot->ops.prepare_link_change &&
+ phb->slot && phb->slot->ops.prepare_link_change)
+ dev->slot->ops.prepare_link_change =
+ phb->slot->ops.prepare_link_change;
+
/* Mask UTL link down event if root slot supports surprise
* hotplug as the event should be handled by hotplug driver
* instead of EEH subsystem.
OpenPOWER on IntegriCloud