diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_driver.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_driver.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index 09c5fd84b1e3..6ccba365a24c 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -740,7 +740,7 @@ void ipath_disarm_piobufs(struct ipath_devdata *dd, unsigned first, | |||
740 | * pioavail updates to memory to stop. | 740 | * pioavail updates to memory to stop. |
741 | */ | 741 | */ |
742 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, | 742 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, |
743 | sendorig & ~IPATH_S_PIOBUFAVAILUPD); | 743 | sendorig & ~INFINIPATH_S_PIOBUFAVAILUPD); |
744 | sendorig = ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); | 744 | sendorig = ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); |
745 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, | 745 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, |
746 | dd->ipath_sendctrl); | 746 | dd->ipath_sendctrl); |
@@ -1614,7 +1614,7 @@ int ipath_waitfor_mdio_cmdready(struct ipath_devdata *dd) | |||
1614 | * it's safer to always do it. | 1614 | * it's safer to always do it. |
1615 | * PIOAvail bits are updated by the chip as if normal send had happened. | 1615 | * PIOAvail bits are updated by the chip as if normal send had happened. |
1616 | */ | 1616 | */ |
1617 | void ipath_cancel_sends(struct ipath_devdata *dd) | 1617 | void ipath_cancel_sends(struct ipath_devdata *dd, int restore_sendctrl) |
1618 | { | 1618 | { |
1619 | ipath_dbg("Cancelling all in-progress send buffers\n"); | 1619 | ipath_dbg("Cancelling all in-progress send buffers\n"); |
1620 | dd->ipath_lastcancel = jiffies+HZ/2; /* skip armlaunch errs a bit */ | 1620 | dd->ipath_lastcancel = jiffies+HZ/2; /* skip armlaunch errs a bit */ |
@@ -1627,6 +1627,9 @@ void ipath_cancel_sends(struct ipath_devdata *dd) | |||
1627 | ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); | 1627 | ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); |
1628 | ipath_disarm_piobufs(dd, 0, | 1628 | ipath_disarm_piobufs(dd, 0, |
1629 | (unsigned)(dd->ipath_piobcnt2k + dd->ipath_piobcnt4k)); | 1629 | (unsigned)(dd->ipath_piobcnt2k + dd->ipath_piobcnt4k)); |
1630 | if (restore_sendctrl) /* else done by caller later */ | ||
1631 | ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, | ||
1632 | dd->ipath_sendctrl); | ||
1630 | 1633 | ||
1631 | /* and again, be sure all have hit the chip */ | 1634 | /* and again, be sure all have hit the chip */ |
1632 | ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); | 1635 | ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); |
@@ -1655,7 +1658,7 @@ static void ipath_set_ib_lstate(struct ipath_devdata *dd, int which) | |||
1655 | /* flush all queued sends when going to DOWN or INIT, to be sure that | 1658 | /* flush all queued sends when going to DOWN or INIT, to be sure that |
1656 | * they don't block MAD packets */ | 1659 | * they don't block MAD packets */ |
1657 | if (!linkcmd || linkcmd == INFINIPATH_IBCC_LINKCMD_INIT) | 1660 | if (!linkcmd || linkcmd == INFINIPATH_IBCC_LINKCMD_INIT) |
1658 | ipath_cancel_sends(dd); | 1661 | ipath_cancel_sends(dd, 1); |
1659 | 1662 | ||
1660 | ipath_write_kreg(dd, dd->ipath_kregs->kr_ibcctrl, | 1663 | ipath_write_kreg(dd, dd->ipath_kregs->kr_ibcctrl, |
1661 | dd->ipath_ibcctrl | which); | 1664 | dd->ipath_ibcctrl | which); |
@@ -2000,7 +2003,7 @@ void ipath_shutdown_device(struct ipath_devdata *dd) | |||
2000 | 2003 | ||
2001 | ipath_set_ib_lstate(dd, INFINIPATH_IBCC_LINKINITCMD_DISABLE << | 2004 | ipath_set_ib_lstate(dd, INFINIPATH_IBCC_LINKINITCMD_DISABLE << |
2002 | INFINIPATH_IBCC_LINKINITCMD_SHIFT); | 2005 | INFINIPATH_IBCC_LINKINITCMD_SHIFT); |
2003 | ipath_cancel_sends(dd); | 2006 | ipath_cancel_sends(dd, 0); |
2004 | 2007 | ||
2005 | /* disable IBC */ | 2008 | /* disable IBC */ |
2006 | dd->ipath_control &= ~INFINIPATH_C_LINKENABLE; | 2009 | dd->ipath_control &= ~INFINIPATH_C_LINKENABLE; |