aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_driver.c
diff options
context:
space:
mode:
authorDave Olson <dave.olson@qlogic.com>2008-01-09 02:16:17 -0500
committerRoland Dreier <rolandd@cisco.com>2008-01-25 17:15:44 -0500
commit7387273307139ebf8d7f7fb3bb79d1ca48bd71d6 (patch)
tree9d65581f68a0dd14589053aaafffa155193e5bf1 /drivers/infiniband/hw/ipath/ipath_driver.c
parent2ec8e662416cc9a171cdfe3d75e1ff00ba757859 (diff)
IB/ipath: Remove unused MDIO interface code
This code has been unused for some time, but still had leftovers from when it was used. Signed-off-by: Dave Olson <dave.olson@qlogic.com Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_driver.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_driver.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c
index 5a9dc317f40..bfcdf8c254c 100644
--- a/drivers/infiniband/hw/ipath/ipath_driver.c
+++ b/drivers/infiniband/hw/ipath/ipath_driver.c
@@ -1618,77 +1618,6 @@ bail:
1618 return ret; 1618 return ret;
1619} 1619}
1620 1620
1621int ipath_waitfor_complete(struct ipath_devdata *dd, ipath_kreg reg_id,
1622 u64 bits_to_wait_for, u64 * valp)
1623{
1624 unsigned long timeout;
1625 u64 lastval, val;
1626 int ret;
1627
1628 lastval = ipath_read_kreg64(dd, reg_id);
1629 /* wait a ridiculously long time */
1630 timeout = jiffies + msecs_to_jiffies(5);
1631 do {
1632 val = ipath_read_kreg64(dd, reg_id);
1633 /* set so they have something, even on failures. */
1634 *valp = val;
1635 if ((val & bits_to_wait_for) == bits_to_wait_for) {
1636 ret = 0;
1637 break;
1638 }
1639 if (val != lastval)
1640 ipath_cdbg(VERBOSE, "Changed from %llx to %llx, "
1641 "waiting for %llx bits\n",
1642 (unsigned long long) lastval,
1643 (unsigned long long) val,
1644 (unsigned long long) bits_to_wait_for);
1645 cond_resched();
1646 if (time_after(jiffies, timeout)) {
1647 ipath_dbg("Didn't get bits %llx in register 0x%x, "
1648 "got %llx\n",
1649 (unsigned long long) bits_to_wait_for,
1650 reg_id, (unsigned long long) *valp);
1651 ret = -ENODEV;
1652 break;
1653 }
1654 } while (1);
1655
1656 return ret;
1657}
1658
1659/**
1660 * ipath_waitfor_mdio_cmdready - wait for last command to complete
1661 * @dd: the infinipath device
1662 *
1663 * Like ipath_waitfor_complete(), but we wait for the CMDVALID bit to go
1664 * away indicating the last command has completed. It doesn't return data
1665 */
1666int ipath_waitfor_mdio_cmdready(struct ipath_devdata *dd)
1667{
1668 unsigned long timeout;
1669 u64 val;
1670 int ret;
1671
1672 /* wait a ridiculously long time */
1673 timeout = jiffies + msecs_to_jiffies(5);
1674 do {
1675 val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_mdio);
1676 if (!(val & IPATH_MDIO_CMDVALID)) {
1677 ret = 0;
1678 break;
1679 }
1680 cond_resched();
1681 if (time_after(jiffies, timeout)) {
1682 ipath_dbg("CMDVALID stuck in mdio reg? (%llx)\n",
1683 (unsigned long long) val);
1684 ret = -ENODEV;
1685 break;
1686 }
1687 } while (1);
1688
1689 return ret;
1690}
1691
1692 1621
1693/* 1622/*
1694 * Flush all sends that might be in the ready to send state, as well as any 1623 * Flush all sends that might be in the ready to send state, as well as any