Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294714
b: refs/heads/master
c: bffe4f7
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Jesse Barnes committed Feb 14, 2012
1 parent 438dc35 commit ae938fa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e2ce405b24eef9f4cc947bf5f430ca27b474f1f
refs/heads/master: bffe4f72fcdd92bfb24909d586d1636e5cec500d
19 changes: 15 additions & 4 deletions trunk/drivers/pci/hotplug/pciehp_hpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,19 +257,30 @@ static bool check_link_active(struct controller *ctrl)
return ret;
}

static void pcie_wait_link_active(struct controller *ctrl)
static void __pcie_wait_link_active(struct controller *ctrl, bool active)
{
int timeout = 1000;

if (check_link_active(ctrl))
if (check_link_active(ctrl) == active)
return;
while (timeout > 0) {
msleep(10);
timeout -= 10;
if (check_link_active(ctrl))
if (check_link_active(ctrl) == active)
return;
}
ctrl_dbg(ctrl, "Data Link Layer Link Active not set in 1000 msec\n");
ctrl_dbg(ctrl, "Data Link Layer Link Active not %s in 1000 msec\n",
active ? "set" : "cleared");
}

static void pcie_wait_link_active(struct controller *ctrl)
{
__pcie_wait_link_active(ctrl, true);
}

static void pcie_wait_link_not_active(struct controller *ctrl)
{
__pcie_wait_link_active(ctrl, false);
}

static bool pci_bus_check_dev(struct pci_bus *bus, int devfn)
Expand Down

0 comments on commit ae938fa

Please sign in to comment.