diff options
author | Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com> | 2016-07-25 23:40:34 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-08-02 23:00:58 +0300 |
commit | b736a469f96a28805296f0e8f0c6aa5206f694d0 (patch) | |
tree | 1d62470d0c5f34820eac7a6130ecc35f9582cd7f /drivers/infiniband/hw/hfi1/driver.c | |
parent | 89c057cae4deaeab94c652c06b855af2bb754f50 (diff) | |
download | linux-b736a469f96a28805296f0e8f0c6aa5206f694d0.tar.xz |
IB/hfi1: Use hdr2sc function to calculate 5-bit SC
The interface is used to compute the 5-bit SC field from the
LRH and the RHF bits. Modify code to use the interface instead.
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@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/driver.c')
-rw-r--r-- | drivers/infiniband/hw/hfi1/driver.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/hfi1/driver.c b/drivers/infiniband/hw/hfi1/driver.c index 4dbadf77f01d..8246dc7d0573 100644 --- a/drivers/infiniband/hw/hfi1/driver.c +++ b/drivers/infiniband/hw/hfi1/driver.c @@ -392,9 +392,7 @@ static void rcv_hdrerr(struct hfi1_ctxtdata *rcd, struct hfi1_pportdata *ppd, u16 rlid; u8 svc_type, sl, sc5; - sc5 = (be16_to_cpu(rhdr->lrh[0]) >> 12) & 0xf; - if (rhf_dc_info(packet->rhf)) - sc5 |= 0x10; + sc5 = hdr2sc(rhdr, packet->rhf); sl = ibp->sc_to_sl[sc5]; lqpn = be32_to_cpu(bth[1]) & RVT_QPN_MASK; |