===================================================================
@@ -612,6 +612,7 @@ static irqreturn_t pcie_isr(int irq, voi
struct controller *ctrl = (struct controller *)dev_id;
struct slot *slot = ctrl->slot;
u16 detected, intr_loc;
+ static int nr_power_faults = 0;
/*
* In order to guarantee that all interrupt events are
@@ -664,6 +665,13 @@ static irqreturn_t pcie_isr(int irq, voi
if (intr_loc & PCI_EXP_SLTSTA_PDC)
pciehp_handle_presence_change(slot);
+ if ((intr_loc & PCI_EXP_SLTSTA_PFD) && (++nr_power_faults > 100)) {
+ u16 reg16;
+ pciehp_readw(ctrl, PCI_EXP_SLTCTL, ®16);
+ reg16 &= ~PCI_EXP_SLTCTL_PFDE;
+ pciehp_writew(ctrl, PCI_EXP_SLTCTL, reg16);
+ }
+
/* Check Power Fault Detected */
if ((intr_loc & PCI_EXP_SLTSTA_PFD) && !ctrl->power_fault_detected) {
ctrl->power_fault_detected = 1;