mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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: Dennis Dalessandro <[email protected]> Reviewed-by: Easwar Hariharan <[email protected]> Signed-off-by: Jakub Byczkowski <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
This commit is contained in:
parent
0d7e2d2166
commit
02d1008bcf
1 changed files with 1 additions and 1 deletions
|
|
@ -10233,7 +10233,7 @@ static int goto_offline(struct hfi1_pportdata *ppd, u8 rem_reason)
|
|||
if (pstate == PLS_OFFLINE) {
|
||||
do_transition = 0; /* in right state */
|
||||
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_wait = 1; /* ...wait for it to settle */
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue