Browse Source

Merge branch 'pci/hotplug' into next

* pci/hotplug:
  PCI: pciehp: Report power fault only once until we clear it
  PCI: shpchp: Enable bridge bus mastering if MSI is enabled
Bjorn Helgaas 8 years ago
parent
commit
cf5f9cc8e4
2 changed files with 10 additions and 0 deletions
  1. 8 0
      drivers/pci/hotplug/pciehp_hpc.c
  2. 2 0
      drivers/pci/hotplug/shpchp_hpc.c

+ 8 - 0
drivers/pci/hotplug/pciehp_hpc.c

@@ -586,6 +586,14 @@ static irqreturn_t pciehp_isr(int irq, void *dev_id)
 	events = status & (PCI_EXP_SLTSTA_ABP | PCI_EXP_SLTSTA_PFD |
 			   PCI_EXP_SLTSTA_PDC | PCI_EXP_SLTSTA_CC |
 			   PCI_EXP_SLTSTA_DLLSC);
+
+	/*
+	 * If we've already reported a power fault, don't report it again
+	 * until we've done something to handle it.
+	 */
+	if (ctrl->power_fault_detected)
+		events &= ~PCI_EXP_SLTSTA_PFD;
+
 	if (!events)
 		return IRQ_NONE;
 

+ 2 - 0
drivers/pci/hotplug/shpchp_hpc.c

@@ -1062,6 +1062,8 @@ int shpc_init(struct controller *ctrl, struct pci_dev *pdev)
 		if (rc) {
 			ctrl_info(ctrl, "Can't get msi for the hotplug controller\n");
 			ctrl_info(ctrl, "Use INTx for the hotplug controller\n");
+		} else {
+			pci_set_master(pdev);
 		}
 
 		rc = request_irq(ctrl->pci_dev->irq, shpc_isr, IRQF_SHARED,