]> Git Repo - linux.git/commitdiff
IB/hfi1: Correctly obtain the full service class
authorDean Luick <[email protected]>
Tue, 12 Apr 2016 17:50:28 +0000 (10:50 -0700)
committerDoug Ledford <[email protected]>
Thu, 28 Apr 2016 20:32:27 +0000 (16:32 -0400)
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 <[email protected]>
Signed-off-by: Dean Luick <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
drivers/staging/rdma/hfi1/hfi.h

index 16cbdc4073e0d16fe245e756410fb11af8609057..ac553f1ed73054e2f32a33bd41d64a4f5af67242 100644 (file)
@@ -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)
This page took 0.056773 seconds and 4 git commands to generate.