aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hfi1/uc.c
diff options
context:
space:
mode:
authorDon Hiatt <don.hiatt@intel.com>2017-05-12 09:19:55 -0700
committerDoug Ledford <dledford@redhat.com>2017-06-27 16:56:33 -0400
commit7dafbab3753fcf59bc81748e5b2c5bf04e1c62c7 (patch)
tree5770099bfb9f0e2e920a934a945a5b5f9ac92ca8 /drivers/infiniband/hw/hfi1/uc.c
parentIB/hfi1: Remove unused mk_qpn function (diff)
downloadlinux-dev-7dafbab3753fcf59bc81748e5b2c5bf04e1c62c7.tar.xz
linux-dev-7dafbab3753fcf59bc81748e5b2c5bf04e1c62c7.zip
IB/hfi1: Add functions to parse BTH/IB headers
Improve code readablity by adding inline functions to read specific BTH/IB fields without knowledge of byte offsets. Reviewed-by: Brian Welty <brian.welty@intel.com> Reviewed-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Don Hiatt <don.hiatt@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/uc.c')
-rw-r--r--drivers/infiniband/hw/hfi1/uc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/uc.c b/drivers/infiniband/hw/hfi1/uc.c
index 5da1e4546543..2a5650f8aee0 100644
--- a/drivers/infiniband/hw/hfi1/uc.c
+++ b/drivers/infiniband/hw/hfi1/uc.c
@@ -319,7 +319,7 @@ void hfi1_uc_rcv(struct hfi1_packet *packet)
process_ecn(qp, packet, true);
- psn = be32_to_cpu(ohdr->bth[2]);
+ psn = ib_bth_get_psn(ohdr);
opcode = ib_bth_get_opcode(ohdr);
/* Compare the PSN verses the expected PSN. */