1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /* Copyright (c) 2017 - 2021 Intel Corporation */
6 #define IRDMA_WQEALLOC_WQE_DESC_INDEX GENMASK(31, 20)
8 #define IRDMA_CQPTAIL_WQTAIL GENMASK(10, 0)
9 #define IRDMA_CQPTAIL_CQP_OP_ERR BIT(31)
11 #define IRDMA_CQPERRCODES_CQP_MINOR_CODE GENMASK(15, 0)
12 #define IRDMA_CQPERRCODES_CQP_MAJOR_CODE GENMASK(31, 16)
13 #define IRDMA_GLPCI_LBARCTRL_PE_DB_SIZE GENMASK(5, 4)
14 #define IRDMA_GLINT_RATE_INTERVAL GENMASK(5, 0)
15 #define IRDMA_GLINT_RATE_INTRL_ENA BIT(6)
16 #define IRDMA_GLINT_DYN_CTL_INTENA BIT(0)
17 #define IRDMA_GLINT_DYN_CTL_CLEARPBA BIT(1)
18 #define IRDMA_GLINT_DYN_CTL_ITR_INDX GENMASK(4, 3)
19 #define IRDMA_GLINT_DYN_CTL_INTERVAL GENMASK(16, 5)
20 #define IRDMA_GLINT_CEQCTL_ITR_INDX GENMASK(12, 11)
21 #define IRDMA_GLINT_CEQCTL_CAUSE_ENA BIT(30)
22 #define IRDMA_GLINT_CEQCTL_MSIX_INDX GENMASK(10, 0)
23 #define IRDMA_PFINT_AEQCTL_MSIX_INDX GENMASK(10, 0)
24 #define IRDMA_PFINT_AEQCTL_ITR_INDX GENMASK(12, 11)
25 #define IRDMA_PFINT_AEQCTL_CAUSE_ENA BIT(30)
26 #define IRDMA_PFHMC_PDINV_PMSDIDX GENMASK(11, 0)
27 #define IRDMA_PFHMC_PDINV_PMSDPARTSEL BIT(15)
28 #define IRDMA_PFHMC_PDINV_PMPDIDX GENMASK(24, 16)
29 #define IRDMA_PFHMC_SDDATALOW_PMSDVALID BIT(0)
30 #define IRDMA_PFHMC_SDDATALOW_PMSDTYPE BIT(1)
31 #define IRDMA_PFHMC_SDDATALOW_PMSDBPCOUNT GENMASK(11, 2)
32 #define IRDMA_PFHMC_SDDATALOW_PMSDDATALOW GENMASK(31, 12)
33 #define IRDMA_PFHMC_SDCMD_PMSDWR BIT(31)
35 #define IRDMA_INVALID_CQ_IDX 0xffffffff
36 enum irdma_registers
{
50 IRDMA_GLPE_CPUSTATUS0
,
51 IRDMA_GLPE_CPUSTATUS1
,
52 IRDMA_GLPE_CPUSTATUS2
,
60 IRDMA_MAX_REGS
, /* Must be last entry */
64 IRDMA_CCQPSTATUS_CCQP_DONE_S
,
65 IRDMA_CCQPSTATUS_CCQP_ERR_S
,
66 IRDMA_CQPSQ_STAG_PDID_S
,
67 IRDMA_CQPSQ_CQ_CEQID_S
,
68 IRDMA_CQPSQ_CQ_CQID_S
,
69 IRDMA_COMMIT_FPM_CQCNT_S
,
74 IRDMA_CCQPSTATUS_CCQP_DONE_M
,
75 IRDMA_CCQPSTATUS_CCQP_ERR_M
,
76 IRDMA_CQPSQ_STAG_PDID_M
,
77 IRDMA_CQPSQ_CQ_CEQID_M
,
78 IRDMA_CQPSQ_CQ_CQID_M
,
79 IRDMA_COMMIT_FPM_CQCNT_M
,
80 IRDMA_MAX_MASKS
, /* Must be last entry */
83 #define IRDMA_MAX_MGS_PER_CTX 8
85 struct irdma_mcast_grp_ctx_entry_info
{
92 struct irdma_mcast_grp_info
{
93 u8 dest_mac_addr
[ETH_ALEN
];
102 struct irdma_dma_mem dma_mem_mc
;
103 struct irdma_mcast_grp_ctx_entry_info mg_ctx_info
[IRDMA_MAX_MGS_PER_CTX
];
112 struct irdma_uk_attrs
{
115 u32 max_hw_read_sges
;
117 u32 max_hw_rq_quanta
;
118 u32 max_hw_wq_quanta
;
126 struct irdma_hw_attrs
{
127 struct irdma_uk_attrs uk_attrs
;
128 u64 max_hw_outbound_msg_size
;
129 u64 max_hw_inbound_msg_size
;
137 u32 max_hw_device_pages
;
138 u32 max_hw_vf_fpm_id
;
139 u32 first_hw_vf_fpm_id
;
144 u32 max_hw_ena_vf_count
;
146 u32 max_pe_ready_count
;
149 u32 max_cqp_compl_wait_time_ms
;
154 void i40iw_init_hw(struct irdma_sc_dev
*dev
);
155 void icrdma_init_hw(struct irdma_sc_dev
*dev
);