Commit 02d1008b authored by Jakub Byczkowski's avatar Jakub Byczkowski Committed by Doug Ledford

IB/hfi1: Fix checks for Offline transient state

In goto_offline() function pstate is masked by 0xff when compared
to PLS_OFFLINE state. Mask should be 0xf0, since upper 4 bits
specify the "major" state.
Reviewed-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Reviewed-by: default avatarEaswar Hariharan <easwar.hariharan@intel.com>
Signed-off-by: default avatarJakub Byczkowski <jakub.byczkowski@intel.com>
Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 0d7e2d21
...@@ -10233,7 +10233,7 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason) ...@@ -10233,7 +10233,7 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason)
if (pstate == PLS_OFFLINE) { if (pstate == PLS_OFFLINE) {
do_transition = 0; /* in right state */ do_transition = 0; /* in right state */
do_wait = 0; /* ...no need to wait */ do_wait = 0; /* ...no need to wait */
} else if ((pstate & 0xff) == PLS_OFFLINE) { } else if ((pstate & 0xf0) == PLS_OFFLINE) {
do_transition = 0; /* in an offline transient state */ do_transition = 0; /* in an offline transient state */
do_wait = 1; /* ...wait for it to settle */ do_wait = 1; /* ...wait for it to settle */
} else { } else {
......
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