summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/qib/qib_intr.c
diff options
context:
space:
mode:
authorMitko Haralanov <mitko@qlogic.com>2011-06-09 20:27:26 +0000
committerRoland Dreier <roland@purestorage.com>2011-06-17 11:56:59 -0700
commit3126448451105fae59de0058c68692aa09aa4c37 (patch)
treeb895c5861c0e648e4ee2876376d7353b6c348e43 /drivers/infiniband/hw/qib/qib_intr.c
parent2c53b436a30867eb6b47dd7bab23ba638d1fb0d2 (diff)
IB/qib: Ensure that LOS and DFE are being turned off
Due to timing, it is possible for the LOS and DFE to remain on. This is due to the link progressing to LinkUP prior to the driver getting the first Status Changed interrupt. By expanding the conditions under which LOS is turned off and DFE timeout is being set, timing is no longer an issue. Signed-off-by: Mitko Haralanov <mitko@qlogic.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_intr.c')
-rw-r--r--drivers/infiniband/hw/qib/qib_intr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qib/qib_intr.c b/drivers/infiniband/hw/qib/qib_intr.c
index a693c56ec8a6..6ae57d23004a 100644
--- a/drivers/infiniband/hw/qib/qib_intr.c
+++ b/drivers/infiniband/hw/qib/qib_intr.c
@@ -96,8 +96,12 @@ void qib_handle_e_ibstatuschanged(struct qib_pportdata *ppd, u64 ibcs)
* states, or if it transitions from any of the up (INIT or better)
* states into any of the down states (except link recovery), then
* call the chip-specific code to take appropriate actions.
+ *
+ * ppd->lflags could be 0 if this is the first time the interrupt
+ * handlers has been called but the link is already up.
*/
- if (lstate >= IB_PORT_INIT && (ppd->lflags & QIBL_LINKDOWN) &&
+ if (lstate >= IB_PORT_INIT &&
+ (!ppd->lflags || (ppd->lflags & QIBL_LINKDOWN)) &&
ltstate == IB_PHYSPORTSTATE_LINKUP) {
/* transitioned to UP */
if (dd->f_ib_updown(ppd, 1, ibcs))