summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDean Luick <dean.luick@intel.com>2016-04-12 17:50:28 (GMT)
committerDoug Ledford <dledford@redhat.com>2016-04-28 20:32:27 (GMT)
commitde882ff5b8640c34d5f1d5dfd2f22f405465aa19 (patch)
tree63d0207e5824148ae6b55d5ba0e18f62322ef50c
parent33a9eb527172cb46711705c858ccd605e32c82f9 (diff)
downloadlinux-de882ff5b8640c34d5f1d5dfd2f22f405465aa19.tar.xz
IB/hfi1: Correctly obtain the full service class
The function hdr2sc was using an unshifted mask to obtain the 5th bit of the service class. Correct the issue by using the shifted mask. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r--drivers/staging/rdma/hfi1/hfi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/hfi.h b/drivers/staging/rdma/hfi1/hfi.h
index 16cbdc4..ac553f1 100644
--- a/drivers/staging/rdma/hfi1/hfi.h
+++ b/drivers/staging/rdma/hfi1/hfi.h
@@ -1258,7 +1258,7 @@ void receive_interrupt_work(struct work_struct *work);
static inline int hdr2sc(struct hfi1_message_header *hdr, u64 rhf)
{
return ((be16_to_cpu(hdr->lrh[0]) >> 12) & 0xf) |
- ((!!(rhf & RHF_DC_INFO_MASK)) << 4);
+ ((!!(rhf & RHF_DC_INFO_SMASK)) << 4);
}
static inline u16 generate_jkey(kuid_t uid)