Commit 4703389f authored by Rajat Jain's avatar Rajat Jain Committed by Bjorn Helgaas

PCI: pciehp: Make check_link_active() non-static

check_link_active() functionality needs to be used by subsequent patches
(that introduce link state change based hotplug). Thus make the function
non-static, and rename it to pciehp_check_link_active() so as to be
consistent with other non-static functions.
Signed-off-by: default avatarRajat Jain <rajatxjain@gmail.com>
Signed-off-by: default avatarRajat Jain <rajatjain@juniper.net>
Signed-off-by: default avatarGuenter Roeck <groeck@juniper.net>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 38dbfb59
...@@ -153,6 +153,7 @@ void pciehp_green_led_on(struct slot *slot); ...@@ -153,6 +153,7 @@ void pciehp_green_led_on(struct slot *slot);
void pciehp_green_led_off(struct slot *slot); void pciehp_green_led_off(struct slot *slot);
void pciehp_green_led_blink(struct slot *slot); void pciehp_green_led_blink(struct slot *slot);
int pciehp_check_link_status(struct controller *ctrl); int pciehp_check_link_status(struct controller *ctrl);
bool pciehp_check_link_active(struct controller *ctrl);
void pciehp_release_ctrl(struct controller *ctrl); void pciehp_release_ctrl(struct controller *ctrl);
int pciehp_reset_slot(struct slot *slot, int probe); int pciehp_reset_slot(struct slot *slot, int probe);
......
...@@ -206,7 +206,7 @@ static void pcie_write_cmd(struct controller *ctrl, u16 cmd, u16 mask) ...@@ -206,7 +206,7 @@ static void pcie_write_cmd(struct controller *ctrl, u16 cmd, u16 mask)
mutex_unlock(&ctrl->ctrl_lock); mutex_unlock(&ctrl->ctrl_lock);
} }
static bool check_link_active(struct controller *ctrl) bool pciehp_check_link_active(struct controller *ctrl)
{ {
struct pci_dev *pdev = ctrl_dev(ctrl); struct pci_dev *pdev = ctrl_dev(ctrl);
u16 lnk_status; u16 lnk_status;
...@@ -225,12 +225,12 @@ static void __pcie_wait_link_active(struct controller *ctrl, bool active) ...@@ -225,12 +225,12 @@ static void __pcie_wait_link_active(struct controller *ctrl, bool active)
{ {
int timeout = 1000; int timeout = 1000;
if (check_link_active(ctrl) == active) if (pciehp_check_link_active(ctrl) == active)
return; return;
while (timeout > 0) { while (timeout > 0) {
msleep(10); msleep(10);
timeout -= 10; timeout -= 10;
if (check_link_active(ctrl) == active) if (pciehp_check_link_active(ctrl) == active)
return; return;
} }
ctrl_dbg(ctrl, "Data Link Layer Link Active not %s in 1000 msec\n", ctrl_dbg(ctrl, "Data Link Layer Link Active not %s in 1000 msec\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment