aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorRajat Jain <rajatxjain@gmail.com>2014-02-04 21:29:23 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-02-11 18:08:43 -0500
commit4f854f2a2a4414248f82239e8d86b98489a1cf40 (patch)
tree603db5d27d676b6afa32d00b1b63067781a0caaf /drivers/pci
parente48f1b67f668762003e8888eccd7acb71109e874 (diff)
PCI: pciehp: Enable link state change notifications
Enable the Link state notifications unconditionally. Enable the presence detection notification only if attention button is absent. This was discussed at this thread: https://lkml.kernel.org/r/529E5C0E.80903@gmail.com Signed-off-by: Rajat Jain <rajatxjain@gmail.com> Signed-off-by: Rajat Jain <rajatjain@juniper.net> Signed-off-by: Guenter Roeck <groeck@juniper.net> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index b413dce8f194..245a3cb5d2f3 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -600,9 +600,17 @@ void pcie_enable_notification(struct controller *ctrl)
600 * when it is cleared in the interrupt service routine, and 600 * when it is cleared in the interrupt service routine, and
601 * next power fault detected interrupt was notified again. 601 * next power fault detected interrupt was notified again.
602 */ 602 */
603 cmd = PCI_EXP_SLTCTL_PDCE; 603
604 /*
605 * Always enable link events: thus link-up and link-down shall
606 * always be treated as hotplug and unplug respectively. Enable
607 * presence detect only if Attention Button is not present.
608 */
609 cmd = PCI_EXP_SLTCTL_DLLSCE;
604 if (ATTN_BUTTN(ctrl)) 610 if (ATTN_BUTTN(ctrl))
605 cmd |= PCI_EXP_SLTCTL_ABPE; 611 cmd |= PCI_EXP_SLTCTL_ABPE;
612 else
613 cmd |= PCI_EXP_SLTCTL_PDCE;
606 if (MRL_SENS(ctrl)) 614 if (MRL_SENS(ctrl))
607 cmd |= PCI_EXP_SLTCTL_MRLSCE; 615 cmd |= PCI_EXP_SLTCTL_MRLSCE;
608 if (!pciehp_poll_mode) 616 if (!pciehp_poll_mode)
@@ -610,7 +618,8 @@ void pcie_enable_notification(struct controller *ctrl)
610 618
611 mask = (PCI_EXP_SLTCTL_PDCE | PCI_EXP_SLTCTL_ABPE | 619 mask = (PCI_EXP_SLTCTL_PDCE | PCI_EXP_SLTCTL_ABPE |
612 PCI_EXP_SLTCTL_MRLSCE | PCI_EXP_SLTCTL_PFDE | 620 PCI_EXP_SLTCTL_MRLSCE | PCI_EXP_SLTCTL_PFDE |
613 PCI_EXP_SLTCTL_HPIE | PCI_EXP_SLTCTL_CCIE); 621 PCI_EXP_SLTCTL_HPIE | PCI_EXP_SLTCTL_CCIE |
622 PCI_EXP_SLTCTL_DLLSCE);
614 623
615 pcie_write_cmd(ctrl, cmd, mask); 624 pcie_write_cmd(ctrl, cmd, mask);
616} 625}