summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorJakub Byczkowski <jakub.byczkowski@intel.com>2017-05-04 05:13:58 -0700
committerDoug Ledford <dledford@redhat.com>2017-05-04 19:31:46 -0400
commit02d1008bcf41c7eada7882df673ae3794f7bfea8 (patch)
tree5db37b187212312af426a63565b13e5fa9138c48 /drivers/infiniband
parent0d7e2d2166f6b0b7d1959ca858052a15feb574cc (diff)
downloadlinux-02d1008bcf41c7eada7882df673ae3794f7bfea8.tar.gz
linux-02d1008bcf41c7eada7882df673ae3794f7bfea8.tar.bz2
linux-02d1008bcf41c7eada7882df673ae3794f7bfea8.zip
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 <dennis.dalessandro@intel.com> Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com> Signed-off-by: Jakub Byczkowski <jakub.byczkowski@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/hfi1/chip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c
index 0f6916d2d549..c96bb3a0c788 100644
--- a/drivers/infiniband/hw/hfi1/chip.c
+++ b/drivers/infiniband/hw/hfi1/chip.c
@@ -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 {