Commit 555b203e authored by Dave Olson's avatar Dave Olson Committed by Roland Dreier

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: default avatarDave Olson <dave.olson@qlogic.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 9355fb6a
...@@ -299,6 +299,18 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd, ...@@ -299,6 +299,18 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
lastlstate = ipath_ib_linkstate(dd, dd->ipath_lastibcstat); lastlstate = ipath_ib_linkstate(dd, dd->ipath_lastibcstat);
ltstate = ipath_ib_linktrstate(dd, ibcs); /* linktrainingtate */ ltstate = ipath_ib_linktrstate(dd, ibcs); /* linktrainingtate */
/*
* Since going into a recovery state causes the link state to go
* down and since recovery is transitory, it is better if we "miss"
* ever seeing the link training state go into recovery (i.e.,
* ignore this transition for link state special handling purposes)
* without even updating ipath_lastibcstat.
*/
if ((ltstate == INFINIPATH_IBCS_LT_STATE_RECOVERRETRAIN) ||
(ltstate == INFINIPATH_IBCS_LT_STATE_RECOVERWAITRMT) ||
(ltstate == INFINIPATH_IBCS_LT_STATE_RECOVERIDLE))
goto done;
/* /*
* if linkstate transitions into INIT from any of the various down * if linkstate transitions into INIT from any of the various down
* states, or if it transitions from any of the up (INIT or better) * states, or if it transitions from any of the up (INIT or better)
...@@ -316,7 +328,7 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd, ...@@ -316,7 +328,7 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
} }
} else if ((lastlstate >= INFINIPATH_IBCS_L_STATE_INIT || } else if ((lastlstate >= INFINIPATH_IBCS_L_STATE_INIT ||
(dd->ipath_flags & IPATH_IB_FORCE_NOTIFY)) && (dd->ipath_flags & IPATH_IB_FORCE_NOTIFY)) &&
ltstate <= INFINIPATH_IBCS_LT_STATE_CFGDEBOUNCE && ltstate <= INFINIPATH_IBCS_LT_STATE_CFGWAITRMT &&
ltstate != INFINIPATH_IBCS_LT_STATE_LINKUP) { ltstate != INFINIPATH_IBCS_LT_STATE_LINKUP) {
int handled; int handled;
handled = dd->ipath_f_ib_updown(dd, 0, ibcs); handled = dd->ipath_f_ib_updown(dd, 0, ibcs);
...@@ -460,6 +472,8 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd, ...@@ -460,6 +472,8 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
skip_ibchange: skip_ibchange:
dd->ipath_lastibcstat = ibcs; dd->ipath_lastibcstat = ibcs;
done:
return;
} }
static void handle_supp_msgs(struct ipath_devdata *dd, static void handle_supp_msgs(struct ipath_devdata *dd,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment