aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma/hfi1/hfi.h
diff options
context:
space:
mode:
authorBryan Morgan <bryan.c.morgan@intel.com>2016-02-03 14:30:49 -0800
committerDoug Ledford <dledford@redhat.com>2016-03-10 20:37:45 -0500
commita9c05e350c17db98d82e8784ed0c05a78bd0169f (patch)
tree46624f954be8873bb5b643e86860b21e7c0c3c51 /drivers/staging/rdma/hfi1/hfi.h
parentstaging/rdma/hfi1: Remove srq functionality (diff)
downloadlinux-dev-a9c05e350c17db98d82e8784ed0c05a78bd0169f.tar.xz
linux-dev-a9c05e350c17db98d82e8784ed0c05a78bd0169f.zip
staging/rdma/hfi1: HFI reports wrong offline disabled reason when cable removed
Removing QSFP cable should report 'No Local Media' instead of 'Transient' as reported by 'opaportinfo'. Workaround is to change the state to OPA_LINKDOWN_REASON_LOCAL_MEDIA_NOT_INSTALLED in cable handler. With cable still removed, 'opaportinfo bounce' should not cause a state change to Polling, as reported by 'opaportinfo'. Resolution is to prevent physical state change from Offline->Polling. Use a macro to mask lower nibble of OPA_LINKDOWN_REASON* as needed for offline_disabled_reason. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com> Reviewed-by: Dean Luick <dean.luick@intel.com> Reported-by: Todd Rimmer <todd.rimmer@intel.com> Signed-off-by: Bryan Morgan <bryan.c.morgan@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma/hfi1/hfi.h')
-rw-r--r--drivers/staging/rdma/hfi1/hfi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/rdma/hfi1/hfi.h b/drivers/staging/rdma/hfi1/hfi.h
index e6a5fede0c02..57014b017a0d 100644
--- a/drivers/staging/rdma/hfi1/hfi.h
+++ b/drivers/staging/rdma/hfi1/hfi.h
@@ -99,6 +99,8 @@ extern unsigned long hfi1_cap_mask;
#define HFI1_CAP_IS_USET(cap) (!!HFI1_CAP_UGET(cap))
#define HFI1_MISC_GET() ((hfi1_cap_mask >> HFI1_CAP_MISC_SHIFT) & \
HFI1_CAP_MISC_MASK)
+/* Offline Disabled Reason is 4-bits */
+#define HFI1_ODR_MASK(rsn) ((rsn) & OPA_PI_MASK_OFFLINE_REASON)
/*
* Control context is always 0 and handles the error packets.