瀏覽代碼

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>
Dean Luick 9 年之前
父節點
當前提交
de882ff5b8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/staging/rdma/hfi1/hfi.h

+ 1 - 1
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)