aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorRajat Jain <rajatxjain@gmail.com>2014-02-04 21:30:04 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-02-11 18:08:43 -0500
commitb1811d2455f32754cc3d8725bf2e961c5eda2a72 (patch)
tree9d0a036a7b204465dfd1086e32adf75cca442066 /drivers/pci
parent4f854f2a2a4414248f82239e8d86b98489a1cf40 (diff)
PCI: pciehp: Don't disable the link permanently during removal
We need future link up events for hot-add, thus don't disable the link permanently during device removal. Also, remove the static functions that are now left unused. This reverts part of 2debd9289997 ("PCI: pciehp: Disable/enable link during slot power off/on"). This was discussed at the URL below, where it was revealed that it was done for a bug in a PCIe repeater chip on that particular platform. Link: https://lkml.kernel.org/r/CAErSpo72KZ-a2OSQLWoK71GCgwBt676XZdGt4tEYm-6UYnLmPw@mail.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.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 245a3cb5d2f3..15ca3a1cad8d 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -242,11 +242,6 @@ static void pcie_wait_link_active(struct controller *ctrl)
242 __pcie_wait_link_active(ctrl, true); 242 __pcie_wait_link_active(ctrl, true);
243} 243}
244 244
245static void pcie_wait_link_not_active(struct controller *ctrl)
246{
247 __pcie_wait_link_active(ctrl, false);
248}
249
250static bool pci_bus_check_dev(struct pci_bus *bus, int devfn) 245static bool pci_bus_check_dev(struct pci_bus *bus, int devfn)
251{ 246{
252 u32 l; 247 u32 l;
@@ -332,11 +327,6 @@ static int pciehp_link_enable(struct controller *ctrl)
332 return __pciehp_link_set(ctrl, true); 327 return __pciehp_link_set(ctrl, true);
333} 328}
334 329
335static int pciehp_link_disable(struct controller *ctrl)
336{
337 return __pciehp_link_set(ctrl, false);
338}
339
340void pciehp_get_attention_status(struct slot *slot, u8 *status) 330void pciehp_get_attention_status(struct slot *slot, u8 *status)
341{ 331{
342 struct controller *ctrl = slot->ctrl; 332 struct controller *ctrl = slot->ctrl;
@@ -508,14 +498,6 @@ void pciehp_power_off_slot(struct slot * slot)
508{ 498{
509 struct controller *ctrl = slot->ctrl; 499 struct controller *ctrl = slot->ctrl;
510 500
511 /* Disable the link at first */
512 pciehp_link_disable(ctrl);
513 /* wait the link is down */
514 if (ctrl->link_active_reporting)
515 pcie_wait_link_not_active(ctrl);
516 else
517 msleep(1000);
518
519 pcie_write_cmd(ctrl, PCI_EXP_SLTCTL_PWR_OFF, PCI_EXP_SLTCTL_PCC); 501 pcie_write_cmd(ctrl, PCI_EXP_SLTCTL_PWR_OFF, PCI_EXP_SLTCTL_PCC);
520 ctrl_dbg(ctrl, "%s: SLOTCTRL %x write cmd %x\n", __func__, 502 ctrl_dbg(ctrl, "%s: SLOTCTRL %x write cmd %x\n", __func__,
521 pci_pcie_cap(ctrl->pcie->port) + PCI_EXP_SLTCTL, 503 pci_pcie_cap(ctrl->pcie->port) + PCI_EXP_SLTCTL,