Skip to content

Commit

Permalink
IB/hfi1: Remove rcvhdrsize
Browse files Browse the repository at this point in the history
The field is based on a constant that can never change.

Use the define to assign the register instead.

Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Mike Marciniszyn authored and Jason Gunthorpe committed Jun 19, 2018
1 parent 40442b3 commit 32e3d97
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions drivers/infiniband/hw/hfi1/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -15216,8 +15216,6 @@ struct hfi1_devdata *hfi1_init_dd(struct pci_dev *pdev,
*/
aspm_init(dd);

dd->rcvhdrsize = DEFAULT_RCVHDRSIZE;

ret = init_pervl_scs(dd);
if (ret)
goto bail_cleanup;
Expand Down
2 changes: 0 additions & 2 deletions drivers/infiniband/hw/hfi1/hfi.h
Original file line number Diff line number Diff line change
Expand Up @@ -1136,8 +1136,6 @@ struct hfi1_devdata {

/* these are the "32 bit" regs */

/* value we put in kr_rcvhdrsize */
u32 rcvhdrsize;
/* number of receive contexts the chip supports */
u32 chip_rcv_contexts;
/* number of receive array entries */
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/hfi1/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,7 @@ int hfi1_create_rcvhdrq(struct hfi1_devdata *dd, struct hfi1_ctxtdata *rcd)
& RCV_HDR_ENT_SIZE_ENT_SIZE_MASK)
<< RCV_HDR_ENT_SIZE_ENT_SIZE_SHIFT;
write_kctxt_csr(dd, rcd->ctxt, RCV_HDR_ENT_SIZE, reg);
reg = (dd->rcvhdrsize & RCV_HDR_SIZE_HDR_SIZE_MASK)
reg = ((u64)DEFAULT_RCVHDRSIZE & RCV_HDR_SIZE_HDR_SIZE_MASK)
<< RCV_HDR_SIZE_HDR_SIZE_SHIFT;
write_kctxt_csr(dd, rcd->ctxt, RCV_HDR_SIZE, reg);

Expand Down

0 comments on commit 32e3d97

Please sign in to comment.