Skip to content

Commit fce2564

Browse files
author
Fox Snowpatch
committed
1 parent 182544a commit fce2564

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

  • arch/powerpc/platforms/pseries

arch/powerpc/platforms/pseries/pci.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,3 +291,24 @@ int pseries_root_bridge_prepare(struct pci_host_bridge *bridge)
291291
bus->cur_bus_speed = prop_to_pci_speed(pcie_link_speed_stats[1]);
292292
return 0;
293293
}
294+
295+
/*
296+
* Workaround for sluggish PCIe device firmware.
297+
*
298+
* The device violates the PCIe spec recovery timing when transitioning
299+
* from D3hot to D0. On standard architectures this is often ignored, but
300+
* the strict PowerPC pseries PHB catches the Unsupported Request during
301+
* the subsequent config read and triggers an EEH.
302+
*
303+
* We inject a longer delay to ensure the device is ready before the PCI
304+
* core attempts to access configuration space.
305+
*/
306+
static void quirk_pseries_d0_wake_delay(struct pci_dev *dev)
307+
{
308+
dev->d3hot_delay = 200;
309+
pci_info(dev, "pseries Quirk:D3hot->D0 delay %d ms to prevent EEH\n",
310+
dev->d3hot_delay);
311+
}
312+
/* Blanket application to ALL Broadcom PCI devices */
313+
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
314+
PCI_ANY_ID, quirk_pseries_d0_wake_delay);

0 commit comments

Comments
 (0)