Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294713
b: refs/heads/master
c: 4e2ce40
h: refs/heads/master
i:
  294711: b2e0a52
v: v3
  • Loading branch information
Yinghai Lu authored and Jesse Barnes committed Feb 14, 2012
1 parent afaeddd commit 438dc35
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 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: 2f5d8e4ff947ad6673397083b48719cd6c59cd61
refs/heads/master: 4e2ce405b24eef9f4cc947bf5f430ca27b474f1f
17 changes: 12 additions & 5 deletions trunk/drivers/pci/hotplug/pciehp_hpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,20 @@ static int pcie_write_cmd(struct controller *ctrl, u16 cmd, u16 mask)
return retval;
}

static inline int check_link_active(struct controller *ctrl)
static bool check_link_active(struct controller *ctrl)
{
u16 link_status;
bool ret = false;
u16 lnk_status;

if (pciehp_readw(ctrl, PCI_EXP_LNKSTA, &link_status))
return 0;
return !!(link_status & PCI_EXP_LNKSTA_DLLLA);
if (pciehp_readw(ctrl, PCI_EXP_LNKSTA, &lnk_status))
return ret;

ret = !!(lnk_status & PCI_EXP_LNKSTA_DLLLA);

if (ret)
ctrl_dbg(ctrl, "%s: lnk_status = %x\n", __func__, lnk_status);

return ret;
}

static void pcie_wait_link_active(struct controller *ctrl)
Expand Down

0 comments on commit 438dc35

Please sign in to comment.