aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorDave Olson <dave.olson@qlogic.com>2008-04-17 00:09:29 -0400
committerRoland Dreier <rolandd@cisco.com>2008-04-17 00:09:29 -0400
commit555b203e48faeacc0373eda7bc87db874db37136 (patch)
tree84148fb8547b17125c9934b3d8f0decaf4441198 /drivers/infiniband
parent9355fb6a064723c71e80e9c78de3140b43bfb52d (diff)
IB/ipath: Make link state transition code ignore (transient) link recovery
The hardware-based recovery doesn't need any intervention, and in a few cases we can get a bit confused about state and skip steps such as turning off the link state LED when we consider recovery to be "down". So ignore this transition, and either we recover in hardware, or we transition to down, and will handle it then. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_intr.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c
index 826b96b39952..3bad601fcc90 100644
--- a/drivers/infiniband/hw/ipath/ipath_intr.c
+++ b/drivers/infiniband/hw/ipath/ipath_intr.c
@@ -300,6 +300,18 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
300 ltstate = ipath_ib_linktrstate(dd, ibcs); /* linktrainingtate */ 300 ltstate = ipath_ib_linktrstate(dd, ibcs); /* linktrainingtate */
301 301
302 /* 302 /*
303 * Since going into a recovery state causes the link state to go
304 * down and since recovery is transitory, it is better if we "miss"
305 * ever seeing the link training state go into recovery (i.e.,
306 * ignore this transition for link state special handling purposes)
307 * without even updating ipath_lastibcstat.
308 */
309 if ((ltstate == INFINIPATH_IBCS_LT_STATE_RECOVERRETRAIN) ||
310 (ltstate == INFINIPATH_IBCS_LT_STATE_RECOVERWAITRMT) ||
311 (ltstate == INFINIPATH_IBCS_LT_STATE_RECOVERIDLE))
312 goto done;
313
314 /*
303 * if linkstate transitions into INIT from any of the various down 315 * if linkstate transitions into INIT from any of the various down
304 * states, or if it transitions from any of the up (INIT or better) 316 * states, or if it transitions from any of the up (INIT or better)
305 * states into any of the down states (except link recovery), then 317 * states into any of the down states (except link recovery), then
@@ -316,7 +328,7 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
316 } 328 }
317 } else if ((lastlstate >= INFINIPATH_IBCS_L_STATE_INIT || 329 } else if ((lastlstate >= INFINIPATH_IBCS_L_STATE_INIT ||
318 (dd->ipath_flags & IPATH_IB_FORCE_NOTIFY)) && 330 (dd->ipath_flags & IPATH_IB_FORCE_NOTIFY)) &&
319 ltstate <= INFINIPATH_IBCS_LT_STATE_CFGDEBOUNCE && 331 ltstate <= INFINIPATH_IBCS_LT_STATE_CFGWAITRMT &&
320 ltstate != INFINIPATH_IBCS_LT_STATE_LINKUP) { 332 ltstate != INFINIPATH_IBCS_LT_STATE_LINKUP) {
321 int handled; 333 int handled;
322 handled = dd->ipath_f_ib_updown(dd, 0, ibcs); 334 handled = dd->ipath_f_ib_updown(dd, 0, ibcs);
@@ -460,6 +472,8 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
460 472
461skip_ibchange: 473skip_ibchange:
462 dd->ipath_lastibcstat = ibcs; 474 dd->ipath_lastibcstat = ibcs;
475done:
476 return;
463} 477}
464 478
465static void handle_supp_msgs(struct ipath_devdata *dd, 479static void handle_supp_msgs(struct ipath_devdata *dd,