Skip to content

Commit dc2b2a9

Browse files
mmarcinijgunthorpe
authored andcommitted
IB/hfi1: Add bypass register defines and replace blind constants
These registers were not added in the 16B work. Add them and replace blind constants with the correct defines. Fixes: 72c07e2 ("IB/hfi1: Add support to receive 16B bypass packets") Reviewed-by: Don Hiatt <[email protected]> Signed-off-by: Mike Marciniszyn <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 5465f11 commit dc2b2a9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

drivers/infiniband/hw/hfi1/chip.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14640,7 +14640,9 @@ static void init_rxe(struct hfi1_devdata *dd)
1464014640

1464114641
/* Have 16 bytes (4DW) of bypass header available in header queue */
1464214642
val = read_csr(dd, RCV_BYPASS);
14643-
val |= (4ull << 16);
14643+
val &= ~RCV_BYPASS_HDR_SIZE_SMASK;
14644+
val |= ((4ull & RCV_BYPASS_HDR_SIZE_MASK) <<
14645+
RCV_BYPASS_HDR_SIZE_SHIFT);
1464414646
write_csr(dd, RCV_BYPASS, val);
1464514647
}
1464614648

drivers/infiniband/hw/hfi1/chip_registers.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,12 @@
638638
#define RCV_BTH_QP_KDETH_QP_MASK 0xFFull
639639
#define RCV_BTH_QP_KDETH_QP_SHIFT 16
640640
#define RCV_BYPASS (RXE + 0x000000000038)
641+
#define RCV_BYPASS_HDR_SIZE_SHIFT 16
642+
#define RCV_BYPASS_HDR_SIZE_MASK 0x1Full
643+
#define RCV_BYPASS_HDR_SIZE_SMASK 0x1F0000ull
644+
#define RCV_BYPASS_BYPASS_CONTEXT_SHIFT 0
645+
#define RCV_BYPASS_BYPASS_CONTEXT_MASK 0xFFull
646+
#define RCV_BYPASS_BYPASS_CONTEXT_SMASK 0xFFull
641647
#define RCV_CONTEXTS (RXE + 0x000000000010)
642648
#define RCV_COUNTER_ARRAY32 (RXE + 0x000000000400)
643649
#define RCV_COUNTER_ARRAY64 (RXE + 0x000000000500)

0 commit comments

Comments
 (0)