diff options
Diffstat (limited to 'drivers/pci/hotplug/pciehp_hpc.c')
-rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 005817e40ad3..2795445233b3 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -80,6 +80,8 @@ static int pcie_poll_cmd(struct controller *ctrl, int timeout) | |||
80 | if (slot_status & PCI_EXP_SLTSTA_CC) { | 80 | if (slot_status & PCI_EXP_SLTSTA_CC) { |
81 | pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, | 81 | pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, |
82 | PCI_EXP_SLTSTA_CC); | 82 | PCI_EXP_SLTSTA_CC); |
83 | ctrl->cmd_busy = 0; | ||
84 | smp_mb(); | ||
83 | return 1; | 85 | return 1; |
84 | } | 86 | } |
85 | if (timeout < 0) | 87 | if (timeout < 0) |
@@ -576,6 +578,8 @@ read_status: | |||
576 | */ | 578 | */ |
577 | if (ctrl->power_fault_detected) | 579 | if (ctrl->power_fault_detected) |
578 | status &= ~PCI_EXP_SLTSTA_PFD; | 580 | status &= ~PCI_EXP_SLTSTA_PFD; |
581 | else if (status & PCI_EXP_SLTSTA_PFD) | ||
582 | ctrl->power_fault_detected = true; | ||
579 | 583 | ||
580 | events |= status; | 584 | events |= status; |
581 | if (!events) { | 585 | if (!events) { |
@@ -585,7 +589,7 @@ read_status: | |||
585 | } | 589 | } |
586 | 590 | ||
587 | if (status) { | 591 | if (status) { |
588 | pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, events); | 592 | pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, status); |
589 | 593 | ||
590 | /* | 594 | /* |
591 | * In MSI mode, all event bits must be zero before the port | 595 | * In MSI mode, all event bits must be zero before the port |
@@ -660,8 +664,7 @@ static irqreturn_t pciehp_ist(int irq, void *dev_id) | |||
660 | } | 664 | } |
661 | 665 | ||
662 | /* Check Power Fault Detected */ | 666 | /* Check Power Fault Detected */ |
663 | if ((events & PCI_EXP_SLTSTA_PFD) && !ctrl->power_fault_detected) { | 667 | if (events & PCI_EXP_SLTSTA_PFD) { |
664 | ctrl->power_fault_detected = 1; | ||
665 | ctrl_err(ctrl, "Slot(%s): Power fault\n", slot_name(slot)); | 668 | ctrl_err(ctrl, "Slot(%s): Power fault\n", slot_name(slot)); |
666 | pciehp_set_attention_status(slot, 1); | 669 | pciehp_set_attention_status(slot, 1); |
667 | pciehp_green_led_off(slot); | 670 | pciehp_green_led_off(slot); |
@@ -968,6 +971,8 @@ static void quirk_cmd_compl(struct pci_dev *pdev) | |||
968 | } | 971 | } |
969 | DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, | 972 | DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, |
970 | PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl); | 973 | PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl); |
974 | DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0110, | ||
975 | PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl); | ||
971 | DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0400, | 976 | DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0400, |
972 | PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl); | 977 | PCI_CLASS_BRIDGE_PCI, 8, quirk_cmd_compl); |
973 | DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0401, | 978 | DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_QCOM, 0x0401, |