sys/dev/qlnx/qlnxe/bcm_osal.h
186
#define DIRECT_REG_WR(p_hwfn, addr, value) qlnx_direct_reg_wr32(p_hwfn, addr, value)
sys/dev/qlnx/qlnxe/bcm_osal.h
187
#define DIRECT_REG_WR64(p_hwfn, addr, value) \
sys/dev/qlnx/qlnxe/bcm_osal.h
188
qlnx_direct_reg_wr64(p_hwfn, addr, value)
sys/dev/qlnx/qlnxe/bcm_osal.h
189
#define DIRECT_REG_WR_DB(p_hwfn, addr, value) qlnx_dbell_wr32_db(p_hwfn, addr, value)
sys/dev/qlnx/qlnxe/bcm_osal.h
190
#define DIRECT_REG_RD(p_hwfn, addr) qlnx_direct_reg_rd32(p_hwfn, addr)
sys/dev/qlnx/qlnxe/bcm_osal.h
195
#define OSAL_SPIN_LOCK_ALLOC(p_hwfn, mutex)
sys/dev/qlnx/qlnxe/bcm_osal.h
208
#define OSAL_MUTEX_ALLOC(p_hwfn, mutex)
sys/dev/qlnx/qlnxe/bcm_osal.h
219
extern void qlnx_schedule_recovery(void *p_hwfn);
sys/dev/qlnx/qlnxe/bcm_osal.h
224
static inline void OSAL_DCBX_AEN(void *p_hwfn, u32 mib_type)
sys/dev/qlnx/qlnxe/bcm_osal.h
229
static inline bool OSAL_NVM_IS_ACCESS_ENABLED(void *p_hwfn)
sys/dev/qlnx/qlnxe/bcm_osal.h
433
#define OSAL_SLOWPATH_IRQ_REQ(p_hwfn) (0)
sys/dev/qlnx/qlnxe/bcm_osal.h
434
#define OSAL_GET_PROTOCOL_STATS(p_hwfn, type, stats) \
sys/dev/qlnx/qlnxe/bcm_osal.h
435
qlnx_get_protocol_stats(p_hwfn, type, stats);
sys/dev/qlnx/qlnxe/bcm_osal.h
441
#define OSAL_GET_RDMA_SB_ID(p_hwfn, cnq_id) ecore_rdma_get_sb_id(p_hwfn, cnq_id)
sys/dev/qlnx/qlnxe/bcm_osal.h
491
#define OSAL_HW_INFO_CHANGE(p_hwfn, offset)
sys/dev/qlnx/qlnxe/bcm_osal.h
492
#define OSAL_MFW_TLV_REQ(p_hwfn)
sys/dev/qlnx/qlnxe/bcm_osal.h
493
#define OSAL_LLDP_RX_TLVS(p_hwfn, buffer, len)
sys/dev/qlnx/qlnxe/bcm_osal.h
494
#define OSAL_MFW_CMD_PREEMPT(p_hwfn)
sys/dev/qlnx/qlnxe/bcm_osal.h
495
#define OSAL_TRANSCEIVER_UPDATE(p_hwfn)
sys/dev/qlnx/qlnxe/bcm_osal.h
496
#define OSAL_MFW_FILL_TLV_DATA(p_hwfn, group, data) (0)
sys/dev/qlnx/qlnxe/bcm_osal.h
498
#define OSAL_VF_UPDATE_ACQUIRE_RESC_RESP(p_hwfn, res) (0)
sys/dev/qlnx/qlnxe/bcm_osal.h
500
#define OSAL_VF_FILL_ACQUIRE_RESC_REQ(p_hwfn, req, vf_sw_info) \
sys/dev/qlnx/qlnxe/bcm_osal.h
501
qlnx_osal_vf_fill_acquire_resc_req(p_hwfn, req, vf_sw_info)
sys/dev/qlnx/qlnxe/bcm_osal.h
503
#define OSAL_IOV_PF_RESP_TYPE(p_hwfn, relative_vf_id, status)
sys/dev/qlnx/qlnxe/bcm_osal.h
504
#define OSAL_IOV_VF_CLEANUP(p_hwfn, relative_vf_id) \
sys/dev/qlnx/qlnxe/bcm_osal.h
505
qlnx_osal_iov_vf_cleanup(p_hwfn, relative_vf_id)
sys/dev/qlnx/qlnxe/bcm_osal.h
507
#define OSAL_IOV_VF_ACQUIRE(p_hwfn, relative_vf_id) ECORE_SUCCESS
sys/dev/qlnx/qlnxe/bcm_osal.h
509
#define OSAL_IOV_PRE_START_VPORT(p_hwfn, relative_vf_id, params) ECORE_SUCCESS
sys/dev/qlnx/qlnxe/bcm_osal.h
510
#define OSAL_IOV_POST_START_VPORT(p_hwfn, relative_vf_id, vport_id, opaque_fid)
sys/dev/qlnx/qlnxe/bcm_osal.h
511
#define OSAL_PF_VALIDATE_MODIFY_TUNN_CONFIG(p_hwfn, x, y, z) ECORE_SUCCESS
sys/dev/qlnx/qlnxe/bcm_osal.h
512
#define OSAL_IOV_CHK_UCAST(p_hwfn, vfid, params) \
sys/dev/qlnx/qlnxe/bcm_osal.h
513
qlnx_iov_chk_ucast(p_hwfn, vfid, params);
sys/dev/qlnx/qlnxe/bcm_osal.h
514
#define OSAL_PF_VF_MALICIOUS(p_hwfn, relative_vf_id)
sys/dev/qlnx/qlnxe/bcm_osal.h
515
#define OSAL_IOV_VF_MSG_TYPE(p_hwfn, relative_vf_id, type)
sys/dev/qlnx/qlnxe/bcm_osal.h
516
#define OSAL_IOV_VF_VPORT_UPDATE(p_hwfn, vfid, params, tlvs) \
sys/dev/qlnx/qlnxe/bcm_osal.h
517
qlnx_iov_update_vport(p_hwfn, vfid, params, tlvs)
sys/dev/qlnx/qlnxe/bcm_osal.h
518
#define OSAL_PF_VF_MSG(p_hwfn, relative_vf_id) \
sys/dev/qlnx/qlnxe/bcm_osal.h
519
qlnx_pf_vf_msg(p_hwfn, relative_vf_id)
sys/dev/qlnx/qlnxe/bcm_osal.h
521
#define OSAL_VF_FLR_UPDATE(p_hwfn) qlnx_vf_flr_update(p_hwfn)
sys/dev/qlnx/qlnxe/bcm_osal.h
522
#define OSAL_IOV_VF_VPORT_STOP(p_hwfn, vf)
sys/dev/qlnx/qlnxe/bcm_osal.h
58
extern uint32_t qlnx_direct_reg_rd32(void *p_hwfn, uint32_t *reg_addr);
sys/dev/qlnx/qlnxe/bcm_osal.h
59
extern void qlnx_direct_reg_wr32(void *p_hwfn, void *reg_addr, uint32_t value);
sys/dev/qlnx/qlnxe/bcm_osal.h
60
extern void qlnx_direct_reg_wr64(void *p_hwfn, void *reg_addr, uint64_t value);
sys/dev/qlnx/qlnxe/bcm_osal.h
62
extern uint32_t qlnx_reg_rd32(void *p_hwfn, uint32_t reg_addr);
sys/dev/qlnx/qlnxe/bcm_osal.h
63
extern void qlnx_reg_wr32(void *p_hwfn, uint32_t reg_addr, uint32_t value);
sys/dev/qlnx/qlnxe/bcm_osal.h
64
extern void qlnx_reg_wr16(void *p_hwfn, uint32_t reg_addr, uint16_t value);
sys/dev/qlnx/qlnxe/bcm_osal.h
66
extern void qlnx_dbell_wr32(void *p_hwfn, uint32_t reg_addr, uint32_t value);
sys/dev/qlnx/qlnxe/bcm_osal.h
67
extern void qlnx_dbell_wr32_db(void *p_hwfn, void *reg_addr, uint32_t value);
sys/dev/qlnx/qlnxe/bcm_osal.h
74
extern void qlnx_link_update(void *p_hwfn);
sys/dev/qlnx/qlnxe/bcm_osal.h
84
extern void qlnx_osal_vf_fill_acquire_resc_req(void *p_hwfn, void *p_resc_req,
sys/dev/qlnx/qlnxe/bcm_osal.h
86
extern void qlnx_osal_iov_vf_cleanup(void *p_hwfn, uint8_t relative_vf_id);
sys/dev/qlnx/qlnxe/bcm_osal.h
87
extern int qlnx_iov_chk_ucast(void *p_hwfn, int vfid, void *params);
sys/dev/qlnx/qlnxe/bcm_osal.h
88
extern int qlnx_iov_update_vport(void *p_hwfn, uint8_t vfid, void *params,
sys/dev/qlnx/qlnxe/bcm_osal.h
90
extern int qlnx_pf_vf_msg(void *p_hwfn, uint16_t relative_vf_id);
sys/dev/qlnx/qlnxe/bcm_osal.h
91
extern void qlnx_vf_flr_update(void *p_hwfn);
sys/dev/qlnx/qlnxe/ecore.h
1014
void ecore_clean_wfq_db(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt);
sys/dev/qlnx/qlnxe/ecore.h
1031
u16 ecore_get_cm_pq_idx(struct ecore_hwfn *p_hwfn, u32 pq_flags);
sys/dev/qlnx/qlnxe/ecore.h
1032
u16 ecore_get_cm_pq_idx_mcos(struct ecore_hwfn *p_hwfn, u8 tc);
sys/dev/qlnx/qlnxe/ecore.h
1033
u16 ecore_get_cm_pq_idx_vf(struct ecore_hwfn *p_hwfn, u16 vf);
sys/dev/qlnx/qlnxe/ecore.h
1034
u16 ecore_get_cm_pq_idx_rl(struct ecore_hwfn *p_hwfn, u8 qpid);
sys/dev/qlnx/qlnxe/ecore.h
1039
void ecore_db_recovery_dp(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore.h
1040
void ecore_db_recovery_execute(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore.h
1044
u8 ecore_init_qm_get_num_tcs(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore.h
1045
u16 ecore_init_qm_get_num_vfs(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore.h
1046
u16 ecore_init_qm_get_num_pf_rls(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore.h
1047
u16 ecore_init_qm_get_num_vports(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore.h
1048
u16 ecore_init_qm_get_num_pqs(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore.h
1067
enum _ecore_status_t ecore_all_ppfids_wr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore.h
145
#define ALIGNED_TYPE_SIZE(type_name, p_hwfn) \
sys/dev/qlnx/qlnxe/ecore.h
146
((sizeof(type_name) + (u32)(1<<(p_hwfn->p_dev->cache_shift))-1) & \
sys/dev/qlnx/qlnxe/ecore.h
147
~((1<<(p_hwfn->p_dev->cache_shift))-1))
sys/dev/qlnx/qlnxe/ecore.h
902
#define IRO (p_hwfn->p_dev->iro_arr)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1005
*p_virt = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1053
ecore_cxt_src_t2_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1076
static void ecore_ilt_shadow_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1078
struct ecore_ilt_client_cfg *p_cli = p_hwfn->p_cxt_mngr->clients;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1079
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1091
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1097
OSAL_FREE(p_hwfn->p_dev, p_mngr->ilt_shadow);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1101
static enum _ecore_status_t ecore_ilt_blk_alloc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1106
struct ecore_dma_mem *ilt_shadow = p_hwfn->p_cxt_mngr->ilt_shadow;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1110
if (ECORE_IS_RDMA_PERSONALITY(p_hwfn) &&
sys/dev/qlnx/qlnxe/ecore_cxt.c
112
#define CONN_CXT_SIZE(p_hwfn) \
sys/dev/qlnx/qlnxe/ecore_cxt.c
1123
p_hwfn->p_cxt_mngr->pf_start_line + lines_to_skip;
sys/dev/qlnx/qlnxe/ecore_cxt.c
113
ALIGNED_TYPE_SIZE(union conn_context, p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1131
p_virt = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1141
DP_VERBOSE(p_hwfn, ECORE_MSG_ILT,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1152
static enum _ecore_status_t ecore_ilt_shadow_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1154
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1161
p_mngr->ilt_shadow = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1165
DP_NOTICE(p_hwfn, false, "Failed to allocate ilt shadow table\n");
sys/dev/qlnx/qlnxe/ecore_cxt.c
1170
DP_VERBOSE(p_hwfn, ECORE_MSG_ILT,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1177
rc = ecore_ilt_blk_alloc(p_hwfn, p_blk, i, 0);
sys/dev/qlnx/qlnxe/ecore_cxt.c
118
#define TYPE0_TASK_CXT_SIZE(p_hwfn) \
sys/dev/qlnx/qlnxe/ecore_cxt.c
1186
rc = ecore_ilt_blk_alloc(p_hwfn, p_blk,
sys/dev/qlnx/qlnxe/ecore_cxt.c
119
ALIGNED_TYPE_SIZE(union type0_task_context, p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1197
ecore_ilt_shadow_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1201
static void ecore_cid_map_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1203
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1207
OSAL_FREE(p_hwfn->p_dev, p_mngr->acquired[type].cid_map);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1213
OSAL_FREE(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_cxt.c
122
#define TYPE1_TASK_CXT_SIZE(p_hwfn) sizeof(union type1_task_context)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1223
ecore_cid_map_alloc_single(struct ecore_hwfn *p_hwfn, u32 type,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1233
p_map->cid_map = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, size);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1240
DP_VERBOSE(p_hwfn, ECORE_MSG_CXT,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1247
static enum _ecore_status_t ecore_cid_map_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1249
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1259
if (ecore_cid_map_alloc_single(p_hwfn, type, start_cid,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1266
if (ecore_cid_map_alloc_single(p_hwfn, type,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1280
ecore_cid_map_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1284
enum _ecore_status_t ecore_cxt_mngr_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1290
p_mngr = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*p_mngr));
sys/dev/qlnx/qlnxe/ecore_cxt.c
1292
DP_NOTICE(p_hwfn, false, "Failed to allocate `struct ecore_cxt_mngr'\n");
sys/dev/qlnx/qlnxe/ecore_cxt.c
1324
p_mngr->clients[i].p_size.val = p_hwfn->p_dev->ilt_page_size;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1327
p_mngr->task_type_size[0] = TYPE0_TASK_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1328
p_mngr->task_type_size[1] = TYPE1_TASK_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1330
if (p_hwfn->p_dev->p_iov_info)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1331
p_mngr->vf_count = p_hwfn->p_dev->p_iov_info->total_vfs;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1335
OSAL_MUTEX_ALLOC(p_hwfn, &p_mngr->mutex);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1340
p_hwfn->p_cxt_mngr = p_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1345
enum _ecore_status_t ecore_cxt_tables_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1350
rc = ecore_ilt_shadow_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1352
DP_NOTICE(p_hwfn, false, "Failed to allocate ilt memory\n");
sys/dev/qlnx/qlnxe/ecore_cxt.c
1357
rc = ecore_cxt_src_t2_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1359
DP_NOTICE(p_hwfn, false, "Failed to allocate T2 memory\n");
sys/dev/qlnx/qlnxe/ecore_cxt.c
1364
rc = ecore_cid_map_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1366
DP_NOTICE(p_hwfn, false, "Failed to allocate cid maps\n");
sys/dev/qlnx/qlnxe/ecore_cxt.c
1373
ecore_cxt_mngr_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1376
void ecore_cxt_mngr_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1378
if (!p_hwfn->p_cxt_mngr)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1381
ecore_cid_map_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1382
ecore_cxt_src_t2_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1383
ecore_ilt_shadow_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1385
OSAL_MUTEX_DEALLOC(&p_hwfn->p_cxt_mngr->mutex);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1387
OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_cxt_mngr);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1389
p_hwfn->p_cxt_mngr = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1392
void ecore_cxt_mngr_setup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1394
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1489
static void ecore_cdu_init_common(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1494
page_sz = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC].p_size.val;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1495
cxt_size = CONN_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1502
STORE_RT_REG(p_hwfn, CDU_REG_CID_ADDR_PARAMS_RT_OFFSET, cdu_params);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1505
page_sz = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT].p_size.val;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1506
cxt_size = p_hwfn->p_cxt_mngr->task_type_size[0];
sys/dev/qlnx/qlnxe/ecore_cxt.c
1515
STORE_RT_REG(p_hwfn, CDU_REG_SEGMENT0_PARAMS_RT_OFFSET, cdu_params);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1518
cxt_size = p_hwfn->p_cxt_mngr->task_type_size[1];
sys/dev/qlnx/qlnxe/ecore_cxt.c
1527
STORE_RT_REG(p_hwfn, CDU_REG_SEGMENT1_PARAMS_RT_OFFSET, cdu_params);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1536
static void ecore_cdu_init_pf(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1557
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT];
sys/dev/qlnx/qlnxe/ecore_cxt.c
1562
p_seg = ecore_cxt_tid_seg_info(p_hwfn, i);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1578
STORE_RT_REG(p_hwfn, rt_type_offset_arr[i],
sys/dev/qlnx/qlnxe/ecore_cxt.c
1588
STORE_RT_REG(p_hwfn, rt_type_offset_fl_arr[i],
sys/dev/qlnx/qlnxe/ecore_cxt.c
1593
void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1596
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1601
ecore_cxt_qm_iids(p_hwfn, &iids);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1603
p_link = &ECORE_LEADING_HWFN(p_hwfn->p_dev)->mcp_info->link_output;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1605
ecore_qm_pf_rt_init(p_hwfn, p_ptt, p_hwfn->port_id,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1606
p_hwfn->rel_pf_id, qm_info->max_phys_tcs_per_port,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1615
p_hwfn->qm_info.qm_pq_params,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1616
p_hwfn->qm_info.qm_vport_params);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1620
static void ecore_cm_init_pf(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1622
STORE_RT_REG(p_hwfn, XCM_REG_CON_PHY_Q3_RT_OFFSET, ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_LB));
sys/dev/qlnx/qlnxe/ecore_cxt.c
1626
static void ecore_dq_init_pf(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1628
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1632
STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_0_RT_OFFSET, dq_pf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1635
STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_0_RT_OFFSET, dq_vf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1638
STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_1_RT_OFFSET, dq_pf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1641
STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_1_RT_OFFSET, dq_vf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1644
STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_2_RT_OFFSET, dq_pf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1647
STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_2_RT_OFFSET, dq_vf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1650
STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_3_RT_OFFSET, dq_pf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1653
STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_3_RT_OFFSET, dq_vf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1656
STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_4_RT_OFFSET, dq_pf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1659
STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_4_RT_OFFSET, dq_vf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1662
STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_5_RT_OFFSET, dq_pf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1665
STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_5_RT_OFFSET, dq_vf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1673
STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_6_RT_OFFSET, dq_pf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1674
STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_6_RT_OFFSET, dq_vf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1676
STORE_RT_REG(p_hwfn, DORQ_REG_PF_MAX_ICID_7_RT_OFFSET, dq_pf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1677
STORE_RT_REG(p_hwfn, DORQ_REG_VF_MAX_ICID_7_RT_OFFSET, dq_vf_max_cid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1680
static void ecore_ilt_bounds_init(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1685
ilt_clients = p_hwfn->p_cxt_mngr->clients;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1687
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1690
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1693
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1699
static void ecore_ilt_vf_bounds_init(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1705
if (p_hwfn->p_dev->p_iov_info) {
sys/dev/qlnx/qlnxe/ecore_cxt.c
1706
struct ecore_hw_sriov_info *p_iov = p_hwfn->p_dev->p_iov_info;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1708
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1711
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1716
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC];
sys/dev/qlnx/qlnxe/ecore_cxt.c
1719
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1722
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1725
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1730
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT];
sys/dev/qlnx/qlnxe/ecore_cxt.c
1733
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1736
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1739
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1744
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TM];
sys/dev/qlnx/qlnxe/ecore_cxt.c
1747
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1750
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1753
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1760
static void ecore_ilt_init_pf(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1767
ecore_ilt_bounds_init(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1768
ecore_ilt_vf_bounds_init(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1770
p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1772
clients = p_hwfn->p_cxt_mngr->clients;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1795
p_hwfn, ECORE_MSG_ILT,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1801
STORE_RT_REG_AGG(p_hwfn, rt_offst, ilt_hw_entry);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1807
static void ecore_src_init_pf(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1809
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1822
STORE_RT_REG(p_hwfn, SRC_REG_COUNTFREE_RT_OFFSET, conn_num);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1823
STORE_RT_REG(p_hwfn, SRC_REG_NUMBER_HASH_BITS_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1826
STORE_RT_REG_AGG(p_hwfn, SRC_REG_FIRSTFREE_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1827
p_hwfn->p_cxt_mngr->first_free);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1828
STORE_RT_REG_AGG(p_hwfn, SRC_REG_LASTFREE_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1829
p_hwfn->p_cxt_mngr->last_free);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1830
DP_VERBOSE(p_hwfn, ECORE_MSG_ILT,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1851
static void ecore_tm_init_pf(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1853
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1869
SET_FIELD(cfg_word, TM_CFG_PARENT_PF, p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1874
(p_hwfn->p_dev->p_iov_info->first_vf_in_pf + i);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1875
STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1886
(NUM_OF_VFS(p_hwfn->p_dev) + p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1887
STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1890
STORE_RT_REG(p_hwfn, TM_REG_PF_ENABLE_CONN_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1902
SET_FIELD(cfg_word, TM_CFG_PARENT_PF, p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1908
(p_hwfn->p_dev->p_iov_info->first_vf_in_pf + i);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1910
STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1924
(NUM_OF_VFS(p_hwfn->p_dev) +
sys/dev/qlnx/qlnxe/ecore_cxt.c
1925
p_hwfn->rel_pf_id * NUM_TASK_PF_SEGMENTS + i);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1927
STORE_RT_REG_AGG(p_hwfn, rt_reg, cfg_word);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1933
if (ECORE_IS_RDMA_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_cxt.c
1936
STORE_RT_REG(p_hwfn, TM_REG_PF_ENABLE_TASK_RT_OFFSET, active_seg_mask);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1941
static void ecore_prs_init_common(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1943
if ((p_hwfn->hw_info.personality == ECORE_PCI_FCOE) &&
sys/dev/qlnx/qlnxe/ecore_cxt.c
1944
p_hwfn->pf_params.fcoe_pf_params.is_target)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1945
STORE_RT_REG(p_hwfn, PRS_REG_SEARCH_RESP_INITIATOR_TYPE_RT_OFFSET, 0);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1948
static void ecore_prs_init_pf(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1950
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
1961
if (p_hwfn->pf_params.fcoe_pf_params.is_target) {
sys/dev/qlnx/qlnxe/ecore_cxt.c
1962
STORE_RT_REG_AGG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1966
STORE_RT_REG_AGG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1972
void ecore_cxt_hw_init_common(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1975
ecore_cdu_init_common(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1976
ecore_prs_init_common(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1979
void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_cxt.c
1981
ecore_qm_init_pf(p_hwfn, p_ptt, true);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1982
ecore_cm_init_pf(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1983
ecore_dq_init_pf(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1984
ecore_cdu_init_pf(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1985
ecore_ilt_init_pf(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1986
ecore_src_init_pf(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1987
ecore_tm_init_pf(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1988
ecore_prs_init_pf(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
1991
enum _ecore_status_t _ecore_cxt_acquire_cid(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
1995
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2000
DP_NOTICE(p_hwfn, true, "Invalid protocol type %d", type);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2005
DP_NOTICE(p_hwfn, true, "VF [%02x] is out of range\n", vfid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2016
DP_NOTICE(p_hwfn, true, "Invalid protocol type %d", type);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2024
DP_NOTICE(p_hwfn, false, "no CID available for protocol %d\n",
sys/dev/qlnx/qlnxe/ecore_cxt.c
2033
DP_VERBOSE(p_hwfn, ECORE_MSG_CXT,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2040
enum _ecore_status_t ecore_cxt_acquire_cid(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2044
return _ecore_cxt_acquire_cid(p_hwfn, type, p_cid, ECORE_CXT_PF_CID);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2047
static bool ecore_cxt_test_cid_acquired(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2052
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2071
DP_NOTICE(p_hwfn, true, "Invalid CID %d vfid %02x", cid, vfid);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2077
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2089
void _ecore_cxt_release_cid(struct ecore_hwfn *p_hwfn, u32 cid, u8 vfid)
sys/dev/qlnx/qlnxe/ecore_cxt.c
2097
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2104
b_acquired = ecore_cxt_test_cid_acquired(p_hwfn, cid, vfid,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2113
DP_VERBOSE(p_hwfn, ECORE_MSG_CXT,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2118
void ecore_cxt_release_cid(struct ecore_hwfn *p_hwfn, u32 cid)
sys/dev/qlnx/qlnxe/ecore_cxt.c
2120
_ecore_cxt_release_cid(p_hwfn, cid, ECORE_CXT_PF_CID);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2123
enum _ecore_status_t ecore_cxt_get_cid_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2126
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2133
b_acquired = ecore_cxt_test_cid_acquired(p_hwfn, p_info->iid,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2144
hw_p_size = p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC].p_size.val;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2146
conn_cxt_size = CONN_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2157
DP_VERBOSE(p_hwfn, (ECORE_MSG_ILT | ECORE_MSG_CXT),
sys/dev/qlnx/qlnxe/ecore_cxt.c
2164
static void ecore_rdma_set_pf_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2176
if (p_hwfn->mcp_info->func_info.protocol ==
sys/dev/qlnx/qlnxe/ecore_cxt.c
2178
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2180
p_hwfn->hw_info.personality = ECORE_PCI_ETH_ROCE;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2184
p_hwfn->hw_info.personality = ECORE_PCI_ETH;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2187
if (p_hwfn->mcp_info->func_info.protocol == ECORE_PCI_ETH_RDMA)
sys/dev/qlnx/qlnxe/ecore_cxt.c
2188
p_hwfn->hw_info.personality = ECORE_PCI_ETH_ROCE;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2191
if (p_hwfn->mcp_info->func_info.protocol == ECORE_PCI_ETH_RDMA)
sys/dev/qlnx/qlnxe/ecore_cxt.c
2192
p_hwfn->hw_info.personality = ECORE_PCI_ETH_IWARP;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2196
switch (p_hwfn->hw_info.personality) {
sys/dev/qlnx/qlnxe/ecore_cxt.c
2218
ecore_cxt_set_proto_cid_count(p_hwfn, proto,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2224
ecore_cxt_set_proto_tid_count(p_hwfn, PROTOCOLID_ROCE,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2234
page_size = ecore_cxt_get_ilt_page_size(p_hwfn, ILT_CLI_TSDM);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2240
ecore_cxt_set_srq_count(p_hwfn, num_srqs, num_xrc_srqs);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2243
DP_INFO(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2248
enum _ecore_status_t ecore_cxt_set_pf_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2254
if (p_hwfn->using_ll2)
sys/dev/qlnx/qlnxe/ecore_cxt.c
2257
ecore_cxt_set_proto_cid_count(p_hwfn, PROTOCOLID_CORE, core_cids, 0);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2259
switch (p_hwfn->hw_info.personality) {
sys/dev/qlnx/qlnxe/ecore_cxt.c
2264
ecore_rdma_set_pf_params(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2265
&p_hwfn->pf_params.rdma_pf_params,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2275
&p_hwfn->pf_params.eth_pf_params;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2279
ecore_cxt_set_proto_cid_count(p_hwfn, PROTOCOLID_ETH,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2286
&p_hwfn->p_dev->mf_bits))
sys/dev/qlnx/qlnxe/ecore_cxt.c
2287
p_hwfn->p_cxt_mngr->arfs_count = count;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2295
p_params = &p_hwfn->pf_params.fcoe_pf_params;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2298
ecore_cxt_set_proto_cid_count(p_hwfn, PROTOCOLID_FCOE,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2301
ecore_cxt_set_proto_tid_count(p_hwfn, PROTOCOLID_FCOE,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2307
DP_INFO(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2316
p_params = &p_hwfn->pf_params.iscsi_pf_params;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2319
ecore_cxt_set_proto_cid_count(p_hwfn, PROTOCOLID_ISCSI,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2322
ecore_cxt_set_proto_tid_count(p_hwfn, PROTOCOLID_ISCSI,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2328
DP_INFO(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2340
enum _ecore_status_t ecore_cxt_get_tid_mem_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2343
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2350
switch (p_hwfn->hw_info.personality) {
sys/dev/qlnx/qlnxe/ecore_cxt.c
2378
p_hwfn->p_cxt_mngr->pf_start_line;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2394
ecore_cxt_dynamic_ilt_alloc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2409
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC];
sys/dev/qlnx/qlnxe/ecore_cxt.c
2410
elem_size = CONN_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2415
iid += ecore_cxt_srqs_per_page(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2416
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM];
sys/dev/qlnx/qlnxe/ecore_cxt.c
2421
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM];
sys/dev/qlnx/qlnxe/ecore_cxt.c
2426
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT];
sys/dev/qlnx/qlnxe/ecore_cxt.c
2427
elem_size = TYPE1_TASK_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2431
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2440
shadow_line = line - p_hwfn->p_cxt_mngr->pf_start_line;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2450
OSAL_MUTEX_ACQUIRE(&p_hwfn->p_cxt_mngr->mutex);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2452
if (p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_virt)
sys/dev/qlnx/qlnxe/ecore_cxt.c
2455
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2457
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2463
p_virt = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2487
elem_start += TYPE1_TASK_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2491
p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_virt = p_virt;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2492
p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_phys = p_phys;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2493
p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].size =
sys/dev/qlnx/qlnxe/ecore_cxt.c
2504
(p_hwfn->p_cxt_mngr->ilt_shadow[shadow_line].p_phys >> 12));
sys/dev/qlnx/qlnxe/ecore_cxt.c
2507
ecore_dmae_host2grc(p_hwfn, p_ptt, (u64)(osal_uintptr_t)&ilt_hw_entry,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2516
ecore_wr(p_hwfn, p_ptt, PRS_REG_ROCE_DEST_QP_MAX_PF,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2527
if (!p_hwfn->b_rdma_enabled_in_prs) {
sys/dev/qlnx/qlnxe/ecore_cxt.c
2529
ecore_wr(p_hwfn, p_ptt, p_hwfn->rdma_prs_search_reg, 1);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2530
p_hwfn->b_rdma_enabled_in_prs = true;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2535
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2537
OSAL_MUTEX_RELEASE(&p_hwfn->p_cxt_mngr->mutex);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2546
ecore_cxt_free_ilt_range(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2561
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC];
sys/dev/qlnx/qlnxe/ecore_cxt.c
2562
elem_size = CONN_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2566
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_TSDM];
sys/dev/qlnx/qlnxe/ecore_cxt.c
2571
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUT];
sys/dev/qlnx/qlnxe/ecore_cxt.c
2572
elem_size = TYPE1_TASK_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2576
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2589
shadow_start_line = start_line - p_hwfn->p_cxt_mngr->pf_start_line;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2590
shadow_end_line = end_line - p_hwfn->p_cxt_mngr->pf_start_line;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2592
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2594
DP_NOTICE(p_hwfn, false, "ECORE_TIME_OUT on ptt acquire - dynamic allocation");
sys/dev/qlnx/qlnxe/ecore_cxt.c
2599
if (!p_hwfn->p_cxt_mngr->ilt_shadow[i].p_virt)
sys/dev/qlnx/qlnxe/ecore_cxt.c
2602
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2603
p_hwfn->p_cxt_mngr->ilt_shadow[i].p_virt,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2604
p_hwfn->p_cxt_mngr->ilt_shadow[i].p_phys,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2605
p_hwfn->p_cxt_mngr->ilt_shadow[i].size);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2607
p_hwfn->p_cxt_mngr->ilt_shadow[i].p_virt = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2608
p_hwfn->p_cxt_mngr->ilt_shadow[i].p_phys = 0;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2609
p_hwfn->p_cxt_mngr->ilt_shadow[i].size = 0;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2619
ecore_dmae_host2grc(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2626
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_cxt.c
2631
enum _ecore_status_t ecore_cxt_get_task_ctx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
2636
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
2646
switch (p_hwfn->hw_info.personality) {
sys/dev/qlnx/qlnxe/ecore_cxt.c
381
static void ecore_cxt_qm_iids(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
384
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
410
DP_VERBOSE(p_hwfn, ECORE_MSG_ILT,
sys/dev/qlnx/qlnxe/ecore_cxt.c
415
static struct ecore_tid_seg *ecore_cxt_tid_seg_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
418
struct ecore_cxt_mngr *p_cfg = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
431
static void ecore_cxt_set_srq_count(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
434
struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
440
u32 ecore_cxt_get_srq_count(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
442
return p_hwfn->p_cxt_mngr->srq_count;
sys/dev/qlnx/qlnxe/ecore_cxt.c
445
u32 ecore_cxt_get_xrc_srq_count(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
447
return p_hwfn->p_cxt_mngr->xrc_srq_count;
sys/dev/qlnx/qlnxe/ecore_cxt.c
450
u32 ecore_cxt_get_ilt_page_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
453
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
459
static u32 ecore_cxt_srqs_per_page(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
463
page_size = ecore_cxt_get_ilt_page_size(p_hwfn, ILT_CLI_TSDM);
sys/dev/qlnx/qlnxe/ecore_cxt.c
467
u32 ecore_cxt_get_total_srq_count(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
469
struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
480
total_srqs += ecore_cxt_srqs_per_page(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
486
static void ecore_cxt_set_proto_cid_count(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
490
struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
498
u32 cxt_size = CONN_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
506
u32 ecore_cxt_get_proto_cid_count(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
511
*vf_cid = p_hwfn->p_cxt_mngr->conn_cfg[type].cids_per_vf;
sys/dev/qlnx/qlnxe/ecore_cxt.c
513
return p_hwfn->p_cxt_mngr->conn_cfg[type].cid_count;
sys/dev/qlnx/qlnxe/ecore_cxt.c
516
u32 ecore_cxt_get_proto_cid_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
519
return p_hwfn->p_cxt_mngr->acquired[type].start_cid;
sys/dev/qlnx/qlnxe/ecore_cxt.c
522
u32 ecore_cxt_get_proto_tid_count(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
529
cnt += p_hwfn->p_cxt_mngr->conn_cfg[type].tid_seg[i].count;
sys/dev/qlnx/qlnxe/ecore_cxt.c
534
static void ecore_cxt_set_proto_tid_count(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
541
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
571
static void ecore_ilt_cli_adv_line(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
587
DP_VERBOSE(p_hwfn, ECORE_MSG_ILT,
sys/dev/qlnx/qlnxe/ecore_cxt.c
594
static u32 ecore_ilt_get_dynamic_line_cnt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
597
u32 cid_count = p_hwfn->p_cxt_mngr->conn_cfg[PROTOCOLID_ROCE].cid_count;
sys/dev/qlnx/qlnxe/ecore_cxt.c
605
p_cli = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_CDUC];
sys/dev/qlnx/qlnxe/ecore_cxt.c
608
(u32)CONN_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
632
enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
635
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
650
p_mngr->pf_start_line = RESC_START(p_hwfn, ECORE_ILT);
sys/dev/qlnx/qlnxe/ecore_cxt.c
652
DP_VERBOSE(p_hwfn, ECORE_MSG_ILT,
sys/dev/qlnx/qlnxe/ecore_cxt.c
654
p_hwfn->my_id, p_hwfn->p_cxt_mngr->pf_start_line);
sys/dev/qlnx/qlnxe/ecore_cxt.c
669
total = cdu_iids.pf_cids * CONN_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
672
total, CONN_CXT_SIZE(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_cxt.c
674
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, ILT_CLI_CDUC);
sys/dev/qlnx/qlnxe/ecore_cxt.c
677
p_blk->dynamic_line_cnt = ecore_ilt_get_dynamic_line_cnt(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.c
682
total = cdu_iids.per_vf_cids * CONN_CXT_SIZE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
685
total, CONN_CXT_SIZE(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_cxt.c
687
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, ILT_CLI_CDUC);
sys/dev/qlnx/qlnxe/ecore_cxt.c
691
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
700
p_seg = ecore_cxt_tid_seg_info(p_hwfn, i);
sys/dev/qlnx/qlnxe/ecore_cxt.c
709
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
715
p_seg = ecore_cxt_tid_seg_info(p_hwfn, i);
sys/dev/qlnx/qlnxe/ecore_cxt.c
750
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
756
p_seg = ecore_cxt_tid_seg_info(p_hwfn, TASK_SEGMENT_VF);
sys/dev/qlnx/qlnxe/ecore_cxt.c
770
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
785
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
795
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
800
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
809
ecore_cxt_qm_iids(p_hwfn, &qm_iids);
sys/dev/qlnx/qlnxe/ecore_cxt.c
812
p_hwfn->qm_info.num_pqs,
sys/dev/qlnx/qlnxe/ecore_cxt.c
813
p_hwfn->qm_info.num_vf_pqs);
sys/dev/qlnx/qlnxe/ecore_cxt.c
815
DP_VERBOSE(p_hwfn, ECORE_MSG_ILT,
sys/dev/qlnx/qlnxe/ecore_cxt.c
818
p_hwfn->qm_info.num_pqs, p_hwfn->qm_info.num_vf_pqs, total);
sys/dev/qlnx/qlnxe/ecore_cxt.c
823
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line, ILT_CLI_QM);
sys/dev/qlnx/qlnxe/ecore_cxt.c
846
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
861
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
874
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
879
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
885
total = ecore_cxt_get_total_srq_count(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.c
892
ecore_ilt_cli_adv_line(p_hwfn, p_cli, p_blk, &curr_line,
sys/dev/qlnx/qlnxe/ecore_cxt.c
897
*line_count = curr_line - p_hwfn->p_cxt_mngr->pf_start_line;
sys/dev/qlnx/qlnxe/ecore_cxt.c
899
if (curr_line - p_hwfn->p_cxt_mngr->pf_start_line >
sys/dev/qlnx/qlnxe/ecore_cxt.c
900
RESC_NUM(p_hwfn, ECORE_ILT)) {
sys/dev/qlnx/qlnxe/ecore_cxt.c
907
u32 ecore_cxt_cfg_ilt_compute_excess(struct ecore_hwfn *p_hwfn, u32 used_lines)
sys/dev/qlnx/qlnxe/ecore_cxt.c
916
available_lines = RESC_NUM(p_hwfn, ECORE_ILT);
sys/dev/qlnx/qlnxe/ecore_cxt.c
922
if (!ECORE_IS_RDMA_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_cxt.c
925
p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
930
p_seg = ecore_cxt_tid_seg_info(p_hwfn, i);
sys/dev/qlnx/qlnxe/ecore_cxt.c
941
DP_ERR(p_hwfn, "failed computing excess ILT lines\n");
sys/dev/qlnx/qlnxe/ecore_cxt.c
945
static void ecore_cxt_src_t2_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
947
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
955
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_cxt.c
960
OSAL_FREE(p_hwfn->p_dev, p_mngr->t2);
sys/dev/qlnx/qlnxe/ecore_cxt.c
964
static enum _ecore_status_t ecore_cxt_src_t2_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_cxt.c
966
struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr;
sys/dev/qlnx/qlnxe/ecore_cxt.c
978
p_src = &p_hwfn->p_cxt_mngr->clients[ILT_CLI_SRC];
sys/dev/qlnx/qlnxe/ecore_cxt.c
991
p_mngr->t2 = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_cxt.c
995
DP_NOTICE(p_hwfn, false, "Failed to allocate t2 table\n");
sys/dev/qlnx/qlnxe/ecore_cxt.h
108
enum _ecore_status_t ecore_cxt_mngr_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.h
115
void ecore_cxt_mngr_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.h
124
enum _ecore_status_t ecore_cxt_tables_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.h
131
void ecore_cxt_mngr_setup(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.h
138
void ecore_cxt_hw_init_common(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.h
146
void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt);
sys/dev/qlnx/qlnxe/ecore_cxt.h
155
void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_cxt.h
166
enum _ecore_status_t ecore_qm_reconf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
177
void ecore_cxt_release_cid(struct ecore_hwfn *p_hwfn, u32 cid);
sys/dev/qlnx/qlnxe/ecore_cxt.h
186
void _ecore_cxt_release_cid(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
198
enum _ecore_status_t ecore_cxt_acquire_cid(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
213
enum _ecore_status_t _ecore_cxt_acquire_cid(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
229
ecore_cxt_dynamic_ilt_alloc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
243
ecore_cxt_free_ilt_range(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
249
enum _ecore_status_t ecore_cxt_get_task_ctx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
254
u32 ecore_cxt_get_ilt_page_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
257
u32 ecore_cxt_get_total_srq_count(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.h
58
u32 ecore_cxt_get_proto_cid_count(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
62
u32 ecore_cxt_get_proto_tid_count(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
65
u32 ecore_cxt_get_proto_cid_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
68
u32 ecore_cxt_get_srq_count(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.h
70
u32 ecore_cxt_get_xrc_srq_count(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_cxt.h
79
enum _ecore_status_t ecore_cxt_set_pf_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
90
enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt.h
99
u32 ecore_cxt_cfg_ilt_compute_excess(struct ecore_hwfn *p_hwfn, u32 used_lines);
sys/dev/qlnx/qlnxe/ecore_cxt_api.h
57
enum _ecore_status_t ecore_cxt_get_cid_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_cxt_api.h
68
enum _ecore_status_t ecore_cxt_get_tid_mem_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1823
static void ecore_grc_set_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1827
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1833
static u32 ecore_grc_get_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1836
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1842
static void ecore_dbg_grc_init_params(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1844
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1847
ecore_dbg_grc_set_params_default(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1853
static enum dbg_status ecore_dbg_dev_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1856
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1864
if (ECORE_IS_E5(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1868
else if (ECORE_IS_K2(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1872
else if (ECORE_IS_BB_B0(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1884
if (CHIP_REV_IS_ASIC(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1888
else if (CHIP_REV_IS_EMUL(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1889
if (ecore_rd(p_hwfn, p_ptt, MISCS_REG_ECO_RESERVED) & 0x20000000) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1898
else if (CHIP_REV_IS_FPGA(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1908
ecore_dbg_grc_init_params(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1917
static const struct dbg_bus_block *get_dbg_bus_block_desc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1920
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1926
static const struct dbg_bus_line *get_dbg_bus_line_desc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1929
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1935
block_desc = get_dbg_bus_block_desc(p_hwfn, block_id);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1950
static void ecore_read_fw_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1966
(ECORE_IS_E5(p_hwfn->p_dev) ?
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1974
dest[i] = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
1981
dest[i] = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2078
static u32 ecore_dump_fw_ver_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2083
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2089
if (dump && !ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_FW_VER)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2102
ecore_read_fw_info(p_hwfn, p_ptt, storm_id, &fw_info);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2106
DP_NOTICE(p_hwfn, true, "Unexpected debug error: invalid FW version string\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2129
static u32 ecore_dump_mfw_ver_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2134
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2137
if (dump && dev_data->platform_id == PLATFORM_ASIC && !ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_FW_VER)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2143
public_data_addr = ecore_rd(p_hwfn, p_ptt, MISC_REG_SHARED_MEM_ADDR) | MCP_REG_SCRATCH;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2147
global_section_offsize = ecore_rd(p_hwfn, p_ptt, global_section_offsize_addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2151
mfw_ver = ecore_rd(p_hwfn, p_ptt, global_section_addr + OFFSETOF(struct public_global, mfw_ver));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2155
DP_NOTICE(p_hwfn, true, "Unexpected debug error: invalid MFW version string\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2175
static u32 ecore_dump_common_global_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2181
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2190
offset += ecore_dump_fw_ver_param(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2191
offset += ecore_dump_mfw_ver_param(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2195
offset += ecore_dump_num_param(dump_buf + offset, dump, "pci-func", p_hwfn->abs_pf_id);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2222
static void ecore_update_blocks_reset_state(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2225
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2232
reg_val[i] = ecore_rd(p_hwfn, p_ptt, s_reset_regs_defs[i].addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2243
static void ecore_bus_enable_dbg_block(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2247
ecore_wr(p_hwfn, p_ptt, DBG_REG_DBG_BLOCK_ON, enable ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2251
static void ecore_bus_reset_dbg_block(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2258
old_reset_reg_val = ecore_rd(p_hwfn, p_ptt, dbg_reset_reg_addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2261
ecore_wr(p_hwfn, p_ptt, dbg_reset_reg_addr, new_reset_reg_val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2262
ecore_wr(p_hwfn, p_ptt, dbg_reset_reg_addr, old_reset_reg_val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2265
static void ecore_bus_set_framing_mode(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2269
ecore_wr(p_hwfn, p_ptt, DBG_REG_FRAMING_MODE, (u8)mode);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2275
static void ecore_bus_enable_clients(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2279
ecore_wr(p_hwfn, p_ptt, DBG_REG_CLIENT_ENABLE, client_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2283
static void ecore_bus_enable_storm(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2287
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2301
ecore_wr(p_hwfn, p_ptt, storm->sem_frame_mode_addr, DBG_BUS_SEMI_FRAME_MODE_0SLOW_4FAST);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2302
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_DEBUG_MODE, storm_mode->id_in_hw);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2303
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_DEBUG_ACTIVE, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2309
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_DBG_MODE23_SRC_DISABLE, SEM_FAST_MODE23_SRC_ENABLE_VAL);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2310
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_DBG_MODE4_SRC_DISABLE, SEM_FAST_MODE4_SRC_ENABLE_VAL);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2311
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_DBG_MODE6_SRC_DISABLE, SEM_FAST_MODE6_SRC_ENABLE_VAL);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2315
ecore_wr(p_hwfn, p_ptt, storm->sem_frame_mode_addr, DBG_BUS_SEMI_FRAME_MODE_4SLOW_0FAST);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2316
ecore_wr(p_hwfn, p_ptt, storm->sem_slow_enable_addr, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2317
ecore_wr(p_hwfn, p_ptt, storm->sem_slow_mode_addr, storm_mode->id_in_hw);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2318
ecore_wr(p_hwfn, p_ptt, storm->sem_slow_mode1_conf_addr, SEM_SLOW_MODE1_DATA_ENABLE);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2323
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_FILTER_CID, storm_bus->cid);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2332
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_EVENT_ID_RANGE_STRT, eid_filter->range.min);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2333
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_EVENT_ID_RANGE_END, eid_filter->range.max);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2337
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_FILTER_EVENT_ID, eid_filter->mask.val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2338
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_EVENT_ID_MASK, ~eid_filter->mask.mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2345
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_RECORD_FILTER_ENABLE, sem_filter_params);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2349
static enum dbg_status ecore_bus_disable_inputs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2353
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2365
ecore_wr(p_hwfn, p_ptt, storm->sem_fast_mem_addr + SEM_FAST_REG_DBG_MODE23_SRC_DISABLE, SEM_FAST_MODE23_SRC_DISABLE_VAL);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2366
ecore_wr(p_hwfn, p_ptt, storm->sem_fast_mem_addr + SEM_FAST_REG_DBG_MODE4_SRC_DISABLE, SEM_FAST_MODE4_SRC_DISABLE_VAL);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2367
ecore_wr(p_hwfn, p_ptt, storm->sem_fast_mem_addr + SEM_FAST_REG_DBG_MODE6_SRC_DISABLE, SEM_FAST_MODE6_SRC_DISABLE_VAL);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2381
if (dev_data->block_in_reset[storm->block_id] || ecore_rd(p_hwfn, p_ptt, storm->sem_sync_dbg_empty_addr)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2397
DP_NOTICE(p_hwfn, false, "Warning: failed to empty the SEMI sync FIFO. It means that the last few messages from the SEMI could not be sent to the DBG block. This can happen when the DBG block is blocked (e.g. due to a PCI problem).\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2411
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_DEBUG_ACTIVE, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2412
ecore_wr(p_hwfn, p_ptt, base_addr + SEM_FAST_REG_RECORD_FILTER_ENABLE, DBG_BUS_FILTER_TYPE_OFF);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2413
ecore_wr(p_hwfn, p_ptt, storm->sem_frame_mode_addr, DBG_BUS_FRAME_MODE_4HW_0ST);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2414
ecore_wr(p_hwfn, p_ptt, storm->sem_slow_enable_addr, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2418
ecore_bus_enable_clients(p_hwfn, p_ptt, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2425
ecore_wr(p_hwfn, p_ptt, block->dbg_enable_addr, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2429
ecore_wr(p_hwfn, p_ptt, DBG_REG_TIMESTAMP_VALID_EN, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2432
ecore_wr(p_hwfn, p_ptt, DBG_REG_FILTER_ENABLE, DBG_BUS_FILTER_TYPE_OFF);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2433
ecore_wr(p_hwfn, p_ptt, DBG_REG_TRIGGER_ENABLE, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2439
static void ecore_bus_set_constraint(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2453
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2463
ecore_wr(p_hwfn, p_ptt, (is_filter ? DBG_REG_FILTER_CNSTR_OPRTN_0 : DBG_REG_TRIGGER_STATE_SET_CNSTR_OPRTN_0) + reg_offset, hw_op_val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2464
ecore_wr(p_hwfn, p_ptt, (is_filter ? DBG_REG_FILTER_CNSTR_DATA_0 : DBG_REG_TRIGGER_STATE_SET_CNSTR_DATA_0) + reg_offset, data_val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2465
ecore_wr(p_hwfn, p_ptt, (is_filter ? DBG_REG_FILTER_CNSTR_DATA_MASK_0 : DBG_REG_TRIGGER_STATE_SET_CNSTR_DATA_MASK_0) + reg_offset, data_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2466
ecore_wr(p_hwfn, p_ptt, (is_filter ? DBG_REG_FILTER_CNSTR_FRAME_0 : DBG_REG_TRIGGER_STATE_SET_CNSTR_FRAME_0) + reg_offset, frame_bit);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2467
ecore_wr(p_hwfn, p_ptt, (is_filter ? DBG_REG_FILTER_CNSTR_FRAME_MASK_0 : DBG_REG_TRIGGER_STATE_SET_CNSTR_FRAME_MASK_0) + reg_offset, frame_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2468
ecore_wr(p_hwfn, p_ptt, (is_filter ? DBG_REG_FILTER_CNSTR_OFFSET_0 : DBG_REG_TRIGGER_STATE_SET_CNSTR_OFFSET_0) + reg_offset, dword_offset);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2469
ecore_wr(p_hwfn, p_ptt, (is_filter ? DBG_REG_FILTER_CNSTR_RANGE_0 : DBG_REG_TRIGGER_STATE_SET_CNSTR_RANGE_0) + reg_offset, range);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2470
ecore_wr(p_hwfn, p_ptt, (is_filter ? DBG_REG_FILTER_CNSTR_CYCLIC_0 : DBG_REG_TRIGGER_STATE_SET_CNSTR_CYCLIC_0) + reg_offset, cyclic_bit);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2471
ecore_wr(p_hwfn, p_ptt, (is_filter ? DBG_REG_FILTER_CNSTR_MUST_0 : DBG_REG_TRIGGER_STATE_SET_CNSTR_MUST_0) + reg_offset, must_bit);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2477
static u32 ecore_bus_dump_int_buf_range(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2493
dump_buf[offset + INT_BUF_LINE_SIZE_IN_DWORDS - 1 - i] = ecore_rd(p_hwfn, p_ptt, reg_addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2501
static u32 ecore_bus_dump_int_buf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2508
last_written_line = ecore_rd(p_hwfn, p_ptt, DBG_REG_INTR_BUFFER_WR_PTR);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2510
if (ecore_rd(p_hwfn, p_ptt, DBG_REG_WRAP_ON_INT_BUFFER)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2515
offset += ecore_bus_dump_int_buf_range(p_hwfn, p_ptt, dump_buf + offset, dump, last_written_line + 1, INT_BUF_NUM_OF_LINES - 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2516
offset += ecore_bus_dump_int_buf_range(p_hwfn, p_ptt, dump_buf + offset, dump, 0, last_written_line);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2522
if (!ecore_rd(p_hwfn, p_ptt, DBG_REG_INTR_BUFFER_RD_PTR))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2523
offset += ecore_bus_dump_int_buf_range(p_hwfn, p_ptt, dump_buf + offset, dump, 0, last_written_line);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2525
DP_NOTICE(p_hwfn, true, "Unexpected Debug Bus error: internal buffer read pointer is not zero\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2534
static u32 ecore_bus_dump_pci_buf_range(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2540
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2563
static u32 ecore_bus_dump_pci_buf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2568
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2576
next_wr_phys_addr.lo = ecore_rd(p_hwfn, p_ptt, DBG_REG_EXT_BUFFER_WR_PTR);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2577
next_wr_phys_addr.hi = ecore_rd(p_hwfn, p_ptt, DBG_REG_EXT_BUFFER_WR_PTR + BYTES_IN_DWORD);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2586
if (ecore_rd(p_hwfn, p_ptt, DBG_REG_WRAP_ON_EXT_BUFFER))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2587
offset += ecore_bus_dump_pci_buf_range(p_hwfn, dump_buf + offset, dump, next_wr_line_offset, pci_buf_size_in_lines - 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2591
offset += ecore_bus_dump_pci_buf_range(p_hwfn, dump_buf + offset, dump, 0, next_wr_line_offset - 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2599
static u32 ecore_bus_dump_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2604
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2608
return ecore_bus_dump_int_buf(p_hwfn, p_ptt, dump_buf, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2610
return ecore_bus_dump_pci_buf(p_hwfn, p_ptt, dump_buf, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2619
static void ecore_bus_free_pci_buf(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2621
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2635
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, pci_buf, pci_buf_phys_addr, dev_data->bus.pci_buf.size);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2643
static u32 ecore_bus_dump_inputs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2647
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2690
static u32 ecore_bus_dump_hdr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2695
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2700
DP_NOTICE(p_hwfn, true, "Unexpected debug error: invalid HW ID mask\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2703
offset += ecore_dump_common_global_params(p_hwfn, p_ptt, dump_buf + offset, dump, 5);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2710
offset += ecore_bus_dump_inputs(p_hwfn, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2716
recorded_dwords = ecore_bus_dump_data(p_hwfn, p_ptt, OSAL_NULL, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2725
static bool ecore_is_mode_match(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2728
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2737
return !ecore_is_mode_match(p_hwfn, modes_buf_offset);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2740
arg1 = ecore_is_mode_match(p_hwfn, modes_buf_offset);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2741
arg2 = ecore_is_mode_match(p_hwfn, modes_buf_offset);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2750
static bool ecore_grc_is_included(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2753
return ecore_grc_get_param(p_hwfn, grc_param) > 0;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2759
static bool ecore_grc_is_storm_included(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2762
return ecore_grc_get_param(p_hwfn, (enum dbg_grc_params)storm) > 0;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2768
static bool ecore_grc_is_mem_included(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2777
!ecore_grc_is_storm_included(p_hwfn, (enum dbg_storms)block->storm_id))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2784
return ecore_grc_is_included(p_hwfn, big_ram->grc_param);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2790
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PXP);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2792
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_RAM);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2794
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PBUF);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2798
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CAU);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2800
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_QM);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2804
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CFC) || ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CM_CTX);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2807
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_IGU);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2809
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_MULD);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2811
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PRS);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2813
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_DMAE);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2815
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_TM);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2817
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_SDM);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2820
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_DIF);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2822
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CM);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2824
return ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_IOR);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2831
static void ecore_grc_stall_storms(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2839
if (!ecore_grc_is_storm_included(p_hwfn, (enum dbg_storms)storm_id))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2843
ecore_wr(p_hwfn, p_ptt, reg_addr, stall ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2850
static void ecore_grc_unreset_blocks(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2853
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2873
ecore_wr(p_hwfn, p_ptt, s_reset_regs_defs[i].addr + RESET_REG_UNRESET_OFFSET, reg_val[i]);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2899
static void ecore_grc_clear_all_prty(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2902
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2923
if (!eval_mode || ecore_is_mode_match(p_hwfn, &modes_buf_offset))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2924
ecore_rd(p_hwfn, p_ptt, DWORDS_TO_BYTES(reg_data->sts_clr_address));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2962
void ecore_read_regs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2971
buf[i] = ecore_rd(p_hwfn, p_ptt, DWORDS_TO_BYTES(addr + i));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2978
static u32 ecore_grc_dump_addr_range(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2986
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
2994
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "Dumping %d registers...\n", dev_data->num_regs_read);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3000
if (!ecore_dmae_grc2host(p_hwfn, p_ptt, DWORDS_TO_BYTES(addr), (u64)(osal_uintptr_t)(dump_buf), len, OSAL_NULL))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3003
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "Failed reading from chip using DMAE, using GRC instead\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3007
ecore_read_regs(p_hwfn, p_ptt, dump_buf, addr, len);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3029
static u32 ecore_grc_dump_reg_entry(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3040
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, dump, addr, len, wide_bus);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3052
static u32 ecore_grc_dump_reg_entry_skip(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3071
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, dump, addr, curr_len, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3088
static u32 ecore_grc_dump_regs_entries(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3110
mode_match = ecore_is_mode_match(p_hwfn, &modes_buf_offset);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3121
offset += ecore_grc_dump_reg_entry(p_hwfn, p_ptt, dump_buf + offset, dump,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3133
static u32 ecore_grc_dump_split_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3150
offset += ecore_grc_dump_regs_entries(p_hwfn, p_ptt, input_regs_arr, dump_buf + offset, dump, block_enable, &num_dumped_reg_entries);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3162
static u32 ecore_grc_dump_registers(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3170
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3191
offset += ecore_grc_dump_split_data(p_hwfn, p_ptt, curr_input_regs_arr, dump_buf + offset, dump, block_enable, "eng", (u32)(-1), param_name, param_val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3197
ecore_port_pretend(p_hwfn, p_ptt, port_id);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3198
offset += ecore_grc_dump_split_data(p_hwfn, p_ptt, curr_input_regs_arr, dump_buf + offset, dump, block_enable, "port", port_id, param_name, param_val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3206
ecore_fid_pretend(p_hwfn, p_ptt, (pf_id << PXP_PRETEND_CONCRETE_FID_PFID_SHIFT));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3207
offset += ecore_grc_dump_split_data(p_hwfn, p_ptt, curr_input_regs_arr, dump_buf + offset, dump, block_enable, "pf", pf_id, param_name, param_val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3214
ecore_fid_pretend(p_hwfn, p_ptt, (1 << PXP_PRETEND_CONCRETE_FID_VFVALID_SHIFT) | (vf_id << PXP_PRETEND_CONCRETE_FID_VFID_SHIFT));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3215
offset += ecore_grc_dump_split_data(p_hwfn, p_ptt, curr_input_regs_arr, dump_buf + offset, dump, block_enable, "vf", vf_id, param_name, param_val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3228
ecore_fid_pretend(p_hwfn, p_ptt, (p_hwfn->rel_pf_id << PXP_PRETEND_CONCRETE_FID_PFID_SHIFT));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3234
static u32 ecore_grc_dump_reset_regs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3239
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3250
offset += ecore_grc_dump_reg_entry(p_hwfn, p_ptt, dump_buf + offset, dump, BYTES_TO_DWORDS(s_reset_regs_defs[i].addr), 1, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3264
static u32 ecore_grc_dump_modified_regs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3269
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3292
if (eval_mode && !ecore_is_mode_match(p_hwfn, &modes_buf_offset))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3296
offset += ecore_grc_dump_reg_entry(p_hwfn, p_ptt, dump_buf + offset, dump, reg_data->mask_address, 1, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3297
offset += ecore_grc_dump_reg_entry(p_hwfn, p_ptt, dump_buf + offset, dump, GET_FIELD(reg_data->data, DBG_ATTN_REG_STS_ADDRESS), 1, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3309
offset += ecore_grc_dump_reg_entry(p_hwfn, p_ptt, dump_buf + offset, dump,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3322
static u32 ecore_grc_dump_special_regs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3334
offset += ecore_grc_dump_reg_entry_skip(p_hwfn, p_ptt, dump_buf + offset, dump, BYTES_TO_DWORDS(RDIF_REG_DEBUG_ERROR_INFO), RDIF_REG_DEBUG_ERROR_INFO_SIZE, 7, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3335
offset += ecore_grc_dump_reg_entry_skip(p_hwfn, p_ptt, dump_buf + offset, dump, BYTES_TO_DWORDS(TDIF_REG_DEBUG_ERROR_INFO), TDIF_REG_DEBUG_ERROR_INFO_SIZE, 7, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3352
static u32 ecore_grc_dump_mem_hdr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3369
DP_NOTICE(p_hwfn, true, "Unexpected GRC Dump error: dumped memory size must be non-zero\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3429
static u32 ecore_grc_dump_mem(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3445
offset += ecore_grc_dump_mem_hdr(p_hwfn, dump_buf + offset, dump, name, addr, len, bit_width, packed, mem_group, is_storm, storm_letter);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3446
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, dump, addr, len, wide_bus);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3452
static u32 ecore_grc_dump_mem_entries(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3474
mode_match = ecore_is_mode_match(p_hwfn, &modes_buf_offset);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3490
DP_NOTICE(p_hwfn, true, "Invalid mem_group_id\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3494
if (!ecore_grc_is_mem_included(p_hwfn, (enum block_id)cond_hdr->block_id, mem_group_id))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3506
DP_NOTICE(p_hwfn, true, "Invalid CCFC connection memory size\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3510
mem_len = ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NUM_LCIDS) * (mem_len / MAX_LCIDS);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3514
DP_NOTICE(p_hwfn, true, "Invalid TCFC task memory size\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3518
mem_len = ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NUM_LTIDS) * (mem_len / MAX_LTIDS);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3530
offset += ecore_grc_dump_mem(p_hwfn, p_ptt, dump_buf + offset, dump, OSAL_NULL, mem_addr, mem_len, mem_wide_bus,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3541
static u32 ecore_grc_dump_memories(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3562
offset += ecore_grc_dump_mem_entries(p_hwfn, p_ptt, curr_input_mems_arr, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3566
DP_NOTICE(p_hwfn, true, "Dumping split memories is currently not supported\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3580
static u32 ecore_grc_dump_ctx_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3599
offset += ecore_grc_dump_mem_hdr(p_hwfn, dump_buf + offset, dump, name, 0, total_size, lid_size * 32, false, name, true, storm->letter);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3607
ecore_wr(p_hwfn, p_ptt, storm->cm_ctx_wr_addr, (i << 9) | lid);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3608
*(dump_buf + offset) = ecore_rd(p_hwfn, p_ptt, rd_reg_addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3616
static u32 ecore_grc_dump_ctx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3627
if (!ecore_grc_is_storm_included(p_hwfn, (enum dbg_storms)storm_id))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3631
offset += ecore_grc_dump_ctx_data(p_hwfn, p_ptt, dump_buf + offset, dump, "CONN_AG_CTX", ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NUM_LCIDS),
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3635
offset += ecore_grc_dump_ctx_data(p_hwfn, p_ptt, dump_buf + offset, dump, "CONN_ST_CTX", ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NUM_LCIDS),
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3639
offset += ecore_grc_dump_ctx_data(p_hwfn, p_ptt, dump_buf + offset, dump, "TASK_AG_CTX", ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NUM_LTIDS),
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3643
offset += ecore_grc_dump_ctx_data(p_hwfn, p_ptt, dump_buf + offset, dump, "TASK_ST_CTX", ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NUM_LTIDS),
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3651
static u32 ecore_grc_dump_iors(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3663
if (!ecore_grc_is_storm_included(p_hwfn, (enum dbg_storms)storm_id))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3669
offset += ecore_grc_dump_mem(p_hwfn, p_ptt, dump_buf + offset, dump, buf, addr, IORS_PER_SET, false, 32, false, "ior", true, storm->letter);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3677
static u32 ecore_grc_dump_vfc_cam(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3689
offset += ecore_grc_dump_mem_hdr(p_hwfn, dump_buf + offset, dump, "vfc_cam", 0, total_size, 256, false, "vfc_cam", true, storm->letter);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3700
ARR_REG_WR(p_hwfn, p_ptt, storm->sem_fast_mem_addr + SEM_FAST_REG_VFC_DATA_WR, cam_cmd, VFC_CAM_CMD_DWORDS);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3703
ARR_REG_WR(p_hwfn, p_ptt, storm->sem_fast_mem_addr + SEM_FAST_REG_VFC_ADDR, cam_addr, VFC_CAM_ADDR_DWORDS);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3706
ARR_REG_RD(p_hwfn, p_ptt, storm->sem_fast_mem_addr + SEM_FAST_REG_VFC_DATA_RD, dump_buf + offset, VFC_CAM_RESP_DWORDS);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3713
static u32 ecore_grc_dump_vfc_ram(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3726
offset += ecore_grc_dump_mem_hdr(p_hwfn, dump_buf + offset, dump, ram_defs->mem_name, 0, total_size, 256, false, ram_defs->type_name, true, storm->letter);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3736
ARR_REG_WR(p_hwfn, p_ptt, storm->sem_fast_mem_addr + SEM_FAST_REG_VFC_DATA_WR, ram_cmd, VFC_RAM_CMD_DWORDS);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3740
ARR_REG_WR(p_hwfn, p_ptt, storm->sem_fast_mem_addr + SEM_FAST_REG_VFC_ADDR, ram_addr, VFC_RAM_ADDR_DWORDS);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3743
ARR_REG_RD(p_hwfn, p_ptt, storm->sem_fast_mem_addr + SEM_FAST_REG_VFC_DATA_RD, dump_buf + offset, VFC_RAM_RESP_DWORDS);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3750
static u32 ecore_grc_dump_vfc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3755
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3760
if (!ecore_grc_is_storm_included(p_hwfn, (enum dbg_storms)storm_id) ||
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3766
offset += ecore_grc_dump_vfc_cam(p_hwfn, p_ptt, dump_buf + offset, dump, storm_id);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3770
offset += ecore_grc_dump_vfc_ram(p_hwfn, p_ptt, dump_buf + offset, dump, storm_id, &s_vfc_ram_defs[i]);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3777
static u32 ecore_grc_dump_rss(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3782
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3797
offset += ecore_grc_dump_mem_hdr(p_hwfn, dump_buf + offset, dump, rss_defs->mem_name, 0, total_dwords,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3808
ecore_wr(p_hwfn, p_ptt, RSS_REG_RSS_RAM_ADDR, rss_addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3809
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, dump, BYTES_TO_DWORDS(RSS_REG_RSS_RAM_DATA), num_dwords_to_read, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3819
static u32 ecore_grc_dump_big_ram(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3825
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3834
reg_val = ecore_rd(p_hwfn, p_ptt, big_ram->is_256b_reg_addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3841
offset += ecore_grc_dump_mem_hdr(p_hwfn, dump_buf + offset, dump, mem_name, 0, ram_size, block_size * 8, false, type_name, false, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3849
ecore_wr(p_hwfn, p_ptt, big_ram->addr_reg_addr, i);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3850
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, dump, BYTES_TO_DWORDS(big_ram->data_reg_addr), BRB_REG_BIG_RAM_DATA_SIZE, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3856
static u32 ecore_grc_dump_mcp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3861
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3867
if (dump && dev_data->platform_id == PLATFORM_ASIC && !ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3868
halted = !ecore_mcp_halt(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3870
DP_NOTICE(p_hwfn, false, "MCP halt failed!\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3874
offset += ecore_grc_dump_mem(p_hwfn, p_ptt, dump_buf + offset, dump, OSAL_NULL, BYTES_TO_DWORDS(MCP_REG_SCRATCH),
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3875
ECORE_IS_E5(p_hwfn->p_dev) ? MCP_REG_SCRATCH_SIZE_E5 : MCP_REG_SCRATCH_SIZE_BB_K2, false, 0, false, "MCP", false, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3878
offset += ecore_grc_dump_mem(p_hwfn, p_ptt, dump_buf + offset, dump, OSAL_NULL, BYTES_TO_DWORDS(MCP_REG_CPU_REG_FILE),
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3883
offset += ecore_grc_dump_registers(p_hwfn, p_ptt, dump_buf + offset, dump, block_enable, "block", "MCP");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3887
offset += ecore_grc_dump_reg_entry(p_hwfn, p_ptt, dump_buf + offset, dump, BYTES_TO_DWORDS(MISC_REG_SHARED_MEM_ADDR), 1, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3890
if (halted && ecore_mcp_resume(p_hwfn, p_ptt))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3891
DP_NOTICE(p_hwfn, false, "Failed to resume MCP after halt!\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3897
static u32 ecore_grc_dump_phy(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3918
DP_NOTICE(p_hwfn, true, "Unexpected debug error: invalid PHY memory name\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3920
offset += ecore_grc_dump_mem_hdr(p_hwfn, dump_buf + offset, dump, mem_name, 0, PHY_DUMP_SIZE_DWORDS, 16, true, mem_name, false, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3929
ecore_wr(p_hwfn, p_ptt, addr_hi_addr, tbus_hi_offset);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3931
ecore_wr(p_hwfn, p_ptt, addr_lo_addr, tbus_lo_offset);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3932
*(bytes_buf++) = (u8)ecore_rd(p_hwfn, p_ptt, data_lo_addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3933
*(bytes_buf++) = (u8)ecore_rd(p_hwfn, p_ptt, data_hi_addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3943
static void ecore_config_dbg_line(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3954
ecore_wr(p_hwfn, p_ptt, block->dbg_select_addr, line_id);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3955
ecore_wr(p_hwfn, p_ptt, block->dbg_enable_addr, enable_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3956
ecore_wr(p_hwfn, p_ptt, block->dbg_shift_addr, right_shift);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3957
ecore_wr(p_hwfn, p_ptt, block->dbg_force_valid_addr, force_valid_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3958
ecore_wr(p_hwfn, p_ptt, block->dbg_force_frame_addr, force_frame_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3962
static u32 ecore_grc_dump_static_debug(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3967
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3971
if (dump && ecore_rd(p_hwfn, p_ptt, DBG_REG_DBG_BLOCK_ON))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3980
ecore_wr(p_hwfn, p_ptt, block->dbg_enable_addr, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3983
ecore_bus_reset_dbg_block(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3984
ecore_bus_set_framing_mode(p_hwfn, p_ptt, DBG_BUS_FRAME_MODE_8HW_0ST);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3985
ecore_wr(p_hwfn, p_ptt, DBG_REG_DEBUG_TARGET, DBG_BUS_TARGET_ID_INT_BUF);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3986
ecore_wr(p_hwfn, p_ptt, DBG_REG_FULL_MODE, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3987
ecore_bus_enable_dbg_block(p_hwfn, p_ptt, true);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
3999
block_desc = get_dbg_bus_block_desc(p_hwfn, (enum block_id)block_id);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4003
offset += ecore_grc_dump_mem_hdr(p_hwfn, dump_buf + offset, dump, block->name, 0, block_dwords, 32, false, "STATIC", false, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4018
ecore_bus_enable_clients(p_hwfn, p_ptt, 1 << block->dbg_client_id[dev_data->chip_id]);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4021
ecore_config_dbg_line(p_hwfn, p_ptt, (enum block_id)block_id, (u8)line_id, 0xf, 0, 0, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4024
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, dump, BYTES_TO_DWORDS(DBG_REG_CALENDAR_OUT_DATA), STATIC_DEBUG_LINE_DWORDS, true);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4028
ecore_bus_enable_clients(p_hwfn, p_ptt, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4029
ecore_wr(p_hwfn, p_ptt, block->dbg_enable_addr, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4033
ecore_bus_enable_dbg_block(p_hwfn, p_ptt, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4034
ecore_bus_enable_clients(p_hwfn, p_ptt, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4043
static enum dbg_status ecore_grc_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4049
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4060
switch (ecore_rd(p_hwfn, p_ptt, MISC_REG_PORT_MODE)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4067
ecore_update_blocks_reset_state(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4071
offset += ecore_dump_common_global_params(p_hwfn, p_ptt, dump_buf + offset, dump, 4);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4073
offset += ecore_dump_num_param(dump_buf + offset, dump, "num-lcids", ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NUM_LCIDS));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4074
offset += ecore_dump_num_param(dump_buf + offset, dump, "num-ltids", ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NUM_LTIDS));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4078
if (ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_REGS))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4079
offset += ecore_grc_dump_reset_regs(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4083
ecore_grc_unreset_blocks(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4084
ecore_update_blocks_reset_state(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4088
if (dump && is_asic && !ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4089
parities_masked = !ecore_mcp_mask_parities(p_hwfn, p_ptt, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4091
DP_NOTICE(p_hwfn, false, "Failed to mask parities using MFW\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4092
if (ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_PARITY_SAFE))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4098
if (ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_REGS))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4099
offset += ecore_grc_dump_modified_regs(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4102
if (dump && (ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_IOR) || ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_VFC)))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4103
ecore_grc_stall_storms(p_hwfn, p_ptt, true);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4106
if (ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_REGS)) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4113
offset += ecore_grc_dump_registers(p_hwfn, p_ptt, dump_buf + offset, dump, block_enable, OSAL_NULL, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4116
offset += ecore_grc_dump_special_regs(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4120
offset += ecore_grc_dump_memories(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4123
if (ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_MCP))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4124
offset += ecore_grc_dump_mcp(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4127
if (ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_CM_CTX))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4128
offset += ecore_grc_dump_ctx(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4131
if (ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_RSS))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4132
offset += ecore_grc_dump_rss(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4136
if (ecore_grc_is_included(p_hwfn, s_big_ram_defs[i].grc_param))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4137
offset += ecore_grc_dump_big_ram(p_hwfn, p_ptt, dump_buf + offset, dump, i);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4140
if (ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_IOR))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4141
offset += ecore_grc_dump_iors(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4144
if (ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_VFC))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4145
offset += ecore_grc_dump_vfc(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4148
if (ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_PHY) && dev_data->chip_id == CHIP_K2 && dev_data->platform_id == PLATFORM_ASIC)
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4149
offset += ecore_grc_dump_phy(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4152
if (ecore_grc_is_included(p_hwfn, DBG_GRC_PARAM_DUMP_STATIC) && dev_data->bus.state == DBG_BUS_STATE_IDLE)
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4153
offset += ecore_grc_dump_static_debug(p_hwfn, p_ptt, dump_buf + offset, dump);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4160
if (ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_UNSTALL))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4161
ecore_grc_stall_storms(p_hwfn, p_ptt, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4165
ecore_grc_clear_all_prty(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4169
ecore_mcp_mask_parities(p_hwfn, p_ptt, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4180
static u32 ecore_idle_chk_dump_failure(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4189
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4251
DP_NOTICE(p_hwfn, true, "Invalid block_id\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4267
mode_match = ecore_is_mode_match(p_hwfn, &modes_buf_offset);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4284
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, dump, addr, reg->size, wide_bus);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4292
static u32 ecore_idle_chk_dump_rule_entries(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4300
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4329
DP_NOTICE(p_hwfn, true, "Invalid block_id\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4342
u32 entry_dump_size = ecore_idle_chk_dump_failure(p_hwfn, p_ptt, dump_buf + offset, false, rule->rule_id, rule, 0, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4373
DP_NOTICE(p_hwfn, true, "idle check registers entry is too large\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4377
next_reg_offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, cond_reg_values + next_reg_offset, dump, addr, reg->entry_size, wide_bus);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4382
offset += ecore_idle_chk_dump_failure(p_hwfn, p_ptt, dump_buf + offset, dump, rule->rule_id, rule, entry_id, cond_reg_values);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4394
static u32 ecore_idle_chk_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4402
offset += ecore_dump_common_global_params(p_hwfn, p_ptt, dump_buf + offset, dump, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4420
mode_match = ecore_is_mode_match(p_hwfn, &modes_buf_offset);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4424
offset += ecore_idle_chk_dump_rule_entries(p_hwfn, p_ptt, dump_buf + offset, dump, (const struct dbg_idle_chk_rule *)&s_dbg_arrays[BIN_BUF_DBG_IDLE_CHK_RULES].ptr[input_offset], cond_hdr->data_size / IDLE_CHK_RULE_SIZE_DWORDS, &curr_failing_rules);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4442
static enum dbg_status ecore_find_nvram_image(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4453
nvm_result = ecore_mcp_nvm_rd_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_NVM_GET_FILE_ATT, image_type, &ret_mcp_resp, &ret_mcp_param, &ret_txn_size, (u32 *)&file_att);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4463
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "find_nvram_image: found NVRAM image of type %d in NVRAM offset %d bytes with size %d bytes\n", image_type, *nvram_offset_bytes, *nvram_size_bytes);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4473
static enum dbg_status ecore_nvram_read(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4483
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "nvram_read: reading image of size %d bytes from NVRAM\n", nvram_size_bytes);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4489
if (ecore_mcp_nvm_rd_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_NVM_READ_NVRAM, (nvram_offset_bytes + read_offset) | (bytes_to_copy << DRV_MB_PARAM_NVM_LEN_OFFSET), &ret_mcp_resp, &ret_mcp_param, &ret_read_size, (u32 *)((u8 *)ret_buf + read_offset)))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4508
static enum dbg_status ecore_mcp_trace_get_data_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4516
spad_trace_offsize = ecore_rd(p_hwfn, p_ptt, MCP_SPAD_TRACE_OFFSIZE_ADDR);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4522
signature = ecore_rd(p_hwfn, p_ptt, *trace_data_grc_addr + OFFSETOF(struct mcp_trace, signature));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4528
*trace_data_size = ecore_rd(p_hwfn, p_ptt, *trace_data_grc_addr + OFFSETOF(struct mcp_trace, size));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4539
static enum dbg_status ecore_mcp_trace_get_meta_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4549
spad_trace_offsize = ecore_rd(p_hwfn, p_ptt, MCP_SPAD_TRACE_OFFSIZE_ADDR);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4553
*running_bundle_id = ecore_rd(p_hwfn, p_ptt, running_mfw_addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4559
return ecore_find_nvram_image(p_hwfn, p_ptt, nvram_image_type, trace_meta_offset, trace_meta_size);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4563
static enum dbg_status ecore_mcp_trace_read_meta(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4574
status = ecore_nvram_read(p_hwfn, p_ptt, nvram_offset_in_bytes, size_in_bytes, buf);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4603
static enum dbg_status ecore_mcp_trace_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4611
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4619
mcp_access = dev_data->platform_id == PLATFORM_ASIC && !ecore_grc_get_param(p_hwfn, DBG_GRC_PARAM_NO_MCP);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4622
status = ecore_mcp_trace_get_data_info(p_hwfn, p_ptt, &trace_data_grc_addr, &trace_data_size_bytes);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4627
offset += ecore_dump_common_global_params(p_hwfn, p_ptt, dump_buf + offset, dump, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4635
halted = !ecore_mcp_halt(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4637
DP_NOTICE(p_hwfn, false, "MCP halt failed!\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4648
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, dump, BYTES_TO_DWORDS(trace_data_grc_addr), trace_data_size_dwords, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4651
if (halted && ecore_mcp_resume(p_hwfn, p_ptt))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4652
DP_NOTICE(p_hwfn, false, "Failed to resume MCP after halt!\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4660
if (OSAL_NVM_IS_ACCESS_ENABLED(p_hwfn) && mcp_access) {
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4661
status = ecore_mcp_trace_get_meta_info(p_hwfn, p_ptt, trace_data_size_bytes, &running_bundle_id, &trace_meta_offset_bytes, &trace_meta_size_bytes);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4671
status = ecore_mcp_trace_read_meta(p_hwfn, p_ptt, trace_meta_offset_bytes, trace_meta_size_bytes, dump_buf + offset);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4687
static enum dbg_status ecore_reg_fifo_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4699
offset += ecore_dump_common_global_params(p_hwfn, p_ptt, dump_buf + offset, dump, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4710
fifo_has_data = ecore_rd(p_hwfn, p_ptt, GRC_REG_TRACE_FIFO_VALID_DATA) > 0;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4719
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, true, BYTES_TO_DWORDS(GRC_REG_TRACE_FIFO), REG_FIFO_ELEMENT_DWORDS, true);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4720
fifo_has_data = ecore_rd(p_hwfn, p_ptt, GRC_REG_TRACE_FIFO_VALID_DATA) > 0;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4741
static enum dbg_status ecore_igu_fifo_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4753
offset += ecore_dump_common_global_params(p_hwfn, p_ptt, dump_buf + offset, dump, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4764
fifo_has_data = ecore_rd(p_hwfn, p_ptt, IGU_REG_ERROR_HANDLING_DATA_VALID) > 0;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4772
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, true, BYTES_TO_DWORDS(IGU_REG_ERROR_HANDLING_MEMORY), IGU_FIFO_ELEMENT_DWORDS, true);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4773
fifo_has_data = ecore_rd(p_hwfn, p_ptt, IGU_REG_ERROR_HANDLING_DATA_VALID) > 0;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4794
static enum dbg_status ecore_protection_override_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4805
offset += ecore_dump_common_global_params(p_hwfn, p_ptt, dump_buf + offset, dump, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4817
override_window_dwords = ecore_rd(p_hwfn, p_ptt, GRC_REG_NUMBER_VALID_OVERRIDE_WINDOW) * PROTECTION_OVERRIDE_ELEMENT_DWORDS;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4818
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, true, BYTES_TO_DWORDS(GRC_REG_PROTECTION_OVERRIDE_WINDOW), override_window_dwords, true);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4836
static u32 ecore_fw_asserts_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4841
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4849
offset += ecore_dump_common_global_params(p_hwfn, p_ptt, dump_buf + offset, dump, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4861
ecore_read_fw_info(p_hwfn, p_ptt, storm_id, &fw_info);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4880
next_list_idx = ecore_rd(p_hwfn, p_ptt, next_list_idx_addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4884
offset += ecore_grc_dump_addr_range(p_hwfn, p_ptt, dump_buf + offset, dump, addr, asserts->list_element_dword_size, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4924
enum chip_ids ecore_dbg_get_chip_id(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4926
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4931
enum dbg_status ecore_dbg_bus_reset(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4938
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4941
status = ecore_dbg_dev_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4945
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_reset: one_shot_en = %d, force_hw_dwords = %d, unify_inputs = %d, grc_input_en = %d\n", one_shot_en, force_hw_dwords, unify_inputs, grc_input_en);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4952
if (ecore_rd(p_hwfn, p_ptt, DBG_REG_DBG_BLOCK_ON))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4956
ecore_update_blocks_reset_state(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4959
status = ecore_bus_disable_inputs(p_hwfn, p_ptt, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4964
ecore_bus_reset_dbg_block(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4967
ecore_wr(p_hwfn, p_ptt, DBG_REG_FULL_MODE, one_shot_en ? 0 : 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4986
enum dbg_status ecore_dbg_bus_set_pci_output(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4990
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
4994
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_set_pci_output: buf_size_kb = %d\n", buf_size_kb);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5006
pci_buf = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev, &pci_buf_phys_addr, dev_data->bus.pci_buf.size);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5015
ecore_wr(p_hwfn, p_ptt, DBG_REG_PCI_EXT_BUFFER_STRT_ADDR_LSB, dev_data->bus.pci_buf.phys_addr.lo);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5016
ecore_wr(p_hwfn, p_ptt, DBG_REG_PCI_EXT_BUFFER_STRT_ADDR_MSB, dev_data->bus.pci_buf.phys_addr.hi);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5017
ecore_wr(p_hwfn, p_ptt, DBG_REG_TARGET_PACKET_SIZE, PCI_PKT_SIZE_IN_CHUNKS);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5018
ecore_wr(p_hwfn, p_ptt, DBG_REG_PCI_EXT_BUFFER_SIZE, dev_data->bus.pci_buf.size / PCI_PKT_SIZE_IN_BYTES);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5019
ecore_wr(p_hwfn, p_ptt, DBG_REG_PCI_FUNC_NUM, OPAQUE_FID(p_hwfn->rel_pf_id));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5020
ecore_wr(p_hwfn, p_ptt, DBG_REG_PCI_LOGIC_ADDR, PCI_PHYS_ADDR_TYPE);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5021
ecore_wr(p_hwfn, p_ptt, DBG_REG_PCI_REQ_CREDIT, PCI_REQ_CREDIT);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5022
ecore_wr(p_hwfn, p_ptt, DBG_REG_DEBUG_TARGET, DBG_BUS_TARGET_ID_PCI);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5023
ecore_wr(p_hwfn, p_ptt, DBG_REG_OUTPUT_ENABLE, TARGET_EN_MASK_PCI);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5028
enum dbg_status ecore_dbg_bus_set_nw_output(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5037
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5039
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_set_nw_output: port_id = %d, dest_addr_lo32 = 0x%x, dest_addr_hi16 = 0x%x, data_limit_size_kb = %d, send_to_other_engine = %d, rcv_from_other_engine = %d\n", port_id, dest_addr_lo32, dest_addr_hi16, data_limit_size_kb, send_to_other_engine, rcv_from_other_engine);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5051
ecore_wr(p_hwfn, p_ptt, DBG_REG_OUTPUT_ENABLE, TARGET_EN_MASK_NIG);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5052
ecore_wr(p_hwfn, p_ptt, DBG_REG_DEBUG_TARGET, DBG_BUS_TARGET_ID_NIG);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5055
ecore_wr(p_hwfn, p_ptt, DBG_REG_OTHER_ENGINE_MODE_BB_K2, DBG_BUS_OTHER_ENGINE_MODE_CROSS_ENGINE_TX);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5057
ecore_wr(p_hwfn, p_ptt, NIG_REG_DEBUG_PORT, port_id);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5060
ecore_wr(p_hwfn, p_ptt, DBG_REG_OTHER_ENGINE_MODE_BB_K2, DBG_BUS_OTHER_ENGINE_MODE_CROSS_ENGINE_RX);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5064
ecore_wr(p_hwfn, p_ptt, DBG_REG_ETHERNET_HDR_WIDTH, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5065
ecore_wr(p_hwfn, p_ptt, DBG_REG_ETHERNET_HDR_7, dest_addr_lo32);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5066
ecore_wr(p_hwfn, p_ptt, DBG_REG_ETHERNET_HDR_6, (u32)SRC_MAC_ADDR_LO16 | ((u32)dest_addr_hi16 << 16));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5067
ecore_wr(p_hwfn, p_ptt, DBG_REG_ETHERNET_HDR_5, SRC_MAC_ADDR_HI32);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5068
ecore_wr(p_hwfn, p_ptt, DBG_REG_ETHERNET_HDR_4, (u32)ETH_TYPE << 16);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5069
ecore_wr(p_hwfn, p_ptt, DBG_REG_TARGET_PACKET_SIZE, NIG_PKT_SIZE_IN_CHUNKS);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5071
ecore_wr(p_hwfn, p_ptt, DBG_REG_NIG_DATA_LIMIT_SIZE, (data_limit_size_kb * 1024) / CHUNK_SIZE_IN_BYTES);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5077
static bool ecore_is_overlapping_enable_mask(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5081
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5106
enum dbg_status ecore_dbg_bus_enable_block(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5114
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5120
block_desc = get_dbg_bus_block_desc(p_hwfn, block_id);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5122
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_enable_block: block = %d, line_num = %d, enable_mask = 0x%x, right_shift = %d, force_valid_mask = 0x%x, force_frame_mask = 0x%x\n", block_id, line_num, enable_mask, right_shift, force_valid_mask, force_frame_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5140
if (!dev_data->bus.unify_inputs && ecore_is_overlapping_enable_mask(p_hwfn, enable_mask, right_shift))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5154
enum dbg_status ecore_dbg_bus_enable_storm(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5158
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5163
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_enable_storm: storm = %d, storm_mode = %d\n", storm_id, storm_mode);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5193
enum dbg_status ecore_dbg_bus_enable_timestamp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5199
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5201
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_enable_timestamp: valid_mask = 0x%x, frame_mask = 0x%x, tick_len = %d\n", valid_mask, frame_mask, tick_len);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5207
if (!dev_data->bus.unify_inputs && ecore_is_overlapping_enable_mask(p_hwfn, 0x1, 0))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5215
ecore_wr(p_hwfn, p_ptt, DBG_REG_TIMESTAMP_VALID_EN, valid_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5216
ecore_wr(p_hwfn, p_ptt, DBG_REG_TIMESTAMP_FRAME_EN, frame_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5217
ecore_wr(p_hwfn, p_ptt, DBG_REG_TIMESTAMP_TICK, tick_len);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5222
enum dbg_status ecore_dbg_bus_add_eid_range_sem_filter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5227
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5232
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_add_eid_range_sem_filter: storm = %d, min_eid = 0x%x, max_eid = 0x%x\n", storm_id, min_eid, max_eid);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5249
enum dbg_status ecore_dbg_bus_add_eid_mask_sem_filter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5254
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5259
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_add_eid_mask_sem_filter: storm = %d, eid_val = 0x%x, eid_mask = 0x%x\n", storm_id, eid_val, eid_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5274
enum dbg_status ecore_dbg_bus_add_cid_sem_filter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5278
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5283
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_add_cid_sem_filter: storm = %d, cid = 0x%x\n", storm_id, cid);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5296
enum dbg_status ecore_dbg_bus_enable_filter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5301
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5303
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_enable_filter: block = %d, const_msg_len = %d\n", block_id, const_msg_len);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5321
ecore_wr(p_hwfn, p_ptt, DBG_REG_FILTER_ID_NUM, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5322
ecore_wr(p_hwfn, p_ptt, DBG_REG_FILTER_MSG_LENGTH_ENABLE, const_msg_len > 0 ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5324
ecore_wr(p_hwfn, p_ptt, DBG_REG_FILTER_MSG_LENGTH, const_msg_len - 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5329
enum dbg_status ecore_dbg_bus_enable_trigger(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5338
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5343
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_enable_trigger: rec_pre_trigger = %d, pre_chunks = %d, rec_post_trigger = %d, post_cycles = %d, filter_pre_trigger = %d, filter_post_trigger = %d\n", rec_pre_trigger, pre_chunks, rec_post_trigger, post_cycles, filter_pre_trigger, filter_post_trigger);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5358
ecore_wr(p_hwfn, p_ptt, DBG_REG_RCRD_ON_WINDOW_PRE_NUM_CHUNKS, pre_chunks);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5366
ecore_wr(p_hwfn, p_ptt, DBG_REG_RCRD_ON_WINDOW_POST_NUM_CYCLES, post_cycles ? post_cycles : 0xffffffff);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5372
ecore_wr(p_hwfn, p_ptt, DBG_REG_RCRD_ON_WINDOW_PRE_TRGR_EVNT_MODE, pre_trigger_type);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5373
ecore_wr(p_hwfn, p_ptt, DBG_REG_RCRD_ON_WINDOW_POST_TRGR_EVNT_MODE, post_trigger_type);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5374
ecore_wr(p_hwfn, p_ptt, DBG_REG_TRIGGER_ENABLE, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5379
enum dbg_status ecore_dbg_bus_add_trigger_state(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5385
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5390
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_add_trigger_state: block = %d, const_msg_len = %d, count_to_next = %d\n", block_id, const_msg_len, count_to_next);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5415
ecore_wr(p_hwfn, p_ptt, DBG_REG_TRIGGER_STATE_MSG_LENGTH_ENABLE_0 + reg_offset, const_msg_len > 0 ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5417
ecore_wr(p_hwfn, p_ptt, DBG_REG_TRIGGER_STATE_MSG_LENGTH_0 + reg_offset, const_msg_len - 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5421
ecore_wr(p_hwfn, p_ptt, DBG_REG_TRIGGER_STATE_SET_COUNT_0 + reg_offset, count_to_next);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5426
ecore_wr(p_hwfn, p_ptt, DBG_REG_TRIGGER_STATE_SET_NXT_STATE_0 + reg_offset, MAX_TRIGGER_STATES);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5429
ecore_wr(p_hwfn, p_ptt, DBG_REG_TRIGGER_STATE_SET_NXT_STATE_0 + reg_offset, bus->next_trigger_state);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5437
enum dbg_status ecore_dbg_bus_add_constraint(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5448
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5452
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_add_constraint: op = %d, data_val = 0x%x, data_mask = 0x%x, compare_frame = %d, frame_bit = %d, cycle_offset = %d, dword_offset_in_cycle = %d, is_mandatory = %d\n", constraint_op, data_val, data_mask, compare_frame, frame_bit, cycle_offset, dword_offset_in_cycle, is_mandatory);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5503
ecore_bus_set_constraint(p_hwfn, p_ptt, dev_data->bus.adding_filter ? 1 : 0,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5518
ecore_bus_set_constraint(p_hwfn, p_ptt, bus->adding_filter ? 1 : 0,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5529
static void ecore_config_dbg_block_client_mask(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5532
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5565
ecore_bus_enable_clients(p_hwfn, p_ptt, client_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5569
static enum dbg_status ecore_config_dbg_block_framing_mode(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5572
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5590
line_desc = get_dbg_bus_line_desc(p_hwfn, (enum block_id)block_id);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5612
ecore_bus_set_framing_mode(p_hwfn, p_ptt, dbg_framing_mode);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5618
static enum dbg_status ecore_config_storm_inputs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5621
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5631
if (storm_bus->enabled && !ecore_rd(p_hwfn, p_ptt, storm->sem_sync_dbg_empty_addr))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5642
ecore_wr(p_hwfn, p_ptt, DBG_REG_STORM_ID_NUM, storm_id_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5645
ecore_wr(p_hwfn, p_ptt, DBG_REG_NO_GRANT_ON_FULL, (dev_data->bus.target == DBG_BUS_TARGET_ID_INT_BUF && bus->one_shot_en) ? 0 : 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5653
ecore_wr(p_hwfn, p_ptt, DBG_REG_CALENDAR_SLOT0 + DWORDS_TO_BYTES(i), next_storm_id);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5667
static void ecore_assign_hw_ids(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5670
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5726
static void ecore_config_block_inputs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5729
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5734
ecore_assign_hw_ids(p_hwfn, hw_ids);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5743
ecore_wr(p_hwfn, p_ptt, DBG_REG_TRIGGER_STATE_ID_0 + state_id * BYTES_IN_DWORD, hw_ids[val_id]);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5754
ecore_wr(p_hwfn, p_ptt, DBG_REG_HW_ID_NUM, bus->hw_id_mask);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5760
ecore_wr(p_hwfn, p_ptt, PCIE_REG_DBG_REPEAT_THRESHOLD_COUNT_K2_E5, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5761
ecore_wr(p_hwfn, p_ptt, PCIE_REG_DBG_FW_TRIGGER_ENABLE_K2_E5, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5765
enum dbg_status ecore_dbg_bus_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5768
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5775
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_start\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5791
if ((status = ecore_config_dbg_block_framing_mode(p_hwfn, p_ptt)) != DBG_STATUS_OK)
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5796
if ((status = ecore_config_storm_inputs(p_hwfn, p_ptt)) != DBG_STATUS_OK)
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5801
ecore_config_block_inputs(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5818
ecore_wr(p_hwfn, p_ptt, DBG_REG_FILTER_ENABLE, filter_type);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5821
ecore_wr(p_hwfn, p_ptt, DBG_REG_TIMESTAMP, 0);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5824
ecore_bus_enable_dbg_block(p_hwfn, p_ptt, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5834
ecore_config_dbg_line(p_hwfn, p_ptt, (enum block_id)block_id,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5844
ecore_config_dbg_block_client_mask(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5852
ecore_bus_enable_storm(p_hwfn, p_ptt, (enum dbg_storms)storm_id);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5859
enum dbg_status ecore_dbg_bus_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5862
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5866
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_stop\n");
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5871
status = ecore_bus_disable_inputs(p_hwfn, p_ptt, true);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5875
ecore_wr(p_hwfn, p_ptt, DBG_REG_CPU_TIMEOUT, 1);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5879
ecore_bus_enable_dbg_block(p_hwfn, p_ptt, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5883
u32 trigger_state = ecore_rd(p_hwfn, p_ptt, DBG_REG_TRIGGER_STATUS_CUR_STATE);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5894
enum dbg_status ecore_dbg_bus_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5898
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5902
status = ecore_dbg_dev_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5910
*buf_size = (u32)ecore_bus_dump_hdr(p_hwfn, p_ptt, OSAL_NULL, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5927
enum dbg_status ecore_dbg_bus_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5933
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5941
status = ecore_dbg_bus_get_dump_buf_size(p_hwfn, p_ptt, &min_buf_size_in_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5945
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_bus_dump: dump_buf = 0x%p, buf_size_in_dwords = %d\n", dump_buf, buf_size_in_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5951
enum dbg_status stop_state = ecore_dbg_bus_stop(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5963
offset += ecore_bus_dump_hdr(p_hwfn, p_ptt, dump_buf + offset, true);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5967
u32 recorded_dwords = ecore_bus_dump_data(p_hwfn, p_ptt, dump_buf + offset, true);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
5980
ecore_bus_free_pci_buf(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6003
enum dbg_status ecore_dbg_grc_config(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6009
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "dbg_grc_config: paramId = %d, val = %d\n", grc_param, val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6014
ecore_dbg_grc_init_params(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6042
ecore_grc_set_param(p_hwfn, (enum dbg_grc_params)i, preset_val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6047
ecore_grc_set_param(p_hwfn, grc_param, val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6054
void ecore_dbg_grc_set_params_default(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6056
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6063
enum dbg_status ecore_dbg_grc_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6067
enum dbg_status status = ecore_dbg_dev_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6078
return ecore_grc_dump(p_hwfn, p_ptt, OSAL_NULL, false, buf_size);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6081
enum dbg_status ecore_dbg_grc_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6092
status = ecore_dbg_grc_get_dump_buf_size(p_hwfn, p_ptt, &needed_buf_size_in_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6103
status = ecore_grc_dump(p_hwfn, p_ptt, dump_buf, true, num_dumped_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6106
ecore_dbg_grc_set_params_default(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6111
enum dbg_status ecore_dbg_idle_chk_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6115
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6121
status = ecore_dbg_dev_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6130
idle_chk->buf_size = ecore_idle_chk_dump(p_hwfn, p_ptt, OSAL_NULL, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6139
enum dbg_status ecore_dbg_idle_chk_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6150
status = ecore_dbg_idle_chk_get_dump_buf_size(p_hwfn, p_ptt, &needed_buf_size_in_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6158
ecore_update_blocks_reset_state(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6161
*num_dumped_dwords = ecore_idle_chk_dump(p_hwfn, p_ptt, dump_buf, true);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6164
ecore_dbg_grc_set_params_default(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6169
enum dbg_status ecore_dbg_mcp_trace_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6173
enum dbg_status status = ecore_dbg_dev_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6180
return ecore_mcp_trace_dump(p_hwfn, p_ptt, OSAL_NULL, false, buf_size);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6183
enum dbg_status ecore_dbg_mcp_trace_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6192
status = ecore_dbg_mcp_trace_get_dump_buf_size(p_hwfn, p_ptt, &needed_buf_size_in_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6200
ecore_update_blocks_reset_state(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6203
status = ecore_mcp_trace_dump(p_hwfn, p_ptt, dump_buf, true, num_dumped_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6206
ecore_dbg_grc_set_params_default(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6211
enum dbg_status ecore_dbg_reg_fifo_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6215
enum dbg_status status = ecore_dbg_dev_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6222
return ecore_reg_fifo_dump(p_hwfn, p_ptt, OSAL_NULL, false, buf_size);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6225
enum dbg_status ecore_dbg_reg_fifo_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6236
status = ecore_dbg_reg_fifo_get_dump_buf_size(p_hwfn, p_ptt, &needed_buf_size_in_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6244
ecore_update_blocks_reset_state(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6246
status = ecore_reg_fifo_dump(p_hwfn, p_ptt, dump_buf, true, num_dumped_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6249
ecore_dbg_grc_set_params_default(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6254
enum dbg_status ecore_dbg_igu_fifo_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6258
enum dbg_status status = ecore_dbg_dev_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6265
return ecore_igu_fifo_dump(p_hwfn, p_ptt, OSAL_NULL, false, buf_size);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6268
enum dbg_status ecore_dbg_igu_fifo_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6279
status = ecore_dbg_igu_fifo_get_dump_buf_size(p_hwfn, p_ptt, &needed_buf_size_in_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6287
ecore_update_blocks_reset_state(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6289
status = ecore_igu_fifo_dump(p_hwfn, p_ptt, dump_buf, true, num_dumped_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6292
ecore_dbg_grc_set_params_default(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6297
enum dbg_status ecore_dbg_protection_override_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6301
enum dbg_status status = ecore_dbg_dev_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6308
return ecore_protection_override_dump(p_hwfn, p_ptt, OSAL_NULL, false, buf_size);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6311
enum dbg_status ecore_dbg_protection_override_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6322
status = ecore_dbg_protection_override_get_dump_buf_size(p_hwfn, p_ptt, &needed_buf_size_in_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6330
ecore_update_blocks_reset_state(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6332
status = ecore_protection_override_dump(p_hwfn, p_ptt, dump_buf, true, num_dumped_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6335
ecore_dbg_grc_set_params_default(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6340
enum dbg_status ecore_dbg_fw_asserts_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6344
enum dbg_status status = ecore_dbg_dev_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6352
ecore_update_blocks_reset_state(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6354
*buf_size = ecore_fw_asserts_dump(p_hwfn, p_ptt, OSAL_NULL, false);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6359
enum dbg_status ecore_dbg_fw_asserts_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6370
status = ecore_dbg_fw_asserts_get_dump_buf_size(p_hwfn, p_ptt, &needed_buf_size_in_dwords);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6377
*num_dumped_dwords = ecore_fw_asserts_dump(p_hwfn, p_ptt, dump_buf, true);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6380
ecore_dbg_grc_set_params_default(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6385
enum dbg_status ecore_dbg_read_attn(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6392
enum dbg_status status = ecore_dbg_dev_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6414
if (eval_mode && !ecore_is_mode_match(p_hwfn, &modes_buf_offset))
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6419
sts_val = ecore_rd(p_hwfn, p_ptt, sts_addr);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6429
reg_result->mask_val = ecore_rd(p_hwfn, p_ptt, DWORDS_TO_BYTES(reg_data->mask_address));
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6441
enum dbg_status ecore_dbg_print_attn(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6458
DP_NOTICE(p_hwfn, false, "%s: address 0x%08x, status 0x%08x, mask 0x%08x\n", attn_type_str, sts_addr, reg_result->sts_val, reg_result->mask_val);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6464
bool ecore_is_block_in_reset(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6468
struct dbg_tools_data *dev_data = &p_hwfn->dbg_info;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c
6478
!(ecore_rd(p_hwfn, p_ptt, s_reset_regs_defs[reset_reg].addr) & (1 << block->reset_bit_offset)) : true;
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
114
enum dbg_status ecore_dbg_bus_reset(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
137
enum dbg_status ecore_dbg_bus_set_pci_output(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
177
enum dbg_status ecore_dbg_bus_set_nw_output(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
213
enum dbg_status ecore_dbg_bus_enable_block(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
237
enum dbg_status ecore_dbg_bus_enable_storm(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
263
enum dbg_status ecore_dbg_bus_enable_timestamp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
283
enum dbg_status ecore_dbg_bus_add_eid_range_sem_filter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
301
enum dbg_status ecore_dbg_bus_add_eid_mask_sem_filter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
318
enum dbg_status ecore_dbg_bus_add_cid_sem_filter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
344
enum dbg_status ecore_dbg_bus_enable_filter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
384
enum dbg_status ecore_dbg_bus_enable_trigger(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
419
enum dbg_status ecore_dbg_bus_add_trigger_state(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
470
enum dbg_status ecore_dbg_bus_add_constraint(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
492
enum dbg_status ecore_dbg_bus_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
504
enum dbg_status ecore_dbg_bus_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
523
enum dbg_status ecore_dbg_bus_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
545
enum dbg_status ecore_dbg_bus_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
563
enum dbg_status ecore_dbg_grc_config(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
573
void ecore_dbg_grc_set_params_default(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
587
enum dbg_status ecore_dbg_grc_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
605
enum dbg_status ecore_dbg_grc_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
623
enum dbg_status ecore_dbg_idle_chk_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
642
enum dbg_status ecore_dbg_idle_chk_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
663
enum dbg_status ecore_dbg_mcp_trace_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
67
enum chip_ids ecore_dbg_get_chip_id(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
686
enum dbg_status ecore_dbg_mcp_trace_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
704
enum dbg_status ecore_dbg_reg_fifo_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
724
enum dbg_status ecore_dbg_reg_fifo_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
742
enum dbg_status ecore_dbg_igu_fifo_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
762
enum dbg_status ecore_dbg_igu_fifo_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
78
void ecore_read_regs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
781
enum dbg_status ecore_dbg_protection_override_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
801
enum dbg_status ecore_dbg_protection_override_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
819
enum dbg_status ecore_dbg_fw_asserts_get_dump_buf_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
838
enum dbg_status ecore_dbg_fw_asserts_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
859
enum dbg_status ecore_dbg_read_attn(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
877
enum dbg_status ecore_dbg_print_attn(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h
890
bool ecore_is_block_in_reset(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1003
ecore_dcbx_get_dscp_params(p_hwfn, &p_hwfn->p_dcbx_info->get);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1005
rc = ecore_dcbx_process_mib_info(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1010
ecore_qm_reconf(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1013
ecore_sp_pf_update_dcbx(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1019
if (ECORE_IS_ROCE_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1020
ecore_roce_dpm_dcbx(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1025
ecore_dcbx_get_params(p_hwfn, &p_hwfn->p_dcbx_info->get, type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1032
if (p_hwfn->p_dcbx_info->dscp_nig_update) {
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1033
u8 val = !!p_hwfn->p_dcbx_info->get.dscp.enabled;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1036
rc = ecore_all_ppfids_wr(p_hwfn, p_ptt, addr, val);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1038
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1043
p_hwfn->p_dcbx_info->dscp_nig_update = false;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1049
p_data = &p_hwfn->p_dcbx_info->results;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1054
ecore_wr(p_hwfn, p_ptt, NIG_REG_TX_EDPM_CTRL, val);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1057
OSAL_DCBX_AEN(p_hwfn, type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1062
enum _ecore_status_t ecore_dcbx_info_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1073
p_hwfn->p_dcbx_info = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1074
sizeof(*p_hwfn->p_dcbx_info));
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1075
if (!p_hwfn->p_dcbx_info) {
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1076
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1081
p_hwfn->p_dcbx_info->iwarp_port =
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1082
p_hwfn->pf_params.rdma_pf_params.iwarp_port;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1087
void ecore_dcbx_info_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1089
OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_dcbx_info);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1090
p_hwfn->p_dcbx_info = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1143
enum _ecore_status_t ecore_dcbx_query_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1150
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1153
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1157
rc = ecore_dcbx_read_mib(p_hwfn, p_ptt, type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1161
ecore_dcbx_get_dscp_params(p_hwfn, p_get);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1163
rc = ecore_dcbx_get_params(p_hwfn, p_get, type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1166
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1171
ecore_dcbx_set_pfc_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1198
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "pfc = 0x%x\n", *pfc);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1202
ecore_dcbx_set_ets_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1245
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1253
ecore_dcbx_set_app_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1322
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "flags = 0x%x\n", p_app->flags);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1326
ecore_dcbx_set_local_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1334
&p_hwfn->p_dcbx_info->operational.features,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1343
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "Dcbx version = %d\n",
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1347
ecore_dcbx_set_pfc_data(p_hwfn, &local_admin->features.pfc,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1351
ecore_dcbx_set_ets_data(p_hwfn, &local_admin->features.ets,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1355
ecore_dcbx_set_app_data(p_hwfn, &local_admin->features.app,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1360
ecore_dcbx_set_dscp_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1367
OSAL_MEMCPY(p_dscp_map, &p_hwfn->p_dcbx_info->dscp_map,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1383
p_hwfn->p_dcbx_info->dscp_nig_update = true;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1385
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "flags = 0x%x\n", p_dscp_map->flags);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1386
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1396
enum _ecore_status_t ecore_dcbx_config_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1407
OSAL_MEMCPY(&p_hwfn->p_dcbx_info->set, params,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1408
sizeof(p_hwfn->p_dcbx_info->set));
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1413
ecore_dcbx_set_local_params(p_hwfn, &local_admin, params);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1415
data.addr = p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1419
ecore_memcpy_to(p_hwfn, p_ptt, data.addr, data.local_admin, data.size);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1423
ecore_dcbx_set_dscp_params(p_hwfn, &dscp_map, params);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1425
data.addr = p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1429
ecore_memcpy_to(p_hwfn, p_ptt, data.addr, data.dscp_map,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1433
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_SET_DCBX,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1436
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1442
enum _ecore_status_t ecore_dcbx_get_config_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1448
if (p_hwfn->p_dcbx_info->set.config.valid) {
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1449
OSAL_MEMCPY(params, &p_hwfn->p_dcbx_info->set,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1454
dcbx_info = OSAL_ALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1460
rc = ecore_dcbx_query_params(p_hwfn, dcbx_info,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1463
OSAL_FREE(p_hwfn->p_dev, dcbx_info);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1466
p_hwfn->p_dcbx_info->set.override_flags = 0;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1468
p_hwfn->p_dcbx_info->set.ver_num = DCBX_CONFIG_VERSION_DISABLED;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1470
p_hwfn->p_dcbx_info->set.ver_num |= DCBX_CONFIG_VERSION_CEE;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1472
p_hwfn->p_dcbx_info->set.ver_num |= DCBX_CONFIG_VERSION_IEEE;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1474
p_hwfn->p_dcbx_info->set.ver_num |= DCBX_CONFIG_VERSION_STATIC;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1476
p_hwfn->p_dcbx_info->set.enabled = dcbx_info->operational.enabled;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1477
OSAL_MEMCPY(&p_hwfn->p_dcbx_info->set.dscp,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1478
&p_hwfn->p_dcbx_info->get.dscp,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1480
OSAL_MEMCPY(&p_hwfn->p_dcbx_info->set.config.params,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1482
sizeof(p_hwfn->p_dcbx_info->set.config.params));
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1483
p_hwfn->p_dcbx_info->set.config.valid = true;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1485
OSAL_MEMCPY(params, &p_hwfn->p_dcbx_info->set,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1488
OSAL_FREE(p_hwfn->p_dev, dcbx_info);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1493
enum _ecore_status_t ecore_lldp_register_tlv(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1512
DP_ERR(p_hwfn, "Invalid agent type %d\n", agent);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1519
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_REGISTER_LLDP_TLVS_RX,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1522
DP_NOTICE(p_hwfn, false, "Failed to register TLV\n");
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1528
ecore_lldp_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1537
data.addr = p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1541
rc = ecore_dcbx_copy_mib(p_hwfn, p_ptt, &data,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1544
DP_NOTICE(p_hwfn, false, "Failed to read lldp TLVs\n");
sys/dev/qlnx/qlnxe/ecore_dcbx.c
155
static bool ecore_dcbx_iwarp_tlv(struct ecore_hwfn *p_hwfn, u32 app_info_bitmap,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1555
OSAL_LLDP_RX_TLVS(p_hwfn, tlvs.tlvs_buffer, tlvs.length);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1562
ecore_lldp_get_params(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1580
DP_ERR(p_hwfn, "Invalid agent type %d\n", p_params->agent);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1584
addr = p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1587
ecore_memcpy_from(p_hwfn, p_ptt, &lldp_params, addr,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
160
if (!p_hwfn->p_dcbx_info->iwarp_port)
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1616
ecore_lldp_set_params(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1636
DP_ERR(p_hwfn, "Invalid agent type %d\n", p_params->agent);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1641
addr = p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1667
ecore_memcpy_to(p_hwfn, p_ptt, addr, &lldp_params, sizeof(lldp_params));
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1669
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_SET_LLDP,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1672
DP_NOTICE(p_hwfn, false, "SET_LLDP failed, error = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1678
ecore_lldp_set_system_tlvs(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
169
return !!(port && (proto_id == p_hwfn->p_dcbx_info->iwarp_port));
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1701
addr = p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1703
ecore_memcpy_to(p_hwfn, p_ptt, addr, &lld_tlv_buf, sizeof(lld_tlv_buf));
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1706
addr = p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1708
ecore_memcpy_to(p_hwfn, p_ptt, addr, &p_params->buf[len],
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1712
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_SET_LLDP,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1715
DP_NOTICE(p_hwfn, false, "SET_LLDP failed, error = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1721
ecore_dcbx_get_dscp_priority(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1728
DP_ERR(p_hwfn, "Invalid dscp index %d\n", dscp_index);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
173
ecore_dcbx_dp_protocol(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1732
p_dcbx_info = OSAL_ALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1738
rc = ecore_dcbx_query_params(p_hwfn, p_dcbx_info,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1741
OSAL_FREE(p_hwfn->p_dev, p_dcbx_info);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1746
OSAL_FREE(p_hwfn->p_dev, p_dcbx_info);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1752
ecore_dcbx_set_dscp_priority(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1760
DP_ERR(p_hwfn, "Invalid dscp params: index = %d pri = %d\n",
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1766
rc = ecore_dcbx_get_config_params(p_hwfn, &dcbx_set);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1773
return ecore_dcbx_config_params(p_hwfn, p_ptt, &dcbx_set, 1);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1777
ecore_lldp_get_stats(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
179
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "DCBX negotiated: %d\n",
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1795
DP_ERR(p_hwfn, "Invalid agent type %d\n", p_params->agent);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1799
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_GET_LLDP_STATS,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1803
DP_ERR(p_hwfn, "GET_LLDP_STATS failed, error = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1807
addr = p_hwfn->mcp_info->drv_mb_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
1810
ecore_memcpy_from(p_hwfn, p_ptt, &lldp_stats, addr, sizeof(lldp_stats));
sys/dev/qlnx/qlnxe/ecore_dcbx.c
185
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
189
p_data->arr[id].tc, p_hwfn->hw_info.num_active_tc,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
195
u8 ecore_dcbx_get_dscp_value(struct ecore_hwfn *p_hwfn, u8 pri)
sys/dev/qlnx/qlnxe/ecore_dcbx.c
197
struct ecore_dcbx_dscp_params *dscp = &p_hwfn->p_dcbx_info->get.dscp;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
212
struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
221
p_data->arr[type].dscp_val = ecore_dcbx_get_dscp_value(p_hwfn, prio);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
231
if (OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits))
sys/dev/qlnx/qlnxe/ecore_dcbx.c
235
if (p_hwfn->hw_info.personality == personality)
sys/dev/qlnx/qlnxe/ecore_dcbx.c
236
p_hwfn->hw_info.offload_tc = tc;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
239
if (OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits) &&
sys/dev/qlnx/qlnxe/ecore_dcbx.c
241
ecore_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 1);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
242
ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_PCP_BB_K2, prio << 1);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
249
struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
265
ecore_dcbx_set_params(p_data, p_hwfn, p_ptt, enable,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
300
ecore_dcbx_get_app_protocol_type(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
314
} else if (ecore_dcbx_iwarp_tlv(p_hwfn, app_prio_bitmap, id, ieee)) {
sys/dev/qlnx/qlnxe/ecore_dcbx.c
318
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
331
ecore_dcbx_process_tlv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
344
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
355
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "Id = 0x%x pri_map = %u\n",
sys/dev/qlnx/qlnxe/ecore_dcbx.c
359
DP_ERR(p_hwfn, "Invalid priority\n");
sys/dev/qlnx/qlnxe/ecore_dcbx.c
364
if (ecore_dcbx_get_app_protocol_type(p_hwfn, p_tbl[i].entry,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
379
ecore_dcbx_update_app_info(p_data, p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
386
&p_hwfn->p_dev->mf_bits) && !eth_tlv)
sys/dev/qlnx/qlnxe/ecore_dcbx.c
387
p_data->arr[DCBX_PROTOCOL_ETH].tc = p_hwfn->ufp_info.tc;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
402
ecore_dcbx_update_app_info(p_data, p_hwfn, p_ptt, false,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
413
ecore_dcbx_process_mib_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_dcbx.c
425
flags = p_hwfn->p_dcbx_info->operational.flags;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
428
p_app = &p_hwfn->p_dcbx_info->operational.features.app;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
431
p_ets = &p_hwfn->p_dcbx_info->operational.features.ets;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
434
p_info = &p_hwfn->hw_info;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
437
rc = ecore_dcbx_process_tlv(p_hwfn, p_ptt, &data, p_tbl, pri_tc_tbl,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
443
p_hwfn->qm_info.ooo_tc = GET_MFW_FIELD(p_ets->flags, DCBX_OOO_TC);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
444
data.pf_id = p_hwfn->rel_pf_id;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
447
ecore_dcbx_dp_protocol(p_hwfn, &data);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
449
OSAL_MEMCPY(&p_hwfn->p_dcbx_info->results, &data,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
456
ecore_dcbx_copy_mib(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
470
ecore_memcpy_from(p_hwfn, p_ptt, p_data->lldp_remote,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
475
ecore_memcpy_from(p_hwfn, p_ptt, p_data->lldp_tlvs,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
481
ecore_memcpy_from(p_hwfn, p_ptt, p_data->mib,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
488
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
495
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
505
ecore_dcbx_get_priority_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
538
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
545
ecore_dcbx_get_app_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
598
ecore_dcbx_get_app_protocol_type(p_hwfn, p_tbl[i].entry,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
603
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
610
ecore_dcbx_get_pfc_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
628
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
635
ecore_dcbx_get_ets_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
646
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
654
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
670
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
678
ecore_dcbx_get_common_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
685
ecore_dcbx_get_app_data(p_hwfn, p_app, p_tbl, p_params, ieee);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
686
ecore_dcbx_get_ets_data(p_hwfn, p_ets, p_params);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
687
ecore_dcbx_get_pfc_data(p_hwfn, pfc, p_params);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
691
ecore_dcbx_get_local_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
696
p_feat = &p_hwfn->p_dcbx_info->local_admin.features;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
697
ecore_dcbx_get_common_params(p_hwfn, &p_feat->app,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
704
ecore_dcbx_get_remote_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
709
p_feat = &p_hwfn->p_dcbx_info->remote.features;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
710
ecore_dcbx_get_common_params(p_hwfn, &p_feat->app,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
717
static void ecore_dcbx_get_dscp_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
726
p_dscp_map = &p_hwfn->p_dcbx_info->dscp_map;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
734
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "elem %d pri_map 0x%x\n",
sys/dev/qlnx/qlnxe/ecore_dcbx.c
743
ecore_dcbx_get_operational_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
753
flags = p_hwfn->p_dcbx_info->operational.flags;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
764
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "Dcbx is disabled\n");
sys/dev/qlnx/qlnxe/ecore_dcbx.c
768
p_feat = &p_hwfn->p_dcbx_info->operational.features;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
769
p_results = &p_hwfn->p_dcbx_info->results;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
783
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
788
ecore_dcbx_get_common_params(p_hwfn, &p_feat->app,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
792
ecore_dcbx_get_priority_info(p_hwfn, &p_operational->app_prio,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
800
static void ecore_dcbx_get_local_lldp_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
805
p_local = &p_hwfn->p_dcbx_info->lldp_local[LLDP_NEAREST_BRIDGE];
sys/dev/qlnx/qlnxe/ecore_dcbx.c
814
static void ecore_dcbx_get_remote_lldp_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
819
p_remote = &p_hwfn->p_dcbx_info->lldp_remote[LLDP_NEAREST_BRIDGE];
sys/dev/qlnx/qlnxe/ecore_dcbx.c
829
ecore_dcbx_get_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
835
ecore_dcbx_get_remote_params(p_hwfn, p_params);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
838
ecore_dcbx_get_local_params(p_hwfn, p_params);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
841
ecore_dcbx_get_operational_params(p_hwfn, p_params);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
844
ecore_dcbx_get_remote_lldp_params(p_hwfn, p_params);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
847
ecore_dcbx_get_local_lldp_params(p_hwfn, p_params);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
850
DP_ERR(p_hwfn, "MIB read err, unknown mib type %d\n", type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
858
ecore_dcbx_read_local_lldp_mib(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
865
data.addr = p_hwfn->mcp_info->port_addr + offsetof(struct public_port,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
867
data.lldp_local = p_hwfn->p_dcbx_info->lldp_local;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
869
ecore_memcpy_from(p_hwfn, p_ptt, data.lldp_local, data.addr, data.size);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
875
ecore_dcbx_read_remote_lldp_mib(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
883
data.addr = p_hwfn->mcp_info->port_addr + offsetof(struct public_port,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
885
data.lldp_remote = p_hwfn->p_dcbx_info->lldp_remote;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
887
rc = ecore_dcbx_copy_mib(p_hwfn, p_ptt, &data, type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
893
ecore_dcbx_read_operational_mib(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
901
data.addr = p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
903
data.mib = &p_hwfn->p_dcbx_info->operational;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
905
rc = ecore_dcbx_copy_mib(p_hwfn, p_ptt, &data, type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
911
ecore_dcbx_read_remote_mib(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
919
data.addr = p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
921
data.mib = &p_hwfn->p_dcbx_info->remote;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
923
rc = ecore_dcbx_copy_mib(p_hwfn, p_ptt, &data, type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
929
ecore_dcbx_read_local_mib(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_dcbx.c
935
data.addr = p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
937
data.local_admin = &p_hwfn->p_dcbx_info->local_admin;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
939
ecore_memcpy_from(p_hwfn, p_ptt, data.local_admin,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
946
ecore_dcbx_read_dscp_mib(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_dcbx.c
950
data.addr = p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dcbx.c
952
data.dscp_map = &p_hwfn->p_dcbx_info->dscp_map;
sys/dev/qlnx/qlnxe/ecore_dcbx.c
954
ecore_memcpy_from(p_hwfn, p_ptt, data.dscp_map, data.addr, data.size);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
957
static enum _ecore_status_t ecore_dcbx_read_mib(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
965
ecore_dcbx_read_dscp_mib(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
966
rc = ecore_dcbx_read_operational_mib(p_hwfn, p_ptt, type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
969
rc = ecore_dcbx_read_remote_mib(p_hwfn, p_ptt, type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
972
rc = ecore_dcbx_read_local_mib(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
975
rc = ecore_dcbx_read_remote_lldp_mib(p_hwfn, p_ptt, type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
978
rc = ecore_dcbx_read_local_lldp_mib(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
981
DP_ERR(p_hwfn, "MIB read err, unknown mib type %d\n", type);
sys/dev/qlnx/qlnxe/ecore_dcbx.c
993
ecore_dcbx_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx.c
998
rc = ecore_dcbx_read_mib(p_hwfn, p_ptt, type);
sys/dev/qlnx/qlnxe/ecore_dcbx.h
70
ecore_dcbx_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx.h
73
enum _ecore_status_t ecore_dcbx_info_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dcbx.h
74
void ecore_dcbx_info_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dcbx.h
79
u8 ecore_dcbx_get_dscp_value(struct ecore_hwfn *p_hwfn, u8 pri);
sys/dev/qlnx/qlnxe/ecore_dcbx.h
82
ecore_lldp_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt);
sys/dev/qlnx/qlnxe/ecore_dcbx_api.h
232
enum _ecore_status_t ecore_dcbx_query_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx_api.h
236
enum _ecore_status_t ecore_dcbx_get_config_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx_api.h
240
enum _ecore_status_t ecore_dcbx_config_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx_api.h
245
enum _ecore_status_t ecore_lldp_register_tlv(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx_api.h
251
ecore_lldp_get_params(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx_api.h
255
ecore_lldp_set_params(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx_api.h
259
ecore_lldp_set_system_tlvs(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx_api.h
264
ecore_dcbx_get_dscp_priority(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dcbx_api.h
269
ecore_dcbx_set_dscp_priority(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dcbx_api.h
273
ecore_lldp_get_stats(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
1010
ecore_ppfid_wr(p_hwfn, p_ptt, abs_ppfid, addr,
sys/dev/qlnx/qlnxe/ecore_dev.c
1021
rc = ecore_dmae_host2grc(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
1028
rc = ecore_dmae_grc2host(p_hwfn, p_ptt, addr,
sys/dev/qlnx/qlnxe/ecore_dev.c
1039
ecore_ppfid_wr(p_hwfn, p_ptt, abs_ppfid, addr, p_details->mode);
sys/dev/qlnx/qlnxe/ecore_dev.c
1041
p_details->mode = ecore_ppfid_rd(p_hwfn, p_ptt, abs_ppfid,
sys/dev/qlnx/qlnxe/ecore_dev.c
1047
ecore_ppfid_wr(p_hwfn, p_ptt, abs_ppfid, addr,
sys/dev/qlnx/qlnxe/ecore_dev.c
1050
p_details->protocol_type = ecore_ppfid_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
1056
ecore_ppfid_wr(p_hwfn, p_ptt, abs_ppfid, addr,
sys/dev/qlnx/qlnxe/ecore_dev.c
1059
p_details->hdr_sel = ecore_ppfid_rd(p_hwfn, p_ptt, abs_ppfid,
sys/dev/qlnx/qlnxe/ecore_dev.c
106
static void ecore_db_recovery_dp_entry(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
1066
ecore_ppfid_wr(p_hwfn, p_ptt, abs_ppfid, addr,
sys/dev/qlnx/qlnxe/ecore_dev.c
1069
p_details->enable = ecore_ppfid_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
1077
ecore_llh_add_filter_e4(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
1091
return ecore_llh_access_filter_e4(p_hwfn, p_ptt, abs_ppfid, filter_idx,
sys/dev/qlnx/qlnxe/ecore_dev.c
1097
ecore_llh_remove_filter_e4(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
110
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ, "(%s: db_entry %p, addr %p, data %p, width %s, %s space, hwfn %d)\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
1104
return ecore_llh_access_filter_e4(p_hwfn, p_ptt, abs_ppfid, filter_idx,
sys/dev/qlnx/qlnxe/ecore_dev.c
1113
ecore_llh_add_filter_e5(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
1128
ecore_llh_remove_filter_e5(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
1139
ecore_llh_add_filter(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
1143
if (ECORE_IS_E4(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
1144
return ecore_llh_add_filter_e4(p_hwfn, p_ptt, abs_ppfid,
sys/dev/qlnx/qlnxe/ecore_dev.c
1148
return ecore_llh_add_filter_e5(p_hwfn, p_ptt, abs_ppfid,
sys/dev/qlnx/qlnxe/ecore_dev.c
1154
ecore_llh_remove_filter(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
1157
if (ECORE_IS_E4(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
1158
return ecore_llh_remove_filter_e4(p_hwfn, p_ptt, abs_ppfid,
sys/dev/qlnx/qlnxe/ecore_dev.c
1161
return ecore_llh_remove_filter_e5(p_hwfn, p_ptt, abs_ppfid,
sys/dev/qlnx/qlnxe/ecore_dev.c
1168
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
1169
struct ecore_ptt *p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1198
rc = ecore_llh_add_filter(p_hwfn, p_ptt, abs_ppfid, filter_idx,
sys/dev/qlnx/qlnxe/ecore_dev.c
1218
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
1304
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
1305
struct ecore_ptt *p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1346
rc = ecore_llh_add_filter(p_hwfn, p_ptt, abs_ppfid, filter_idx,
sys/dev/qlnx/qlnxe/ecore_dev.c
1359
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
1363
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
1371
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
1372
struct ecore_ptt *p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1397
rc = ecore_llh_remove_filter(p_hwfn, p_ptt, abs_ppfid,
sys/dev/qlnx/qlnxe/ecore_dev.c
1417
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
1425
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
1426
struct ecore_ptt *p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
144
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/ecore_dev.c
1459
rc = ecore_llh_remove_filter(p_hwfn, p_ptt, abs_ppfid,
sys/dev/qlnx/qlnxe/ecore_dev.c
1476
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
148
p_hwfn = db_addr < p_dev->hwfns[1].doorbells ?
sys/dev/qlnx/qlnxe/ecore_dev.c
1481
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
1482
struct ecore_ptt *p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1504
rc = ecore_llh_remove_filter_e4(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
1507
rc = ecore_llh_remove_filter_e5(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
151
p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
1513
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
1528
enum _ecore_status_t ecore_all_ppfids_wr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
153
return p_hwfn;
sys/dev/qlnx/qlnxe/ecore_dev.c
1532
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
1541
ecore_ppfid_wr(p_hwfn, p_ptt, abs_ppfid, addr, val);
sys/dev/qlnx/qlnxe/ecore_dev.c
1548
ecore_llh_dump_ppfid_e4(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
1556
rc = ecore_abs_ppfid(p_hwfn->p_dev, ppfid, &abs_ppfid);
sys/dev/qlnx/qlnxe/ecore_dev.c
1561
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
1563
p_hwfn->rel_pf_id, ppfid, abs_ppfid,
sys/dev/qlnx/qlnxe/ecore_dev.c
1564
ecore_rd(p_hwfn, p_ptt, addr));
sys/dev/qlnx/qlnxe/ecore_dev.c
1569
rc = ecore_llh_access_filter_e4(p_hwfn, p_ptt, abs_ppfid,
sys/dev/qlnx/qlnxe/ecore_dev.c
1575
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
1586
ecore_llh_dump_ppfid_e5(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
1597
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
1598
struct ecore_ptt *p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1605
rc = ecore_llh_dump_ppfid_e4(p_hwfn, p_ptt, ppfid);
sys/dev/qlnx/qlnxe/ecore_dev.c
1607
rc = ecore_llh_dump_ppfid_e5(p_hwfn, p_ptt, ppfid);
sys/dev/qlnx/qlnxe/ecore_dev.c
1609
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
1639
static u32 ecore_hw_bar_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
164
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/ecore_dev.c
1647
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
1648
return ecore_vf_hw_bar_size(p_hwfn, bar_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
1650
val = ecore_rd(p_hwfn, p_ptt, bar_reg);
sys/dev/qlnx/qlnxe/ecore_dev.c
1658
if (ECORE_IS_CMT(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
1659
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
1663
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
1680
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
1682
p_hwfn->dp_level = dp_level;
sys/dev/qlnx/qlnxe/ecore_dev.c
1683
p_hwfn->dp_module = dp_module;
sys/dev/qlnx/qlnxe/ecore_dev.c
1684
p_hwfn->dp_ctx = dp_ctx;
sys/dev/qlnx/qlnxe/ecore_dev.c
1693
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
1695
p_hwfn->p_dev = p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
1696
p_hwfn->my_id = i;
sys/dev/qlnx/qlnxe/ecore_dev.c
1697
p_hwfn->b_active = false;
sys/dev/qlnx/qlnxe/ecore_dev.c
1700
if (OSAL_SPIN_LOCK_ALLOC(p_hwfn, &p_hwfn->dmae_info.lock))
sys/dev/qlnx/qlnxe/ecore_dev.c
1703
OSAL_SPIN_LOCK_INIT(&p_hwfn->dmae_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
1718
struct ecore_hwfn *p_hwfn = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_dev.c
1720
p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
1721
OSAL_SPIN_LOCK_DEALLOC(&p_hwfn->dmae_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
1727
static void ecore_qm_info_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1729
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
1731
OSAL_FREE(p_hwfn->p_dev, qm_info->qm_pq_params);
sys/dev/qlnx/qlnxe/ecore_dev.c
1733
OSAL_FREE(p_hwfn->p_dev, qm_info->qm_vport_params);
sys/dev/qlnx/qlnxe/ecore_dev.c
1735
OSAL_FREE(p_hwfn->p_dev, qm_info->qm_port_params);
sys/dev/qlnx/qlnxe/ecore_dev.c
1737
OSAL_FREE(p_hwfn->p_dev, qm_info->wfq_data);
sys/dev/qlnx/qlnxe/ecore_dev.c
1760
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
1762
ecore_cxt_mngr_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1763
ecore_qm_info_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1764
ecore_spq_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1765
ecore_eq_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1766
ecore_consq_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1767
ecore_int_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1769
ecore_ll2_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
177
p_hwfn = ecore_db_rec_find_hwfn(p_dev, db_addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
1771
if (p_hwfn->hw_info.personality == ECORE_PCI_FCOE)
sys/dev/qlnx/qlnxe/ecore_dev.c
1772
ecore_fcoe_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1774
if (p_hwfn->hw_info.personality == ECORE_PCI_ISCSI) {
sys/dev/qlnx/qlnxe/ecore_dev.c
1775
ecore_iscsi_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1776
ecore_ooo_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1780
if (ECORE_IS_RDMA_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
1781
ecore_rdma_info_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1783
ecore_iov_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1784
ecore_l2_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1785
ecore_dmae_info_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1786
ecore_dcbx_info_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1790
ecore_db_recovery_teardown(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
180
db_entry = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*db_entry));
sys/dev/qlnx/qlnxe/ecore_dev.c
1800
static u32 ecore_get_pq_flags(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1808
if (IS_ECORE_SRIOV(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
1810
if (IS_ECORE_DCQCN(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
1814
switch (p_hwfn->hw_info.personality) {
sys/dev/qlnx/qlnxe/ecore_dev.c
1831
DP_ERR(p_hwfn, "unknown personality %d\n", p_hwfn->hw_info.personality);
sys/dev/qlnx/qlnxe/ecore_dev.c
1839
u8 ecore_init_qm_get_num_tcs(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1841
return p_hwfn->hw_info.num_hw_tc;
sys/dev/qlnx/qlnxe/ecore_dev.c
1844
u16 ecore_init_qm_get_num_vfs(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1846
return IS_ECORE_SRIOV(p_hwfn->p_dev) ? p_hwfn->p_dev->p_iov_info->total_vfs : 0;
sys/dev/qlnx/qlnxe/ecore_dev.c
1851
u16 ecore_init_qm_get_num_pf_rls(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1853
u16 num_pf_rls, num_vfs = ecore_init_qm_get_num_vfs(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1856
num_pf_rls = (u16)OSAL_MIN_T(u32, RESC_NUM(p_hwfn, ECORE_RL),
sys/dev/qlnx/qlnxe/ecore_dev.c
1857
(u16)OSAL_MIN_T(u32, RESC_NUM(p_hwfn, ECORE_VPORT),
sys/dev/qlnx/qlnxe/ecore_dev.c
1862
if (IS_ECORE_DCQCN(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
1863
DP_NOTICE(p_hwfn, false, "no rate limiters left for PF rate limiting [num_pf_rls %d num_vfs %d]\n", num_pf_rls, num_vfs);
sys/dev/qlnx/qlnxe/ecore_dev.c
1873
u16 ecore_init_qm_get_num_vports(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1875
u32 pq_flags = ecore_get_pq_flags(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1878
return (!!(PQ_FLAGS_RLS & pq_flags)) * ecore_init_qm_get_num_pf_rls(p_hwfn) +
sys/dev/qlnx/qlnxe/ecore_dev.c
1879
(!!(PQ_FLAGS_VFS & pq_flags)) * ecore_init_qm_get_num_vfs(p_hwfn) + 1;
sys/dev/qlnx/qlnxe/ecore_dev.c
1883
u16 ecore_init_qm_get_num_pqs(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1885
u32 pq_flags = ecore_get_pq_flags(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1887
return (!!(PQ_FLAGS_RLS & pq_flags)) * ecore_init_qm_get_num_pf_rls(p_hwfn) +
sys/dev/qlnx/qlnxe/ecore_dev.c
1888
(!!(PQ_FLAGS_MCOS & pq_flags)) * ecore_init_qm_get_num_tcs(p_hwfn) +
sys/dev/qlnx/qlnxe/ecore_dev.c
1894
(!!(PQ_FLAGS_VFS & pq_flags)) * ecore_init_qm_get_num_vfs(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
1898
static void ecore_init_qm_params(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1900
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
1904
qm_info->start_pq = (u16)RESC_START(p_hwfn, ECORE_PQ);
sys/dev/qlnx/qlnxe/ecore_dev.c
1905
qm_info->start_vport = (u8)RESC_START(p_hwfn, ECORE_VPORT);
sys/dev/qlnx/qlnxe/ecore_dev.c
191
db_entry->hwfn_idx = p_hwfn->my_id;
sys/dev/qlnx/qlnxe/ecore_dev.c
1912
four_port = p_hwfn->p_dev->num_ports_in_engine == MAX_NUM_PORTS_K2;
sys/dev/qlnx/qlnxe/ecore_dev.c
1923
static void ecore_init_qm_vport_params(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1925
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
1929
for (i = 0; i < ecore_init_qm_get_num_vports(p_hwfn); i++)
sys/dev/qlnx/qlnxe/ecore_dev.c
1934
static void ecore_init_qm_port_params(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1937
u8 i, active_phys_tcs, num_ports = p_hwfn->p_dev->num_ports_in_engine;
sys/dev/qlnx/qlnxe/ecore_dev.c
194
ecore_db_recovery_dp_entry(p_hwfn, db_entry, "Adding");
sys/dev/qlnx/qlnxe/ecore_dev.c
1945
&p_hwfn->qm_info.qm_port_params[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
1960
static void ecore_init_qm_reset_params(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1962
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
197
OSAL_SPIN_LOCK(&p_hwfn->db_recovery_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
1973
static void ecore_init_qm_advance_vport(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
1975
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
1979
if (qm_info->num_vports > ecore_init_qm_get_num_vports(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
1980
DP_ERR(p_hwfn, "vport overflow! qm_info->num_vports %d, qm_init_get_num_vports() %d\n", qm_info->num_vports, ecore_init_qm_get_num_vports(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_dev.c
199
&p_hwfn->db_recovery_info.list);
sys/dev/qlnx/qlnxe/ecore_dev.c
1996
#define PQ_INIT_OFLD_TC (p_hwfn->hw_info.offload_tc)
sys/dev/qlnx/qlnxe/ecore_dev.c
1998
static void ecore_init_qm_pq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
200
OSAL_SPIN_UNLOCK(&p_hwfn->db_recovery_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
2002
u16 pq_idx = qm_info->num_pqs, max_pq = ecore_init_qm_get_num_pqs(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2005
DP_ERR(p_hwfn, "pq overflow! pq %d, max pq %d\n", pq_idx, max_pq);
sys/dev/qlnx/qlnxe/ecore_dev.c
2022
if (qm_info->num_vports > ecore_init_qm_get_num_vports(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
2023
DP_ERR(p_hwfn, "vport overflow! qm_info->num_vports %d, qm_init_get_num_vports() %d\n", qm_info->num_vports, ecore_init_qm_get_num_vports(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_dev.c
2025
if (qm_info->num_pf_rls > ecore_init_qm_get_num_pf_rls(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
2026
DP_ERR(p_hwfn, "rl overflow! qm_info->num_pf_rls %d, qm_init_get_num_pf_rls() %d\n", qm_info->num_pf_rls, ecore_init_qm_get_num_pf_rls(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_dev.c
2030
static u16 *ecore_init_qm_get_idx_from_flags(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
2033
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2061
DP_ERR(p_hwfn, "BAD pq flags %d\n", pq_flags);
sys/dev/qlnx/qlnxe/ecore_dev.c
2066
static void ecore_init_qm_set_idx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
2069
u16 *base_pq_idx = ecore_init_qm_get_idx_from_flags(p_hwfn, pq_flags);
sys/dev/qlnx/qlnxe/ecore_dev.c
2071
*base_pq_idx = p_hwfn->qm_info.start_pq + pq_val;
sys/dev/qlnx/qlnxe/ecore_dev.c
2075
u16 ecore_get_cm_pq_idx(struct ecore_hwfn *p_hwfn, u32 pq_flags)
sys/dev/qlnx/qlnxe/ecore_dev.c
2077
u16 *base_pq_idx = ecore_init_qm_get_idx_from_flags(p_hwfn, pq_flags);
sys/dev/qlnx/qlnxe/ecore_dev.c
2082
u16 ecore_get_cm_pq_idx_mcos(struct ecore_hwfn *p_hwfn, u8 tc)
sys/dev/qlnx/qlnxe/ecore_dev.c
2084
u8 max_tc = ecore_init_qm_get_num_tcs(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2087
DP_ERR(p_hwfn, "tc %d must be smaller than %d\n", tc, max_tc);
sys/dev/qlnx/qlnxe/ecore_dev.c
2089
return ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_MCOS) + tc;
sys/dev/qlnx/qlnxe/ecore_dev.c
2092
u16 ecore_get_cm_pq_idx_vf(struct ecore_hwfn *p_hwfn, u16 vf)
sys/dev/qlnx/qlnxe/ecore_dev.c
2094
u16 max_vf = ecore_init_qm_get_num_vfs(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2097
DP_ERR(p_hwfn, "vf %d must be smaller than %d\n", vf, max_vf);
sys/dev/qlnx/qlnxe/ecore_dev.c
2099
return ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_VFS) + vf;
sys/dev/qlnx/qlnxe/ecore_dev.c
2102
u16 ecore_get_cm_pq_idx_rl(struct ecore_hwfn *p_hwfn, u8 rl)
sys/dev/qlnx/qlnxe/ecore_dev.c
2104
u16 max_rl = ecore_init_qm_get_num_pf_rls(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2107
DP_ERR(p_hwfn, "rl %d must be smaller than %d\n", rl, max_rl);
sys/dev/qlnx/qlnxe/ecore_dev.c
2109
return ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_RLS) + rl;
sys/dev/qlnx/qlnxe/ecore_dev.c
2113
static void ecore_init_qm_lb_pq(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2115
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2117
if (!(ecore_get_pq_flags(p_hwfn) & PQ_FLAGS_LB))
sys/dev/qlnx/qlnxe/ecore_dev.c
212
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/ecore_dev.c
2120
ecore_init_qm_set_idx(p_hwfn, PQ_FLAGS_LB, qm_info->num_pqs);
sys/dev/qlnx/qlnxe/ecore_dev.c
2121
ecore_init_qm_pq(p_hwfn, qm_info, PURE_LB_TC, PQ_INIT_SHARE_VPORT);
sys/dev/qlnx/qlnxe/ecore_dev.c
2124
static void ecore_init_qm_ooo_pq(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2126
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2128
if (!(ecore_get_pq_flags(p_hwfn) & PQ_FLAGS_OOO))
sys/dev/qlnx/qlnxe/ecore_dev.c
2131
ecore_init_qm_set_idx(p_hwfn, PQ_FLAGS_OOO, qm_info->num_pqs);
sys/dev/qlnx/qlnxe/ecore_dev.c
2132
ecore_init_qm_pq(p_hwfn, qm_info, qm_info->ooo_tc, PQ_INIT_SHARE_VPORT);
sys/dev/qlnx/qlnxe/ecore_dev.c
2135
static void ecore_init_qm_pure_ack_pq(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2137
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2139
if (!(ecore_get_pq_flags(p_hwfn) & PQ_FLAGS_ACK))
sys/dev/qlnx/qlnxe/ecore_dev.c
2142
ecore_init_qm_set_idx(p_hwfn, PQ_FLAGS_ACK, qm_info->num_pqs);
sys/dev/qlnx/qlnxe/ecore_dev.c
2143
ecore_init_qm_pq(p_hwfn, qm_info, PQ_INIT_OFLD_TC, PQ_INIT_SHARE_VPORT);
sys/dev/qlnx/qlnxe/ecore_dev.c
2146
static void ecore_init_qm_offload_pq(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2148
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2150
if (!(ecore_get_pq_flags(p_hwfn) & PQ_FLAGS_OFLD))
sys/dev/qlnx/qlnxe/ecore_dev.c
2153
ecore_init_qm_set_idx(p_hwfn, PQ_FLAGS_OFLD, qm_info->num_pqs);
sys/dev/qlnx/qlnxe/ecore_dev.c
2154
ecore_init_qm_pq(p_hwfn, qm_info, PQ_INIT_OFLD_TC, PQ_INIT_SHARE_VPORT);
sys/dev/qlnx/qlnxe/ecore_dev.c
2157
static void ecore_init_qm_low_latency_pq(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2159
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2161
if (!(ecore_get_pq_flags(p_hwfn) & PQ_FLAGS_LLT))
sys/dev/qlnx/qlnxe/ecore_dev.c
2164
ecore_init_qm_set_idx(p_hwfn, PQ_FLAGS_LLT, qm_info->num_pqs);
sys/dev/qlnx/qlnxe/ecore_dev.c
2165
ecore_init_qm_pq(p_hwfn, qm_info, PQ_INIT_OFLD_TC, PQ_INIT_SHARE_VPORT);
sys/dev/qlnx/qlnxe/ecore_dev.c
2168
static void ecore_init_qm_mcos_pqs(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2170
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2173
if (!(ecore_get_pq_flags(p_hwfn) & PQ_FLAGS_MCOS))
sys/dev/qlnx/qlnxe/ecore_dev.c
2176
ecore_init_qm_set_idx(p_hwfn, PQ_FLAGS_MCOS, qm_info->num_pqs);
sys/dev/qlnx/qlnxe/ecore_dev.c
2177
for (tc_idx = 0; tc_idx < ecore_init_qm_get_num_tcs(p_hwfn); tc_idx++)
sys/dev/qlnx/qlnxe/ecore_dev.c
2178
ecore_init_qm_pq(p_hwfn, qm_info, tc_idx, PQ_INIT_SHARE_VPORT);
sys/dev/qlnx/qlnxe/ecore_dev.c
2181
static void ecore_init_qm_vf_pqs(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2183
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2184
u16 vf_idx, num_vfs = ecore_init_qm_get_num_vfs(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2186
if (!(ecore_get_pq_flags(p_hwfn) & PQ_FLAGS_VFS))
sys/dev/qlnx/qlnxe/ecore_dev.c
2189
ecore_init_qm_set_idx(p_hwfn, PQ_FLAGS_VFS, qm_info->num_pqs);
sys/dev/qlnx/qlnxe/ecore_dev.c
2192
ecore_init_qm_pq(p_hwfn, qm_info, PQ_INIT_DEFAULT_TC, PQ_INIT_VF_RL);
sys/dev/qlnx/qlnxe/ecore_dev.c
2195
static void ecore_init_qm_rl_pqs(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2197
u16 pf_rls_idx, num_pf_rls = ecore_init_qm_get_num_pf_rls(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2198
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2200
if (!(ecore_get_pq_flags(p_hwfn) & PQ_FLAGS_RLS))
sys/dev/qlnx/qlnxe/ecore_dev.c
2203
ecore_init_qm_set_idx(p_hwfn, PQ_FLAGS_RLS, qm_info->num_pqs);
sys/dev/qlnx/qlnxe/ecore_dev.c
2205
ecore_init_qm_pq(p_hwfn, qm_info, PQ_INIT_OFLD_TC, PQ_INIT_PF_RL);
sys/dev/qlnx/qlnxe/ecore_dev.c
2208
static void ecore_init_qm_pq_params(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2211
ecore_init_qm_rl_pqs(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2214
ecore_init_qm_mcos_pqs(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2217
ecore_init_qm_lb_pq(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2220
ecore_init_qm_ooo_pq(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2223
ecore_init_qm_pure_ack_pq(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2226
ecore_init_qm_offload_pq(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2229
ecore_init_qm_low_latency_pq(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2232
ecore_init_qm_advance_vport(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2235
ecore_init_qm_vf_pqs(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2239
static enum _ecore_status_t ecore_init_qm_sanity(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2241
if (ecore_init_qm_get_num_vports(p_hwfn) > RESC_NUM(p_hwfn, ECORE_VPORT)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2242
DP_ERR(p_hwfn, "requested amount of vports exceeds resource\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
2246
if (ecore_init_qm_get_num_pqs(p_hwfn) > RESC_NUM(p_hwfn, ECORE_PQ)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2247
DP_ERR(p_hwfn, "requested amount of pqs exceeds resource\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
225
p_hwfn = ecore_db_rec_find_hwfn(p_dev, db_addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
2257
static void ecore_dp_init_qm_params(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2259
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2266
DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "qm init top level params: start_pq %d, start_vport %d, pure_lb_pq %d, offload_pq %d, pure_ack_pq %d\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
2268
DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "ooo_pq %d, first_vf_pq %d, num_pqs %d, num_vf_pqs %d, num_vports %d, max_phys_tcs_per_port %d\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
2270
DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "pf_rl_en %d, pf_wfq_en %d, vport_rl_en %d, vport_wfq_en %d, pf_wfq %d, pf_rl %d, num_pf_rls %d, pq_flags %x\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
2271
qm_info->pf_rl_en, qm_info->pf_wfq_en, qm_info->vport_rl_en, qm_info->vport_wfq_en, qm_info->pf_wfq, qm_info->pf_rl, qm_info->num_pf_rls, ecore_get_pq_flags(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_dev.c
2274
for (i = 0; i < p_hwfn->p_dev->num_ports_in_engine; i++) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2276
DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "port idx %d, active %d, active_phys_tcs %d, num_pbf_cmd_lines %d, num_btb_blocks %d, reserved %d\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
228
OSAL_SPIN_LOCK(&p_hwfn->db_recovery_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
2283
DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "vport idx %d, vport_rl %d, wfq %d, first_tx_pq_id [ ",
sys/dev/qlnx/qlnxe/ecore_dev.c
2286
DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "%d ", vport->first_tx_pq_id[tc]);
sys/dev/qlnx/qlnxe/ecore_dev.c
2287
DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "]\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
2293
DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "pq idx %d, vport_id %d, tc %d, wrr_grp %d, rl_valid %d\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
2298
static void ecore_init_qm_info(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
230
&p_hwfn->db_recovery_info.list,
sys/dev/qlnx/qlnxe/ecore_dev.c
2301
ecore_init_qm_reset_params(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2304
ecore_init_qm_params(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2307
ecore_init_qm_port_params(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2310
ecore_init_qm_vport_params(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2313
ecore_init_qm_pq_params(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2316
ecore_dp_init_qm_params(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2327
enum _ecore_status_t ecore_qm_reconf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
2330
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2335
ecore_init_qm_info(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2339
b_rc = ecore_send_qm_stop_cmd(p_hwfn, p_ptt, false, true,
sys/dev/qlnx/qlnxe/ecore_dev.c
2346
ecore_init_clear_rt_data(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2349
ecore_qm_init_pf(p_hwfn, p_ptt, false);
sys/dev/qlnx/qlnxe/ecore_dev.c
235
ecore_db_recovery_dp_entry(p_hwfn, db_entry, "Deleting");
sys/dev/qlnx/qlnxe/ecore_dev.c
2352
rc = ecore_init_run(p_hwfn, p_ptt, PHASE_QM_PF, p_hwfn->rel_pf_id,
sys/dev/qlnx/qlnxe/ecore_dev.c
2353
p_hwfn->hw_info.hw_mode);
sys/dev/qlnx/qlnxe/ecore_dev.c
2359
b_rc = ecore_send_qm_stop_cmd(p_hwfn, p_ptt, true, true,
sys/dev/qlnx/qlnxe/ecore_dev.c
2368
static enum _ecore_status_t ecore_alloc_qm_data(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
237
&p_hwfn->db_recovery_info.list);
sys/dev/qlnx/qlnxe/ecore_dev.c
2370
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2373
rc = ecore_init_qm_sanity(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2377
qm_info->qm_pq_params = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_dev.c
2379
ecore_init_qm_get_num_pqs(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_dev.c
2383
qm_info->qm_vport_params = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_dev.c
2385
ecore_init_qm_get_num_vports(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_dev.c
2389
qm_info->qm_port_params = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_dev.c
2391
p_hwfn->p_dev->num_ports_in_engine);
sys/dev/qlnx/qlnxe/ecore_dev.c
2395
qm_info->wfq_data = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_dev.c
2397
ecore_init_qm_get_num_vports(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_dev.c
2404
DP_NOTICE(p_hwfn, false, "Failed to allocate memory for QM params\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
2405
ecore_qm_info_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
243
OSAL_SPIN_UNLOCK(&p_hwfn->db_recovery_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
2432
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
2436
rc = ecore_db_recovery_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2441
rc = ecore_cxt_mngr_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2448
rc = ecore_cxt_set_pf_params(p_hwfn, RDMA_MAX_TIDS);
sys/dev/qlnx/qlnxe/ecore_dev.c
2452
rc = ecore_alloc_qm_data(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2457
ecore_init_qm_info(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2460
rc = ecore_cxt_cfg_ilt_compute(p_hwfn, &line_count);
sys/dev/qlnx/qlnxe/ecore_dev.c
2462
DP_NOTICE(p_hwfn, false, "too many ILT lines; re-computing with less lines\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
2467
p_hwfn, line_count);
sys/dev/qlnx/qlnxe/ecore_dev.c
247
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
2472
rc = ecore_cxt_set_pf_params(p_hwfn, rdma_tasks);
sys/dev/qlnx/qlnxe/ecore_dev.c
2476
rc = ecore_cxt_cfg_ilt_compute(p_hwfn, &line_count);
sys/dev/qlnx/qlnxe/ecore_dev.c
2478
DP_ERR(p_hwfn, "failed ILT compute. Requested too many lines: %u\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
2488
rc = ecore_cxt_tables_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2493
rc = ecore_spq_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2498
p_hwfn->p_dpc_ptt = ecore_get_reserved_ptt(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
2501
rc = ecore_int_alloc(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
2505
rc = ecore_iov_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2510
n_eqes = ecore_chain_get_capacity(&p_hwfn->p_spq->chain);
sys/dev/qlnx/qlnxe/ecore_dev.c
2511
if (ECORE_IS_RDMA_PERSONALITY(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2512
u32 n_srq = ecore_cxt_get_total_srq_count(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2544
if (p_hwfn->hw_info.personality == ECORE_PCI_ETH_ROCE) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2546
p_hwfn, PROTOCOLID_ROCE, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_dev.c
2550
p_hwfn, PROTOCOLID_IWARP,
sys/dev/qlnx/qlnxe/ecore_dev.c
2555
} else if (p_hwfn->hw_info.personality == ECORE_PCI_ISCSI) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2557
p_hwfn, PROTOCOLID_ISCSI, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_dev.c
2562
DP_ERR(p_hwfn, "EQs maxing out at 0xFF00 elements\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
2566
rc = ecore_eq_alloc(p_hwfn, (u16)n_eqes);
sys/dev/qlnx/qlnxe/ecore_dev.c
257
static enum _ecore_status_t ecore_db_recovery_setup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2570
rc = ecore_consq_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2574
rc = ecore_l2_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2579
if (p_hwfn->using_ll2) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2580
rc = ecore_ll2_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2585
if (p_hwfn->hw_info.personality == ECORE_PCI_FCOE) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2586
rc = ecore_fcoe_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
259
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ, "Setting up db recovery\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
2591
if (p_hwfn->hw_info.personality == ECORE_PCI_ISCSI) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2592
rc = ecore_iscsi_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2596
rc = ecore_ooo_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2601
if (ECORE_IS_RDMA_PERSONALITY(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2602
rc = ecore_rdma_info_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2609
rc = ecore_dmae_info_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2611
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
2617
rc = ecore_dcbx_info_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2619
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
262
if (!p_hwfn->p_dev->db_size) {
sys/dev/qlnx/qlnxe/ecore_dev.c
263
DP_ERR(p_hwfn->p_dev, "db_size not set\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
2660
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
2662
ecore_cxt_mngr_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2663
ecore_spq_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2664
ecore_eq_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2665
ecore_consq_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2668
ecore_mcp_read_mb(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
2669
OSAL_MEMCPY(p_hwfn->mcp_info->mfw_mb_shadow,
sys/dev/qlnx/qlnxe/ecore_dev.c
267
OSAL_LIST_INIT(&p_hwfn->db_recovery_info.list);
sys/dev/qlnx/qlnxe/ecore_dev.c
2670
p_hwfn->mcp_info->mfw_mb_cur,
sys/dev/qlnx/qlnxe/ecore_dev.c
2671
p_hwfn->mcp_info->mfw_mb_length);
sys/dev/qlnx/qlnxe/ecore_dev.c
2673
ecore_int_setup(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
2675
ecore_l2_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2676
ecore_iov_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2678
if (p_hwfn->using_ll2)
sys/dev/qlnx/qlnxe/ecore_dev.c
2679
ecore_ll2_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2681
if (p_hwfn->hw_info.personality == ECORE_PCI_FCOE)
sys/dev/qlnx/qlnxe/ecore_dev.c
2682
ecore_fcoe_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2684
if (p_hwfn->hw_info.personality == ECORE_PCI_ISCSI) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2685
ecore_iscsi_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2686
ecore_ooo_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
269
if (OSAL_SPIN_LOCK_ALLOC(p_hwfn, &p_hwfn->db_recovery_info.lock))
sys/dev/qlnx/qlnxe/ecore_dev.c
2693
enum _ecore_status_t ecore_final_cleanup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
2701
if (CHIP_REV_IS_TEDIBEAR(p_hwfn->p_dev) ||
sys/dev/qlnx/qlnxe/ecore_dev.c
2702
CHIP_REV_IS_SLOW(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2703
DP_INFO(p_hwfn, "Skipping final cleanup for non-ASIC\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
2709
USTORM_FLR_FINAL_ACK_OFFSET(p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
272
OSAL_SPIN_LOCK_INIT(&p_hwfn->db_recovery_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
2721
if (REG_RD(p_hwfn, addr)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2722
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
2724
REG_WR(p_hwfn, addr, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
2727
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_dev.c
273
p_hwfn->db_recovery_info.db_recovery_counter = 0;
sys/dev/qlnx/qlnxe/ecore_dev.c
2731
ecore_wr(p_hwfn, p_ptt, XSDM_REG_OPERATION_GEN, command);
sys/dev/qlnx/qlnxe/ecore_dev.c
2734
while (!REG_RD(p_hwfn, addr) && count--)
sys/dev/qlnx/qlnxe/ecore_dev.c
2737
if (REG_RD(p_hwfn, addr))
sys/dev/qlnx/qlnxe/ecore_dev.c
2740
DP_NOTICE(p_hwfn, true, "Failed to receive FW final cleanup notification\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
2743
REG_WR(p_hwfn, addr, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
2748
static enum _ecore_status_t ecore_calc_hw_mode(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2752
if (ECORE_IS_BB_B0(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2754
} else if (ECORE_IS_AH(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2756
} else if (ECORE_IS_E5(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2759
DP_NOTICE(p_hwfn, true, "Unknown chip type %#x\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
2760
p_hwfn->p_dev->type);
sys/dev/qlnx/qlnxe/ecore_dev.c
2765
switch (p_hwfn->p_dev->num_ports_in_engine) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2776
DP_NOTICE(p_hwfn, true, "num_ports_in_engine = %d not supported\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
2777
p_hwfn->p_dev->num_ports_in_engine);
sys/dev/qlnx/qlnxe/ecore_dev.c
2782
&p_hwfn->p_dev->mf_bits))
sys/dev/qlnx/qlnxe/ecore_dev.c
2788
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2789
if (CHIP_REV_IS_FPGA(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
279
static void ecore_db_recovery_teardown(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
2792
if (p_hwfn->p_dev->b_is_emul_full)
sys/dev/qlnx/qlnxe/ecore_dev.c
2801
if (ECORE_IS_CMT(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
2804
p_hwfn->hw_info.hw_mode = hw_mode;
sys/dev/qlnx/qlnxe/ecore_dev.c
2806
DP_VERBOSE(p_hwfn, (ECORE_MSG_PROBE | ECORE_MSG_IFUP),
sys/dev/qlnx/qlnxe/ecore_dev.c
2808
p_hwfn->hw_info.hw_mode);
sys/dev/qlnx/qlnxe/ecore_dev.c
2815
static enum _ecore_status_t ecore_hw_init_chip(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
2818
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
2829
ecore_wr(p_hwfn, p_ptt, MISCS_REG_RESET_PL_HV + 4, pl_hv);
sys/dev/qlnx/qlnxe/ecore_dev.c
283
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ, "Tearing down db recovery\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
2833
ecore_wr(p_hwfn, p_ptt, MISCS_REG_RESET_PL_HV_2_K2_E5,
sys/dev/qlnx/qlnxe/ecore_dev.c
2839
ecore_wr(p_hwfn, p_ptt, CNIG_REG_NW_PORT_MODE_BB, 4);
sys/dev/qlnx/qlnxe/ecore_dev.c
284
if (!OSAL_LIST_IS_EMPTY(&p_hwfn->db_recovery_info.list)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2844
ecore_wr(p_hwfn, p_ptt, MISC_REG_PORT_MODE,
sys/dev/qlnx/qlnxe/ecore_dev.c
2847
ecore_wr(p_hwfn, p_ptt, MISC_REG_BLOCK_256B_EN,
sys/dev/qlnx/qlnxe/ecore_dev.c
285
DP_VERBOSE(p_hwfn, false, "Doorbell Recovery teardown found the doorbell recovery list was not empty (Expected in disorderly driver unload (e.g. recovery) otherwise this probably means some flow forgot to db_recovery_del). Prepare to purge doorbell recovery list...\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
2854
ecore_wr(p_hwfn, p_ptt, PSWRQ2_REG_RBC_DONE, 1);
sys/dev/qlnx/qlnxe/ecore_dev.c
2857
if (ecore_rd(p_hwfn, p_ptt, PSWRQ2_REG_CFG_DONE) == 1)
sys/dev/qlnx/qlnxe/ecore_dev.c
286
while (!OSAL_LIST_IS_EMPTY(&p_hwfn->db_recovery_info.list)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2861
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_dev.c
287
db_entry = OSAL_LIST_FIRST_ENTRY(&p_hwfn->db_recovery_info.list,
sys/dev/qlnx/qlnxe/ecore_dev.c
2879
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
2884
p_igu_info = p_hwfn->hw_info.p_igu_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2894
ecore_init_cau_sb_entry(p_hwfn, &sb_entry,
sys/dev/qlnx/qlnxe/ecore_dev.c
2897
STORE_RT_REG_AGG(p_hwfn, offset + igu_sb_id * 2,
sys/dev/qlnx/qlnxe/ecore_dev.c
290
ecore_db_recovery_dp_entry(p_hwfn, db_entry, "Purging");
sys/dev/qlnx/qlnxe/ecore_dev.c
2903
static void ecore_init_cache_line_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
2908
val = ecore_rd(p_hwfn, p_ptt, PSWRQ2_REG_WR_MBS0);
sys/dev/qlnx/qlnxe/ecore_dev.c
292
&p_hwfn->db_recovery_info.list);
sys/dev/qlnx/qlnxe/ecore_dev.c
2920
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
293
OSAL_FREE(p_hwfn->p_dev, db_entry);
sys/dev/qlnx/qlnxe/ecore_dev.c
2941
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
2947
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
2951
STORE_RT_REG(p_hwfn, PGLUE_REG_B_CACHE_LINE_SIZE_RT_OFFSET, val);
sys/dev/qlnx/qlnxe/ecore_dev.c
2953
STORE_RT_REG(p_hwfn, PSWRQ2_REG_DRAM_ALIGN_WR_RT_OFFSET, val);
sys/dev/qlnx/qlnxe/ecore_dev.c
2954
STORE_RT_REG(p_hwfn, PSWRQ2_REG_DRAM_ALIGN_RD_RT_OFFSET, val);
sys/dev/qlnx/qlnxe/ecore_dev.c
2958
static enum _ecore_status_t ecore_hw_init_common(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
2962
struct ecore_qm_info *qm_info = &p_hwfn->qm_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
2963
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
297
OSAL_SPIN_LOCK_DEALLOC(&p_hwfn->db_recovery_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
2972
ecore_gtt_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
2976
rc = ecore_hw_init_chip(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
2982
if (p_hwfn->mcp_info) {
sys/dev/qlnx/qlnxe/ecore_dev.c
2983
if (p_hwfn->mcp_info->func_info.bandwidth_max)
sys/dev/qlnx/qlnxe/ecore_dev.c
2985
if (p_hwfn->mcp_info->func_info.bandwidth_min)
sys/dev/qlnx/qlnxe/ecore_dev.c
2989
ecore_qm_common_rt_init(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
299
p_hwfn->db_recovery_info.db_recovery_counter = 0;
sys/dev/qlnx/qlnxe/ecore_dev.c
2996
ecore_cxt_hw_init_common(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
2998
ecore_init_cache_line_size(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
3000
rc = ecore_init_run(p_hwfn, p_ptt, PHASE_ENGINE, ECORE_PATH_ID(p_hwfn),
sys/dev/qlnx/qlnxe/ecore_dev.c
3008
ecore_wr(p_hwfn, p_ptt, PSWRQ2_REG_L2P_VALIDATE_VFID, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
3009
ecore_wr(p_hwfn, p_ptt, PGLUE_B_REG_USE_CLIENTID_IN_TAG, 1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3017
ecore_fid_pretend(p_hwfn, p_ptt, pf_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
3018
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_ROCE, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
3019
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_TCP, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
3022
ecore_fid_pretend(p_hwfn, p_ptt, p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
303
void ecore_db_recovery_dp(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
3033
concrete_fid = ecore_vfid_to_concrete(p_hwfn, vf_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
3034
ecore_fid_pretend(p_hwfn, p_ptt, (u16)concrete_fid);
sys/dev/qlnx/qlnxe/ecore_dev.c
3035
ecore_wr(p_hwfn, p_ptt, CCFC_REG_STRONG_ENABLE_VF, 0x1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3036
ecore_wr(p_hwfn, p_ptt, CCFC_REG_WEAK_ENABLE_VF, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
3037
ecore_wr(p_hwfn, p_ptt, TCFC_REG_STRONG_ENABLE_VF, 0x1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3038
ecore_wr(p_hwfn, p_ptt, TCFC_REG_WEAK_ENABLE_VF, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
3041
ecore_fid_pretend(p_hwfn, p_ptt, p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
3052
static void ecore_wr_nw_port(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3059
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
sys/dev/qlnx/qlnxe/ecore_dev.c
3061
ecore_rd(p_hwfn, p_ptt, CNIG_REG_PMEG_IF_CMD_BB) |
sys/dev/qlnx/qlnxe/ecore_dev.c
3067
ecore_wr(p_hwfn, p_ptt, CNIG_REG_PMEG_IF_CMD_BB,
sys/dev/qlnx/qlnxe/ecore_dev.c
3068
(ecore_rd(p_hwfn, p_ptt, CNIG_REG_PMEG_IF_CMD_BB) &
sys/dev/qlnx/qlnxe/ecore_dev.c
307
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
3071
ecore_wr(p_hwfn, p_ptt, CNIG_REG_PMEG_IF_ADDR_BB,
sys/dev/qlnx/qlnxe/ecore_dev.c
3073
ecore_wr(p_hwfn, p_ptt, CNIG_REG_PMEG_IF_WRDATA_BB, data & 0xffffffff);
sys/dev/qlnx/qlnxe/ecore_dev.c
3074
ecore_wr(p_hwfn, p_ptt, CNIG_REG_PMEG_IF_WRDATA_BB,
sys/dev/qlnx/qlnxe/ecore_dev.c
309
p_hwfn->db_recovery_info.db_recovery_counter);
sys/dev/qlnx/qlnxe/ecore_dev.c
3090
static void ecore_emul_link_init_bb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3093
u8 loopback = 0, port = p_hwfn->port_id * 2;
sys/dev/qlnx/qlnxe/ecore_dev.c
3095
DP_INFO(p_hwfn->p_dev, "Configurating Emulation Link %02x\n", port);
sys/dev/qlnx/qlnxe/ecore_dev.c
3097
ecore_wr_nw_port(p_hwfn, p_ptt, XLPORT_MODE_REG,
sys/dev/qlnx/qlnxe/ecore_dev.c
3099
ecore_wr_nw_port(p_hwfn, p_ptt, XLPORT_MAC_CONTROL, 0, 1, port);
sys/dev/qlnx/qlnxe/ecore_dev.c
3100
ecore_wr_nw_port(p_hwfn, p_ptt, XLMAC_CTRL,
sys/dev/qlnx/qlnxe/ecore_dev.c
3102
ecore_wr_nw_port(p_hwfn, p_ptt, XLMAC_MODE,
sys/dev/qlnx/qlnxe/ecore_dev.c
3104
ecore_wr_nw_port(p_hwfn, p_ptt, XLMAC_RX_MAX_SIZE,
sys/dev/qlnx/qlnxe/ecore_dev.c
3106
ecore_wr_nw_port(p_hwfn, p_ptt, XLMAC_TX_CTRL,
sys/dev/qlnx/qlnxe/ecore_dev.c
3109
ecore_wr_nw_port(p_hwfn, p_ptt, XLMAC_PAUSE_CTRL,
sys/dev/qlnx/qlnxe/ecore_dev.c
3111
ecore_wr_nw_port(p_hwfn, p_ptt, XLMAC_PFC_CTRL,
sys/dev/qlnx/qlnxe/ecore_dev.c
3113
ecore_wr_nw_port(p_hwfn, p_ptt, XLMAC_CTRL, 0x3 | (loopback << 2),
sys/dev/qlnx/qlnxe/ecore_dev.c
3115
ecore_wr_nw_port(p_hwfn, p_ptt, XLMAC_CTRL, 0x1003 | (loopback << 2),
sys/dev/qlnx/qlnxe/ecore_dev.c
3117
ecore_wr_nw_port(p_hwfn, p_ptt, XLPORT_FLOW_CONTROL_CONFIG,
sys/dev/qlnx/qlnxe/ecore_dev.c
3119
ecore_wr_nw_port(p_hwfn, p_ptt, XLPORT_ENABLE_REG,
sys/dev/qlnx/qlnxe/ecore_dev.c
312
OSAL_SPIN_LOCK(&p_hwfn->db_recovery_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
3123
static void ecore_emul_link_init_ah_e5(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3126
u8 port = p_hwfn->port_id;
sys/dev/qlnx/qlnxe/ecore_dev.c
3129
DP_INFO(p_hwfn->p_dev, "Configurating Emulation Link %02x\n", port);
sys/dev/qlnx/qlnxe/ecore_dev.c
3131
ecore_wr(p_hwfn, p_ptt, CNIG_REG_NIG_PORT0_CONF_K2_E5 + (port << 2),
sys/dev/qlnx/qlnxe/ecore_dev.c
3137
ecore_wr(p_hwfn, p_ptt, mac_base + ETH_MAC_REG_XIF_MODE_K2_E5,
sys/dev/qlnx/qlnxe/ecore_dev.c
314
&p_hwfn->db_recovery_info.list,
sys/dev/qlnx/qlnxe/ecore_dev.c
3140
ecore_wr(p_hwfn, p_ptt, mac_base + ETH_MAC_REG_FRM_LENGTH_K2_E5,
sys/dev/qlnx/qlnxe/ecore_dev.c
3143
ecore_wr(p_hwfn, p_ptt, mac_base + ETH_MAC_REG_TX_IPG_LENGTH_K2_E5,
sys/dev/qlnx/qlnxe/ecore_dev.c
3146
ecore_wr(p_hwfn, p_ptt, mac_base + ETH_MAC_REG_RX_FIFO_SECTIONS_K2_E5,
sys/dev/qlnx/qlnxe/ecore_dev.c
3149
ecore_wr(p_hwfn, p_ptt, mac_base + ETH_MAC_REG_TX_FIFO_SECTIONS_K2_E5,
sys/dev/qlnx/qlnxe/ecore_dev.c
3155
ecore_wr(p_hwfn, p_ptt, mac_base + ETH_MAC_REG_COMMAND_CONFIG_K2_E5,
sys/dev/qlnx/qlnxe/ecore_dev.c
3159
static void ecore_emul_link_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3162
if (ECORE_IS_AH(p_hwfn->p_dev) || ECORE_IS_E5(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
3163
ecore_emul_link_init_ah_e5(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
3165
ecore_emul_link_init_bb(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
317
ecore_db_recovery_dp_entry(p_hwfn, db_entry, "Printing");
sys/dev/qlnx/qlnxe/ecore_dev.c
3170
static void ecore_link_init_bb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3178
ecore_wr(p_hwfn, p_ptt, MISC_REG_RESET_PL_PDA_VAUX + 2*sizeof(u32),
sys/dev/qlnx/qlnxe/ecore_dev.c
3181
ecore_wr(p_hwfn, p_ptt, MISC_REG_RESET_PL_PDA_VAUX + sizeof(u32),
sys/dev/qlnx/qlnxe/ecore_dev.c
3184
ecore_wr(p_hwfn, p_ptt, MISC_REG_XMAC_CORE_PORT_MODE_BB, 1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3187
ecore_wr(p_hwfn, p_ptt, MISC_REG_XMAC_PHY_PORT_MODE_BB, 3);
sys/dev/qlnx/qlnxe/ecore_dev.c
3190
ecore_wr(p_hwfn, p_ptt, MISC_REG_RESET_PL_PDA_VAUX + 2 * sizeof(u32),
sys/dev/qlnx/qlnxe/ecore_dev.c
3193
ecore_wr(p_hwfn, p_ptt, MISC_REG_RESET_PL_PDA_VAUX + sizeof(u32),
sys/dev/qlnx/qlnxe/ecore_dev.c
3197
if (CHIP_REV_IS_FPGA(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
3198
ecore_wr(p_hwfn, p_ptt, XMAC_REG_MODE_BB + port_offset, 0x20);
sys/dev/qlnx/qlnxe/ecore_dev.c
320
OSAL_SPIN_UNLOCK(&p_hwfn->db_recovery_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
3201
ecore_wr(p_hwfn, p_ptt, XMAC_REG_RX_MAX_SIZE_BB + port_offset, 0x2710);
sys/dev/qlnx/qlnxe/ecore_dev.c
3204
ecore_wr(p_hwfn, p_ptt, XMAC_REG_TX_CTRL_LO_BB + port_offset, 0xC800);
sys/dev/qlnx/qlnxe/ecore_dev.c
3207
ecore_wr(p_hwfn, p_ptt, XMAC_REG_CTRL_BB + port_offset,
sys/dev/qlnx/qlnxe/ecore_dev.c
3209
xmac_rxctrl = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3212
ecore_wr(p_hwfn, p_ptt, XMAC_REG_RX_CTRL_BB + port_offset, xmac_rxctrl);
sys/dev/qlnx/qlnxe/ecore_dev.c
3217
ecore_hw_init_dpi_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
324
static void ecore_db_recovery_ring(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3253
min_dpis = p_hwfn->pf_params.rdma_pf_params.min_dpis;
sys/dev/qlnx/qlnxe/ecore_dev.c
3257
p_hwfn->dpi_size = dpi_page_size;
sys/dev/qlnx/qlnxe/ecore_dev.c
3258
p_hwfn->dpi_count = dpi_count;
sys/dev/qlnx/qlnxe/ecore_dev.c
3261
ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_DPI_BIT_SHIFT, dpi_bit_shift);
sys/dev/qlnx/qlnxe/ecore_dev.c
3276
ecore_hw_init_pf_doorbell_bar(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3288
db_bar_size = ecore_hw_bar_size(p_hwfn, p_ptt, BAR_ID_1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3289
if (ECORE_IS_CMT(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
3306
non_pwm_conn = ecore_cxt_get_proto_cid_start(p_hwfn, PROTOCOLID_CORE) +
sys/dev/qlnx/qlnxe/ecore_dev.c
3307
ecore_cxt_get_proto_cid_count(p_hwfn, PROTOCOLID_CORE,
sys/dev/qlnx/qlnxe/ecore_dev.c
3309
ecore_cxt_get_proto_cid_count(p_hwfn, PROTOCOLID_ETH,
sys/dev/qlnx/qlnxe/ecore_dev.c
331
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ,
sys/dev/qlnx/qlnxe/ecore_dev.c
3317
DP_ERR(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_dev.c
3323
DP_ERR(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_dev.c
3330
p_rdma_pf_params = &p_hwfn->pf_params.rdma_pf_params;
sys/dev/qlnx/qlnxe/ecore_dev.c
3333
if (ECORE_IS_IWARP_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
3339
DP_ERR(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_dev.c
3351
rc = ecore_hw_init_dpi_size(p_hwfn, p_ptt, pwm_regsize, n_cpus);
sys/dev/qlnx/qlnxe/ecore_dev.c
3357
if (cond || p_hwfn->dcbx_no_edpm) {
sys/dev/qlnx/qlnxe/ecore_dev.c
3363
rc = ecore_hw_init_dpi_size(p_hwfn, p_ptt, pwm_regsize, n_cpus);
sys/dev/qlnx/qlnxe/ecore_dev.c
3370
ecore_rdma_dpm_bar(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
3374
p_hwfn->wid_count = (u16)n_cpus;
sys/dev/qlnx/qlnxe/ecore_dev.c
3379
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
338
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ,
sys/dev/qlnx/qlnxe/ecore_dev.c
3381
p_hwfn->dpi_count, p_rdma_pf_params->min_dpis,
sys/dev/qlnx/qlnxe/ecore_dev.c
3384
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3386
p_hwfn->dpi_count, p_rdma_pf_params->min_dpis,
sys/dev/qlnx/qlnxe/ecore_dev.c
3389
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3391
norm_regsize, pwm_regsize, p_hwfn->dpi_size,
sys/dev/qlnx/qlnxe/ecore_dev.c
3392
p_hwfn->dpi_count,
sys/dev/qlnx/qlnxe/ecore_dev.c
3393
((p_hwfn->dcbx_no_edpm) || (p_hwfn->db_bar_no_edpm)) ?
sys/dev/qlnx/qlnxe/ecore_dev.c
3399
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3401
norm_regsize, pwm_regsize, p_hwfn->dpi_size, p_hwfn->dpi_count,
sys/dev/qlnx/qlnxe/ecore_dev.c
3402
((p_hwfn->dcbx_no_edpm) || (p_hwfn->db_bar_no_edpm)) ?
sys/dev/qlnx/qlnxe/ecore_dev.c
3406
p_hwfn->dpi_start_offset = norm_regsize; /* this is later used to
sys/dev/qlnx/qlnxe/ecore_dev.c
3414
ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_ICID_BIT_SHIFT_NORM, pf_dems_shift);
sys/dev/qlnx/qlnxe/ecore_dev.c
3415
ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_MIN_ADDR_REG1, min_addr_reg1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3420
static enum _ecore_status_t ecore_hw_init_port(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3427
if (!ECORE_IS_CMT(p_hwfn->p_dev) || !IS_LEAD_HWFN(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
3428
STORE_RT_REG(p_hwfn, NIG_REG_BRB_GATE_DNTFWD_PORT_RT_OFFSET, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
3430
rc = ecore_init_run(p_hwfn, p_ptt, PHASE_PORT, p_hwfn->port_id,
sys/dev/qlnx/qlnxe/ecore_dev.c
3435
ecore_wr(p_hwfn, p_ptt, PGLUE_B_REG_MASTER_WRITE_PAD_ENABLE, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
3438
if (CHIP_REV_IS_ASIC(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
3441
if (CHIP_REV_IS_FPGA(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
3442
if (ECORE_IS_AH(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
3444
else if (ECORE_IS_BB(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
3445
ecore_link_init_bb(p_hwfn, p_ptt, p_hwfn->port_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
3448
} else if (CHIP_REV_IS_EMUL(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
3449
if (ECORE_IS_CMT(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
3453
val = ecore_rd(p_hwfn, p_ptt, MISCS_REG_RESET_PL_HV);
sys/dev/qlnx/qlnxe/ecore_dev.c
3455
ecore_wr(p_hwfn, p_ptt, MISCS_REG_RESET_PL_HV, val);
sys/dev/qlnx/qlnxe/ecore_dev.c
3456
ecore_wr(p_hwfn, p_ptt, MISC_REG_CLK_100G_MODE, 1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3457
ecore_wr(p_hwfn, p_ptt, MISCS_REG_CLK_100G_MODE, 1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3458
ecore_wr(p_hwfn, p_ptt, MISC_REG_OPTE_MODE, 1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3459
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3461
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3463
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3468
ecore_emul_link_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
347
if (!ecore_db_rec_sanity(p_hwfn->p_dev, db_entry->db_addr,
sys/dev/qlnx/qlnxe/ecore_dev.c
3470
DP_INFO(p_hwfn->p_dev, "link is not being configured\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
3478
ecore_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3481
u8 rel_pf_id = p_hwfn->rel_pf_id;
sys/dev/qlnx/qlnxe/ecore_dev.c
3487
if (p_hwfn->mcp_info) {
sys/dev/qlnx/qlnxe/ecore_dev.c
3490
p_info = &p_hwfn->mcp_info->func_info;
sys/dev/qlnx/qlnxe/ecore_dev.c
3492
p_hwfn->qm_info.pf_wfq = p_info->bandwidth_min;
sys/dev/qlnx/qlnxe/ecore_dev.c
3495
p_hwfn->qm_info.pf_rl = 100000;
sys/dev/qlnx/qlnxe/ecore_dev.c
3497
ecore_cxt_hw_init_pf(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
3499
ecore_int_igu_init_rt(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
3503
DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "Configuring LLH_FUNC_TAG\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
3504
STORE_RT_REG(p_hwfn, NIG_REG_LLH_FUNC_TAG_EN_RT_OFFSET, 1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3505
STORE_RT_REG(p_hwfn, NIG_REG_LLH_FUNC_TAG_VALUE_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_dev.c
3506
p_hwfn->hw_info.ovlan);
sys/dev/qlnx/qlnxe/ecore_dev.c
3508
DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_dev.c
3510
STORE_RT_REG(p_hwfn, NIG_REG_LLH_FUNC_FILTER_HDR_SEL_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_dev.c
3516
DP_VERBOSE(p_hwfn, ECORE_MSG_HW, "Configuring TAGMAC_CLS_TYPE\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
3517
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3522
STORE_RT_REG(p_hwfn, PRS_REG_SEARCH_TCP_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_dev.c
3523
(p_hwfn->hw_info.personality == ECORE_PCI_ISCSI) ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
3524
STORE_RT_REG(p_hwfn, PRS_REG_SEARCH_FCOE_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_dev.c
3525
(p_hwfn->hw_info.personality == ECORE_PCI_FCOE) ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
3526
STORE_RT_REG(p_hwfn, PRS_REG_SEARCH_ROCE_RT_OFFSET, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
3529
OSAL_BEFORE_PF_START((void *)p_hwfn->p_dev, p_hwfn->my_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
3532
rc = ecore_dmae_sanity(p_hwfn, p_ptt, "pf_phase");
sys/dev/qlnx/qlnxe/ecore_dev.c
3537
rc = ecore_init_run(p_hwfn, p_ptt, PHASE_PF, rel_pf_id, hw_mode);
sys/dev/qlnx/qlnxe/ecore_dev.c
3542
rc = ecore_init_run(p_hwfn, p_ptt, PHASE_QM_PF, rel_pf_id, hw_mode);
sys/dev/qlnx/qlnxe/ecore_dev.c
3547
ecore_int_igu_init_pure_rt(p_hwfn, p_ptt, true, true);
sys/dev/qlnx/qlnxe/ecore_dev.c
355
OSAL_WMB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
3554
pos = OSAL_PCI_FIND_CAPABILITY(p_hwfn->p_dev, PCI_CAP_ID_EXP);
sys/dev/qlnx/qlnxe/ecore_dev.c
3556
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_dev.c
3561
OSAL_PCI_READ_CONFIG_WORD(p_hwfn->p_dev, pos + PCI_EXP_DEVCTL, &ctrl);
sys/dev/qlnx/qlnxe/ecore_dev.c
3565
OSAL_PCI_WRITE_CONFIG_WORD(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_dev.c
3569
OSAL_PCI_WRITE_CONFIG_WORD(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_dev.c
3571
} else if (ecore_mcp_rlx_odr_supported(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
3572
DP_INFO(p_hwfn, "PCI relax ordering configured by MFW\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
3575
OSAL_PCI_WRITE_CONFIG_WORD(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_dev.c
3579
rc = ecore_hw_init_pf_doorbell_bar(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
3584
if (IS_LEAD_HWFN(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
3585
rc = ecore_llh_hw_init_pf(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3593
rc = ecore_int_igu_enable(p_hwfn, p_ptt, p_params->int_mode);
sys/dev/qlnx/qlnxe/ecore_dev.c
3598
rc = ecore_sp_pf_start(p_hwfn, p_ptt, p_params->p_tunn,
sys/dev/qlnx/qlnxe/ecore_dev.c
360
DIRECT_REG_WR(p_hwfn, db_entry->db_addr, *(u32 *)(db_entry->db_data));
sys/dev/qlnx/qlnxe/ecore_dev.c
3601
DP_NOTICE(p_hwfn, true, "Function start ramrod failed\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
3604
prs_reg = ecore_rd(p_hwfn, p_ptt, PRS_REG_SEARCH_TAG1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3605
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_dev.c
3608
if (p_hwfn->hw_info.personality == ECORE_PCI_FCOE)
sys/dev/qlnx/qlnxe/ecore_dev.c
3610
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_TAG1,
sys/dev/qlnx/qlnxe/ecore_dev.c
3612
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3616
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_dev.c
3618
prs_reg = ecore_rd(p_hwfn, p_ptt, PRS_REG_SEARCH_TCP);
sys/dev/qlnx/qlnxe/ecore_dev.c
3619
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_dev.c
362
DIRECT_REG_WR64(p_hwfn, db_entry->db_addr, *(u64 *)(db_entry->db_data));
sys/dev/qlnx/qlnxe/ecore_dev.c
3621
prs_reg = ecore_rd(p_hwfn, p_ptt, PRS_REG_SEARCH_UDP);
sys/dev/qlnx/qlnxe/ecore_dev.c
3622
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_dev.c
3624
prs_reg = ecore_rd(p_hwfn, p_ptt, PRS_REG_SEARCH_FCOE);
sys/dev/qlnx/qlnxe/ecore_dev.c
3625
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_dev.c
3627
prs_reg = ecore_rd(p_hwfn, p_ptt, PRS_REG_SEARCH_ROCE);
sys/dev/qlnx/qlnxe/ecore_dev.c
3628
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_dev.c
3630
prs_reg = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3632
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_dev.c
3635
prs_reg = ecore_rd(p_hwfn, p_ptt, PRS_REG_SEARCH_TAG1);
sys/dev/qlnx/qlnxe/ecore_dev.c
3636
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_dev.c
3642
enum _ecore_status_t ecore_pglueb_set_pfid_enable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3649
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3654
val = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3663
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_dev.c
3671
static void ecore_reset_mb_shadow(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3675
ecore_mcp_read_mb(p_hwfn, p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
3676
OSAL_MEMCPY(p_hwfn->mcp_info->mfw_mb_shadow,
sys/dev/qlnx/qlnxe/ecore_dev.c
3677
p_hwfn->mcp_info->mfw_mb_cur,
sys/dev/qlnx/qlnxe/ecore_dev.c
3678
p_hwfn->mcp_info->mfw_mb_length);
sys/dev/qlnx/qlnxe/ecore_dev.c
368
OSAL_WMB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
3682
ecore_fill_load_req_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3710
(p_hwfn->mcp_info->capabilities &
sys/dev/qlnx/qlnxe/ecore_dev.c
372
void ecore_db_recovery_execute(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3724
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
3732
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3742
static enum _ecore_status_t ecore_vf_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3747
ecore_vf_pf_tunnel_param_update(p_hwfn, p_params->p_tunn);
sys/dev/qlnx/qlnxe/ecore_dev.c
3750
p_hwfn->b_int_enabled = 1;
sys/dev/qlnx/qlnxe/ecore_dev.c
3755
static void ecore_pglueb_clear_err(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3758
ecore_wr(p_hwfn, p_ptt, PGLUE_B_REG_WAS_ERROR_PF_31_0_CLR,
sys/dev/qlnx/qlnxe/ecore_dev.c
3759
1 << p_hwfn->abs_pf_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
3768
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/ecore_dev.c
378
DP_NOTICE(p_hwfn, false, "Executing doorbell recovery. Counter was %d\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
3786
p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
3789
if (!p_hwfn->hw_info.mtu) {
sys/dev/qlnx/qlnxe/ecore_dev.c
379
p_hwfn->db_recovery_info.db_recovery_counter);
sys/dev/qlnx/qlnxe/ecore_dev.c
3790
p_hwfn->hw_info.mtu = 1500;
sys/dev/qlnx/qlnxe/ecore_dev.c
3795
ecore_vf_start(p_hwfn, p_params);
sys/dev/qlnx/qlnxe/ecore_dev.c
3799
rc = ecore_calc_hw_mode(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
3812
STORE_RT_REG(p_hwfn, PRS_REG_TAG_ETHERTYPE_0_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_dev.c
3814
STORE_RT_REG(p_hwfn, NIG_REG_TAG_ETHERTYPE_0_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_dev.c
3816
STORE_RT_REG(p_hwfn, PBF_REG_TAG_ETHERTYPE_0_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_dev.c
3818
STORE_RT_REG(p_hwfn, DORQ_REG_TAG1_ETHERTYPE_RT_OFFSET,
sys/dev/qlnx/qlnxe/ecore_dev.c
382
p_hwfn->db_recovery_info.db_recovery_counter++;
sys/dev/qlnx/qlnxe/ecore_dev.c
3822
rc = ecore_fill_load_req_params(p_hwfn, &load_req_params,
sys/dev/qlnx/qlnxe/ecore_dev.c
3827
rc = ecore_mcp_load_req(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3830
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
3836
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_dev.c
3840
ecore_mcp_set_capabilities(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
3852
ecore_reset_mb_shadow(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
386
OSAL_SPIN_LOCK(&p_hwfn->db_recovery_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
3862
rc = OSAL_SPIN_LOCK_ALLOC(p_hwfn, &qm_lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
3864
DP_ERR(p_hwfn, "qm_lock allocation failed\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
3877
rc = ecore_final_cleanup(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3878
p_hwfn->rel_pf_id, false);
sys/dev/qlnx/qlnxe/ecore_dev.c
388
&p_hwfn->db_recovery_info.list,
sys/dev/qlnx/qlnxe/ecore_dev.c
3880
ecore_hw_err_notify(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3887
ecore_pglueb_rbc_attn_handler(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
3890
rc = ecore_pglueb_set_pfid_enable(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3900
ecore_pglueb_clear_err(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
3904
rc = ecore_hw_init_common(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3905
p_hwfn->hw_info.hw_mode);
sys/dev/qlnx/qlnxe/ecore_dev.c
391
ecore_db_recovery_ring(p_hwfn, db_entry, db_exec);
sys/dev/qlnx/qlnxe/ecore_dev.c
3910
rc = ecore_hw_init_port(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3911
p_hwfn->hw_info.hw_mode);
sys/dev/qlnx/qlnxe/ecore_dev.c
3916
rc = ecore_hw_init_pf(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3917
p_hwfn->hw_info.hw_mode,
sys/dev/qlnx/qlnxe/ecore_dev.c
3921
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
3928
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
3934
rc = ecore_mcp_load_done(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
3936
DP_NOTICE(p_hwfn, false, "Sending load done failed, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_dev.c
3938
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
3946
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_dev.c
3948
rc = ecore_mcp_cmd(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3953
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
3958
p_hwfn->hw_init_done = true;
sys/dev/qlnx/qlnxe/ecore_dev.c
396
OSAL_SPIN_UNLOCK(&p_hwfn->db_recovery_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
3963
p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
3964
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ,
sys/dev/qlnx/qlnxe/ecore_dev.c
3966
rc = ecore_mcp_cmd(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3971
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
3976
p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
3978
rc = ecore_mcp_cmd(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3982
DP_INFO(p_hwfn, "Failed to update firmware version\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
3985
rc = ecore_mcp_ov_update_mtu(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3986
p_hwfn->hw_info.mtu);
sys/dev/qlnx/qlnxe/ecore_dev.c
3988
DP_INFO(p_hwfn, "Failed to update default mtu\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
3991
rc = ecore_mcp_ov_update_driver_state(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
3992
p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
3995
DP_INFO(p_hwfn, "Failed to update driver state\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
3997
rc = ecore_mcp_ov_update_eswitch(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4000
DP_INFO(p_hwfn, "Failed to update eswitch mode\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
4016
cancel_load = ecore_mcp_cancel_load_req(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4018
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4020
ecore_mcp_load_done(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4027
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4033
ecore_wr(p_hwfn, p_ptt, TM_REG_PF_ENABLE_CONN, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4034
ecore_wr(p_hwfn, p_ptt, TM_REG_PF_ENABLE_TASK, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4038
if ((!ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4040
(!ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4053
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
4055
(u8)ecore_rd(p_hwfn, p_ptt, TM_REG_PF_SCAN_ACTIVE_CONN),
sys/dev/qlnx/qlnxe/ecore_dev.c
4056
(u8)ecore_rd(p_hwfn, p_ptt, TM_REG_PF_SCAN_ACTIVE_TASK));
sys/dev/qlnx/qlnxe/ecore_dev.c
4064
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[j];
sys/dev/qlnx/qlnxe/ecore_dev.c
4065
struct ecore_ptt *p_ptt = p_hwfn->p_main_ptt;
sys/dev/qlnx/qlnxe/ecore_dev.c
4067
ecore_hw_timers_stop(p_dev, p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4071
static enum _ecore_status_t ecore_verify_reg_val(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4075
u32 val = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
4078
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_dev.c
4089
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/ecore_dev.c
4095
p_hwfn = &p_dev->hwfns[j];
sys/dev/qlnx/qlnxe/ecore_dev.c
4096
p_ptt = p_hwfn->p_main_ptt;
sys/dev/qlnx/qlnxe/ecore_dev.c
4098
DP_VERBOSE(p_hwfn, ECORE_MSG_IFDOWN, "Stopping hw/fw\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
4101
ecore_vf_pf_int_cleanup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
4102
rc = ecore_vf_pf_reset(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
4104
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_dev.c
4113
p_hwfn->hw_init_done = false;
sys/dev/qlnx/qlnxe/ecore_dev.c
4117
rc = ecore_mcp_unload_req(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4119
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
4126
OSAL_DPC_SYNC(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
4132
rc = ecore_sp_pf_stop(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
4134
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
4141
OSAL_AFTER_PF_STOP((void *)p_dev, p_hwfn->my_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
4144
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4148
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_TCP, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4149
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_UDP, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4150
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_FCOE, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4151
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_ROCE, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4152
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_OPENFLOW, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4157
ecore_hw_timers_stop(p_dev, p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4162
ecore_int_igu_disable_int(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4163
ecore_wr(p_hwfn, p_ptt, IGU_REG_LEADING_EDGE_LATCH, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4164
ecore_wr(p_hwfn, p_ptt, IGU_REG_TRAILING_EDGE_LATCH, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4165
ecore_int_igu_init_pure_rt(p_hwfn, p_ptt, false, true);
sys/dev/qlnx/qlnxe/ecore_dev.c
4166
rc = ecore_int_igu_reset_cam_default(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4168
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_dev.c
4177
ecore_verify_reg_val(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4179
ecore_verify_reg_val(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4185
ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_DB_ENABLE, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4186
ecore_wr(p_hwfn, p_ptt, QM_REG_PF_EN, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4188
if (IS_LEAD_HWFN(p_hwfn) &&
sys/dev/qlnx/qlnxe/ecore_dev.c
4190
!ECORE_IS_FCOE_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
4192
p_hwfn->hw_info.hw_mac_addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
4201
rc = ecore_mcp_unload_done(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4203
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
4205
rc = ecore_mcp_unload_done(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4208
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
4217
p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
4225
rc = ecore_pglueb_set_pfid_enable(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4228
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_dev.c
4243
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[j];
sys/dev/qlnx/qlnxe/ecore_dev.c
4247
ecore_vf_pf_int_cleanup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
4250
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
4254
DP_VERBOSE(p_hwfn, ECORE_MSG_IFDOWN, "Shutting down the fastpath\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
4256
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4259
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_TCP, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4260
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_UDP, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4261
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_FCOE, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4262
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_ROCE, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4263
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_OPENFLOW, 0x0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4270
ecore_int_igu_init_pure_rt(p_hwfn, p_ptt, false, false);
sys/dev/qlnx/qlnxe/ecore_dev.c
4273
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4279
enum _ecore_status_t ecore_hw_start_fastpath(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
4283
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
4286
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
4293
if (p_hwfn->p_rdma_info &&
sys/dev/qlnx/qlnxe/ecore_dev.c
4294
p_hwfn->p_rdma_info->active &&
sys/dev/qlnx/qlnxe/ecore_dev.c
4295
p_hwfn->b_rdma_enabled_in_prs)
sys/dev/qlnx/qlnxe/ecore_dev.c
4296
ecore_wr(p_hwfn, p_ptt, p_hwfn->rdma_prs_search_reg, 0x1);
sys/dev/qlnx/qlnxe/ecore_dev.c
4299
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4301
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4309
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
4315
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
4381
rc = ecore_all_ppfids_wr(p_hwfn, p_ptt, reg_len, pattern_size);
sys/dev/qlnx/qlnxe/ecore_dev.c
4383
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
4388
rc = ecore_all_ppfids_wr(p_hwfn, p_ptt, reg_crc, crc);
sys/dev/qlnx/qlnxe/ecore_dev.c
4390
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
4395
ecore_mcp_wol_wr(p_hwfn, p_ptt, reg_len, pattern_size);
sys/dev/qlnx/qlnxe/ecore_dev.c
4396
ecore_mcp_wol_wr(p_hwfn, p_ptt, reg_crc, crc);
sys/dev/qlnx/qlnxe/ecore_dev.c
4404
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4409
void ecore_wol_buffer_clear(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4413
ECORE_IS_BB(p_hwfn->p_dev) ?
sys/dev/qlnx/qlnxe/ecore_dev.c
4416
DP_INFO(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_dev.c
4421
if (ECORE_IS_BB(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
4422
ecore_wr(p_hwfn, p_ptt, wake_buffer_clear_offset, 1);
sys/dev/qlnx/qlnxe/ecore_dev.c
4423
ecore_wr(p_hwfn, p_ptt, wake_buffer_clear_offset, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4425
ecore_mcp_wol_wr(p_hwfn, p_ptt, wake_buffer_clear_offset, 1);
sys/dev/qlnx/qlnxe/ecore_dev.c
4426
ecore_mcp_wol_wr(p_hwfn, p_ptt, wake_buffer_clear_offset, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
4430
enum _ecore_status_t ecore_get_wake_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4434
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
4441
wake_info->wk_info = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4444
wake_info->wk_details = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4447
wake_info->wk_pkt_len = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4470
buf[i] = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4476
ecore_wol_buffer_clear(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4482
static void ecore_hw_hwfn_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
4484
ecore_ptt_pool_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
4485
OSAL_FREE(p_hwfn->p_dev, p_hwfn->hw_info.p_igu_info);
sys/dev/qlnx/qlnxe/ecore_dev.c
4486
p_hwfn->hw_info.p_igu_info = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_dev.c
4490
static void ecore_hw_hwfn_prepare(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
4493
if (ECORE_IS_AH(p_hwfn->p_dev) || ECORE_IS_E5(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
4494
ecore_wr(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4496
ecore_wr(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4498
ecore_wr(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4500
ecore_wr(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4503
ecore_wr(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4505
ecore_wr(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4507
ecore_wr(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4509
ecore_wr(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4514
ecore_pglueb_clear_err(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4517
ecore_wr(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4521
static void get_function_id(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
4524
p_hwfn->hw_info.opaque_fid = (u16) REG_RD(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4527
p_hwfn->hw_info.concrete_fid = REG_RD(p_hwfn, PXP_PF_ME_CONCRETE_ADDR);
sys/dev/qlnx/qlnxe/ecore_dev.c
4530
p_hwfn->abs_pf_id = (p_hwfn->hw_info.concrete_fid >> 16) & 0xf;
sys/dev/qlnx/qlnxe/ecore_dev.c
4531
p_hwfn->rel_pf_id = GET_FIELD(p_hwfn->hw_info.concrete_fid,
sys/dev/qlnx/qlnxe/ecore_dev.c
4533
p_hwfn->port_id = GET_FIELD(p_hwfn->hw_info.concrete_fid,
sys/dev/qlnx/qlnxe/ecore_dev.c
4536
DP_VERBOSE(p_hwfn, ECORE_MSG_PROBE,
sys/dev/qlnx/qlnxe/ecore_dev.c
4538
p_hwfn->hw_info.concrete_fid, p_hwfn->hw_info.opaque_fid);
sys/dev/qlnx/qlnxe/ecore_dev.c
4541
void ecore_hw_set_feat(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
4543
u32 *feat_num = p_hwfn->hw_info.feat_num;
sys/dev/qlnx/qlnxe/ecore_dev.c
4548
ecore_int_get_num_sbs(p_hwfn, &sb_cnt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4555
if (ECORE_IS_RDMA_PERSONALITY(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
4563
RESC_NUM(p_hwfn, ECORE_RDMA_CNQ_RAM));
sys/dev/qlnx/qlnxe/ecore_dev.c
4567
max_cnqs = (u32)p_hwfn->pf_params.rdma_pf_params.max_cnqs;
sys/dev/qlnx/qlnxe/ecore_dev.c
4583
if (ECORE_IS_L2_PERSONALITY(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
4587
RESC_NUM(p_hwfn, ECORE_L2_QUEUE),
sys/dev/qlnx/qlnxe/ecore_dev.c
4592
RESC_NUM(p_hwfn, ECORE_L2_QUEUE) -
sys/dev/qlnx/qlnxe/ecore_dev.c
4593
FEAT_NUM(p_hwfn, ECORE_VF_L2_QUE));
sys/dev/qlnx/qlnxe/ecore_dev.c
4596
if (ECORE_IS_FCOE_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
4598
OSAL_MIN_T(u32, sb_cnt.cnt, RESC_NUM(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4601
if (ECORE_IS_ISCSI_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
4603
OSAL_MIN_T(u32, sb_cnt.cnt, RESC_NUM(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4606
DP_VERBOSE(p_hwfn, ECORE_MSG_PROBE,
sys/dev/qlnx/qlnxe/ecore_dev.c
4608
(int)FEAT_NUM(p_hwfn, ECORE_PF_L2_QUE),
sys/dev/qlnx/qlnxe/ecore_dev.c
4609
(int)FEAT_NUM(p_hwfn, ECORE_VF_L2_QUE),
sys/dev/qlnx/qlnxe/ecore_dev.c
4610
(int)FEAT_NUM(p_hwfn, ECORE_RDMA_CNQ),
sys/dev/qlnx/qlnxe/ecore_dev.c
4611
(int)FEAT_NUM(p_hwfn, ECORE_FCOE_CQ),
sys/dev/qlnx/qlnxe/ecore_dev.c
4612
(int)FEAT_NUM(p_hwfn, ECORE_ISCSI_CQ),
sys/dev/qlnx/qlnxe/ecore_dev.c
4653
__ecore_hw_set_soft_resc_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4661
rc = ecore_mcp_set_resc_max_val(p_hwfn, p_ptt, res_id,
sys/dev/qlnx/qlnxe/ecore_dev.c
4664
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
4671
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4679
ecore_hw_set_soft_resc_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4682
bool b_ah = ECORE_IS_AH(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
4709
rc = __ecore_hw_set_soft_resc_size(p_hwfn, p_ptt, res_id,
sys/dev/qlnx/qlnxe/ecore_dev.c
4728
enum _ecore_status_t ecore_hw_get_dflt_resc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4732
u8 num_funcs = p_hwfn->num_funcs_on_engine;
sys/dev/qlnx/qlnxe/ecore_dev.c
4733
bool b_ah = ECORE_IS_AH(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
4779
if (p_hwfn->hw_info.personality != ECORE_PCI_ISCSI &&
sys/dev/qlnx/qlnxe/ecore_dev.c
4780
p_hwfn->hw_info.personality != ECORE_PCI_FCOE)
sys/dev/qlnx/qlnxe/ecore_dev.c
4799
else if (p_hwfn->p_dev->num_ports_in_engine == 4)
sys/dev/qlnx/qlnxe/ecore_dev.c
4800
*p_resc_start = p_hwfn->port_id;
sys/dev/qlnx/qlnxe/ecore_dev.c
4801
else if (p_hwfn->hw_info.personality == ECORE_PCI_ISCSI)
sys/dev/qlnx/qlnxe/ecore_dev.c
4802
*p_resc_start = p_hwfn->port_id;
sys/dev/qlnx/qlnxe/ecore_dev.c
4803
else if (p_hwfn->hw_info.personality == ECORE_PCI_FCOE)
sys/dev/qlnx/qlnxe/ecore_dev.c
4804
*p_resc_start = p_hwfn->port_id + 2;
sys/dev/qlnx/qlnxe/ecore_dev.c
4807
*p_resc_start = *p_resc_num * p_hwfn->enabled_func_idx;
sys/dev/qlnx/qlnxe/ecore_dev.c
4815
__ecore_hw_set_resc_info(struct ecore_hwfn *p_hwfn, enum ecore_resources res_id,
sys/dev/qlnx/qlnxe/ecore_dev.c
4822
p_resc_num = &RESC_NUM(p_hwfn, res_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
4823
p_resc_start = &RESC_START(p_hwfn, res_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
4825
rc = ecore_hw_get_dflt_resc(p_hwfn, res_id, &dflt_resc_num,
sys/dev/qlnx/qlnxe/ecore_dev.c
4828
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4835
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
4842
rc = ecore_mcp_get_resc_info(p_hwfn, p_hwfn->p_main_ptt, res_id,
sys/dev/qlnx/qlnxe/ecore_dev.c
4845
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
4857
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4869
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4885
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4896
static enum _ecore_status_t ecore_hw_set_resc_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4903
rc = __ecore_hw_set_resc_info(p_hwfn, res_id, drv_resc_alloc);
sys/dev/qlnx/qlnxe/ecore_dev.c
4911
static enum _ecore_status_t ecore_hw_get_ppfid_bitmap(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4914
u8 native_ppfid_idx = ECORE_PPFID_BY_PFID(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
4915
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
4918
rc = ecore_mcp_get_ppfid_bitmap(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4925
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4934
static enum _ecore_status_t ecore_hw_get_resc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4940
bool b_ah = ECORE_IS_AH(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
4944
u32 *resc_start = p_hwfn->hw_info.resc_start;
sys/dev/qlnx/qlnxe/ecore_dev.c
4945
u32 *resc_num = p_hwfn->hw_info.resc_num;
sys/dev/qlnx/qlnxe/ecore_dev.c
4976
rc = ecore_mcp_resc_lock(p_hwfn, p_ptt, &resc_lock_params);
sys/dev/qlnx/qlnxe/ecore_dev.c
4980
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4983
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
4987
rc = ecore_hw_set_soft_resc_size(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
4989
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
4993
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
4995
rc = ecore_mcp_resc_unlock(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
4998
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
5003
rc = ecore_hw_set_resc_info(p_hwfn, drv_resc_alloc);
sys/dev/qlnx/qlnxe/ecore_dev.c
5008
rc = ecore_mcp_resc_unlock(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5011
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
5016
if (IS_LEAD_HWFN(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5017
rc = ecore_hw_get_ppfid_bitmap(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5023
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5025
if (!(p_hwfn->p_dev->b_is_emul_full)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5028
p_hwfn->enabled_func_idx;
sys/dev/qlnx/qlnxe/ecore_dev.c
5036
if (!p_hwfn->rel_pf_id && p_hwfn->p_dev->b_is_emul_full)
sys/dev/qlnx/qlnxe/ecore_dev.c
5043
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev) &&
sys/dev/qlnx/qlnxe/ecore_dev.c
5044
p_hwfn->p_dev->b_is_emul_full &&
sys/dev/qlnx/qlnxe/ecore_dev.c
5045
p_hwfn->rel_pf_id &&
sys/dev/qlnx/qlnxe/ecore_dev.c
5052
if ((b_ah && (RESC_END(p_hwfn, ECORE_ILT) > PXP_NUM_ILT_RECORDS_K2)) ||
sys/dev/qlnx/qlnxe/ecore_dev.c
5053
(!b_ah && (RESC_END(p_hwfn, ECORE_ILT) > PXP_NUM_ILT_RECORDS_BB))) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5054
DP_NOTICE(p_hwfn, true, "Can't assign ILT pages [%08x,...,%08x]\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
5055
RESC_START(p_hwfn, ECORE_ILT),
sys/dev/qlnx/qlnxe/ecore_dev.c
5056
RESC_END(p_hwfn, ECORE_ILT) - 1);
sys/dev/qlnx/qlnxe/ecore_dev.c
5061
if (ecore_int_igu_reset_cam(p_hwfn, p_ptt))
sys/dev/qlnx/qlnxe/ecore_dev.c
5064
ecore_hw_set_feat(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5066
DP_VERBOSE(p_hwfn, ECORE_MSG_PROBE,
sys/dev/qlnx/qlnxe/ecore_dev.c
5069
DP_VERBOSE(p_hwfn, ECORE_MSG_PROBE, "%s = %d start = %d\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
5071
RESC_NUM(p_hwfn, res_id),
sys/dev/qlnx/qlnxe/ecore_dev.c
5072
RESC_START(p_hwfn, res_id));
sys/dev/qlnx/qlnxe/ecore_dev.c
5078
ecore_mcp_resc_unlock(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5084
ecore_hw_get_nvm_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
5096
nvm_cfg_addr = ecore_rd(p_hwfn, p_ptt, MISC_REG_GEN_PURP_CR0);
sys/dev/qlnx/qlnxe/ecore_dev.c
5100
DP_NOTICE(p_hwfn, false, "Shared memory not initialized\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5107
nvm_cfg1_offset = ecore_rd(p_hwfn, p_ptt, nvm_cfg_addr + 4);
sys/dev/qlnx/qlnxe/ecore_dev.c
5113
core_cfg = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
5118
p_hwfn->hw_info.port_mode = ECORE_PORT_MODE_DE_2X40G;
sys/dev/qlnx/qlnxe/ecore_dev.c
5121
p_hwfn->hw_info.port_mode = ECORE_PORT_MODE_DE_2X50G;
sys/dev/qlnx/qlnxe/ecore_dev.c
5124
p_hwfn->hw_info.port_mode = ECORE_PORT_MODE_DE_1X100G;
sys/dev/qlnx/qlnxe/ecore_dev.c
5127
p_hwfn->hw_info.port_mode = ECORE_PORT_MODE_DE_4X10G_F;
sys/dev/qlnx/qlnxe/ecore_dev.c
5130
p_hwfn->hw_info.port_mode = ECORE_PORT_MODE_DE_4X10G_E;
sys/dev/qlnx/qlnxe/ecore_dev.c
5133
p_hwfn->hw_info.port_mode = ECORE_PORT_MODE_DE_4X20G;
sys/dev/qlnx/qlnxe/ecore_dev.c
5136
p_hwfn->hw_info.port_mode = ECORE_PORT_MODE_DE_1X40G;
sys/dev/qlnx/qlnxe/ecore_dev.c
5139
p_hwfn->hw_info.port_mode = ECORE_PORT_MODE_DE_2X25G;
sys/dev/qlnx/qlnxe/ecore_dev.c
5142
p_hwfn->hw_info.port_mode = ECORE_PORT_MODE_DE_2X10G;
sys/dev/qlnx/qlnxe/ecore_dev.c
5145
p_hwfn->hw_info.port_mode = ECORE_PORT_MODE_DE_1X25G;
sys/dev/qlnx/qlnxe/ecore_dev.c
5148
p_hwfn->hw_info.port_mode = ECORE_PORT_MODE_DE_4X25G;
sys/dev/qlnx/qlnxe/ecore_dev.c
5151
DP_NOTICE(p_hwfn, true, "Unknown port mode in 0x%08x\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
5159
OFFSETOF(struct nvm_cfg1, port[MFW_PORT(p_hwfn)]);
sys/dev/qlnx/qlnxe/ecore_dev.c
5160
dcbx_mode = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5167
p_hwfn->hw_info.dcbx_mode = ECORE_DCBX_VERSION_DYNAMIC;
sys/dev/qlnx/qlnxe/ecore_dev.c
5170
p_hwfn->hw_info.dcbx_mode = ECORE_DCBX_VERSION_CEE;
sys/dev/qlnx/qlnxe/ecore_dev.c
5173
p_hwfn->hw_info.dcbx_mode = ECORE_DCBX_VERSION_IEEE;
sys/dev/qlnx/qlnxe/ecore_dev.c
5176
p_hwfn->hw_info.dcbx_mode = ECORE_DCBX_VERSION_DISABLED;
sys/dev/qlnx/qlnxe/ecore_dev.c
5181
link = &p_hwfn->mcp_info->link_input;
sys/dev/qlnx/qlnxe/ecore_dev.c
5182
p_caps = &p_hwfn->mcp_info->link_capabilities;
sys/dev/qlnx/qlnxe/ecore_dev.c
5184
OFFSETOF(struct nvm_cfg1, port[MFW_PORT(p_hwfn)]);
sys/dev/qlnx/qlnxe/ecore_dev.c
5185
link_temp = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5192
link_temp = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5222
DP_NOTICE(p_hwfn, true, "Unknown Speed in 0x%08x\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
5239
if (p_hwfn->mcp_info->capabilities & FW_MB_PARAM_FEATURE_SUPPORT_EEE) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5240
link_temp = ecore_rd(p_hwfn, p_ptt, port_cfg_addr +
sys/dev/qlnx/qlnxe/ecore_dev.c
5270
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
sys/dev/qlnx/qlnxe/ecore_dev.c
5281
generic_cont0 = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
5288
p_hwfn->p_dev->mf_bits = 1 << ECORE_MF_OVLAN_CLSS;
sys/dev/qlnx/qlnxe/ecore_dev.c
5291
p_hwfn->p_dev->mf_bits = 1 << ECORE_MF_OVLAN_CLSS |
sys/dev/qlnx/qlnxe/ecore_dev.c
5297
p_hwfn->p_dev->mf_bits = 1 << ECORE_MF_OVLAN_CLSS |
sys/dev/qlnx/qlnxe/ecore_dev.c
5302
p_hwfn->p_dev->mf_bits = 1 << ECORE_MF_LLH_MAC_CLSS |
sys/dev/qlnx/qlnxe/ecore_dev.c
5309
p_hwfn->p_dev->mf_bits = 1 << ECORE_MF_LLH_MAC_CLSS |
sys/dev/qlnx/qlnxe/ecore_dev.c
5312
if (ECORE_IS_BB(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
5313
p_hwfn->p_dev->mf_bits |= 1 << ECORE_MF_NEED_DEF_PF;
sys/dev/qlnx/qlnxe/ecore_dev.c
5316
DP_INFO(p_hwfn, "Multi function mode is 0x%lx\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
5317
p_hwfn->p_dev->mf_bits);
sys/dev/qlnx/qlnxe/ecore_dev.c
5319
if (ECORE_IS_CMT(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
5320
p_hwfn->p_dev->mf_bits |= (1 << ECORE_MF_DISABLE_ARFS);
sys/dev/qlnx/qlnxe/ecore_dev.c
5330
p_hwfn->p_dev->mf_mode = ECORE_MF_OVLAN;
sys/dev/qlnx/qlnxe/ecore_dev.c
5333
p_hwfn->p_dev->mf_mode = ECORE_MF_NPAR;
sys/dev/qlnx/qlnxe/ecore_dev.c
5336
p_hwfn->p_dev->mf_mode = ECORE_MF_DEFAULT;
sys/dev/qlnx/qlnxe/ecore_dev.c
5339
p_hwfn->p_dev->mf_mode = ECORE_MF_UFP;
sys/dev/qlnx/qlnxe/ecore_dev.c
5349
device_capabilities = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
5352
&p_hwfn->hw_info.device_capabilities);
sys/dev/qlnx/qlnxe/ecore_dev.c
5355
&p_hwfn->hw_info.device_capabilities);
sys/dev/qlnx/qlnxe/ecore_dev.c
5358
&p_hwfn->hw_info.device_capabilities);
sys/dev/qlnx/qlnxe/ecore_dev.c
5361
&p_hwfn->hw_info.device_capabilities);
sys/dev/qlnx/qlnxe/ecore_dev.c
5364
&p_hwfn->hw_info.device_capabilities);
sys/dev/qlnx/qlnxe/ecore_dev.c
5366
rc = ecore_mcp_fill_shmem_func_info(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5375
static void ecore_get_num_funcs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
5378
u8 num_funcs, enabled_func_idx = p_hwfn->rel_pf_id;
sys/dev/qlnx/qlnxe/ecore_dev.c
5380
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
5392
reg_function_hide = ecore_rd(p_hwfn, p_ptt, MISCS_REG_FUNCTION_HIDE);
sys/dev/qlnx/qlnxe/ecore_dev.c
5396
if (ECORE_PATH_ID(p_hwfn) && !ECORE_IS_CMT(p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5417
low_pfs_mask = (0x1 << p_hwfn->abs_pf_id) - 1;
sys/dev/qlnx/qlnxe/ecore_dev.c
5426
p_hwfn->num_funcs_on_engine = num_funcs;
sys/dev/qlnx/qlnxe/ecore_dev.c
5427
p_hwfn->enabled_func_idx = enabled_func_idx;
sys/dev/qlnx/qlnxe/ecore_dev.c
5431
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
5433
p_hwfn->num_funcs_on_engine = 4;
sys/dev/qlnx/qlnxe/ecore_dev.c
5437
DP_VERBOSE(p_hwfn, ECORE_MSG_PROBE,
sys/dev/qlnx/qlnxe/ecore_dev.c
5439
p_hwfn->rel_pf_id, p_hwfn->abs_pf_id,
sys/dev/qlnx/qlnxe/ecore_dev.c
5440
p_hwfn->enabled_func_idx, p_hwfn->num_funcs_on_engine);
sys/dev/qlnx/qlnxe/ecore_dev.c
5443
static void ecore_hw_info_port_num_bb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
5446
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
5458
port_mode = ecore_rd(p_hwfn, p_ptt, CNIG_REG_NW_PORT_MODE_BB);
sys/dev/qlnx/qlnxe/ecore_dev.c
5465
DP_NOTICE(p_hwfn, true, "PORT MODE: %d not supported\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
5473
static void ecore_hw_info_port_num_ah_e5(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
5476
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
5484
port = ecore_rd(p_hwfn, p_ptt, MISCS_REG_ECO_RESERVED);
sys/dev/qlnx/qlnxe/ecore_dev.c
5496
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
5503
port = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5510
DP_NOTICE(p_hwfn, true, "All NIG ports are inactive\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5517
static void ecore_hw_info_port_num(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
5520
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
5524
ecore_hw_info_port_num_bb(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5526
ecore_hw_info_port_num_ah_e5(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5540
addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
sys/dev/qlnx/qlnxe/ecore_dev.c
5542
global_offsize = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
5545
p_dev->num_ports = (u8)ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
5549
static void ecore_mcp_get_eee_caps(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
5555
p_caps = &p_hwfn->mcp_info->link_capabilities;
sys/dev/qlnx/qlnxe/ecore_dev.c
5560
eee_status = ecore_rd(p_hwfn, p_ptt, p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_dev.c
5571
ecore_get_hw_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5579
if (IS_LEAD_HWFN(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5580
rc = ecore_iov_hw_info(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5590
if (IS_LEAD_HWFN(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
5591
ecore_hw_info_port_num(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5593
ecore_mcp_get_capabilities(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5596
if (CHIP_REV_IS_ASIC(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5598
rc = ecore_hw_get_nvm_info(p_hwfn, p_ptt, p_params);
sys/dev/qlnx/qlnxe/ecore_dev.c
5605
rc = ecore_int_igu_read_cam(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5614
if (CHIP_REV_IS_ASIC(p_hwfn->p_dev) && ecore_mcp_is_init(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5616
OSAL_MEMCPY(p_hwfn->hw_info.hw_mac_addr,
sys/dev/qlnx/qlnxe/ecore_dev.c
5617
p_hwfn->mcp_info->func_info.mac, ETH_ALEN);
sys/dev/qlnx/qlnxe/ecore_dev.c
5622
OSAL_MEMCPY(p_hwfn->hw_info.hw_mac_addr, mcp_hw_mac, ETH_ALEN);
sys/dev/qlnx/qlnxe/ecore_dev.c
5623
p_hwfn->hw_info.hw_mac_addr[5] = p_hwfn->abs_pf_id;
sys/dev/qlnx/qlnxe/ecore_dev.c
5627
if (ecore_mcp_is_init(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5628
if (p_hwfn->mcp_info->func_info.ovlan != ECORE_MCP_VLAN_UNSET)
sys/dev/qlnx/qlnxe/ecore_dev.c
5629
p_hwfn->hw_info.ovlan =
sys/dev/qlnx/qlnxe/ecore_dev.c
5630
p_hwfn->mcp_info->func_info.ovlan;
sys/dev/qlnx/qlnxe/ecore_dev.c
5632
ecore_mcp_cmd_port_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5634
ecore_mcp_get_eee_caps(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5636
ecore_mcp_read_ufp_config(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5640
p_hwfn->hw_info.personality = personality;
sys/dev/qlnx/qlnxe/ecore_dev.c
5641
} else if (ecore_mcp_is_init(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5644
protocol = p_hwfn->mcp_info->func_info.protocol;
sys/dev/qlnx/qlnxe/ecore_dev.c
5645
p_hwfn->hw_info.personality = protocol;
sys/dev/qlnx/qlnxe/ecore_dev.c
5652
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev) && ECORE_IS_AH(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5653
if (!p_hwfn->rel_pf_id)
sys/dev/qlnx/qlnxe/ecore_dev.c
5654
p_hwfn->hw_info.personality = ECORE_PCI_ETH_ROCE;
sys/dev/qlnx/qlnxe/ecore_dev.c
5656
p_hwfn->hw_info.personality = ECORE_PCI_ETH;
sys/dev/qlnx/qlnxe/ecore_dev.c
5664
p_hwfn->hw_info.num_hw_tc = NUM_PHYS_TCS_4PORT_K2;
sys/dev/qlnx/qlnxe/ecore_dev.c
5669
p_hwfn->hw_info.num_active_tc = 1;
sys/dev/qlnx/qlnxe/ecore_dev.c
5671
ecore_get_num_funcs(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5673
if (ecore_mcp_is_init(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
5674
p_hwfn->hw_info.mtu = p_hwfn->mcp_info->func_info.mtu;
sys/dev/qlnx/qlnxe/ecore_dev.c
5682
rc = ecore_hw_get_resc(p_hwfn, p_ptt, drv_resc_alloc);
sys/dev/qlnx/qlnxe/ecore_dev.c
5702
static enum _ecore_status_t ecore_get_dev_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
5705
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
5728
DP_NOTICE(p_hwfn, true, "Unknown device id 0x%x\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
5733
tmp = ecore_rd(p_hwfn, p_ptt, MISCS_REG_CHIP_NUM);
sys/dev/qlnx/qlnxe/ecore_dev.c
5735
tmp = ecore_rd(p_hwfn, p_ptt, MISCS_REG_CHIP_REV);
sys/dev/qlnx/qlnxe/ecore_dev.c
5739
tmp = ecore_rd(p_hwfn, p_ptt, MISCS_REG_CMT_ENABLED_FOR_PAIR);
sys/dev/qlnx/qlnxe/ecore_dev.c
5741
if (tmp & (1 << p_hwfn->rel_pf_id)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5758
tmp = ecore_rd(p_hwfn, p_ptt, MISCS_REG_CHIP_TEST_REG);
sys/dev/qlnx/qlnxe/ecore_dev.c
5760
tmp = ecore_rd(p_hwfn, p_ptt, MISCS_REG_CHIP_METAL);
sys/dev/qlnx/qlnxe/ecore_dev.c
5778
ecore_wr(p_hwfn, p_ptt, MISCS_REG_PLL_MAIN_CTRL_4, 0x1);
sys/dev/qlnx/qlnxe/ecore_dev.c
5781
tmp = ecore_rd(p_hwfn, p_ptt, MISCS_REG_ECO_RESERVED);
sys/dev/qlnx/qlnxe/ecore_dev.c
5783
DP_NOTICE(p_hwfn, false, "Emulation: Running on a FULL build\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5786
DP_NOTICE(p_hwfn, false, "Emulation: Running on a REDUCED build\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5803
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[j];
sys/dev/qlnx/qlnxe/ecore_dev.c
5805
DP_VERBOSE(p_hwfn, ECORE_MSG_IFDOWN, "Mark hw/fw uninitialized\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5807
p_hwfn->hw_init_done = false;
sys/dev/qlnx/qlnxe/ecore_dev.c
5809
ecore_ptt_invalidate(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5821
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[j];
sys/dev/qlnx/qlnxe/ecore_dev.c
5822
struct ecore_ptt *p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5824
ecore_hw_hwfn_prepare(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5827
DP_NOTICE(p_hwfn, false, "ptt acquire failed\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5829
ecore_load_mcp_offsets(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5830
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5832
DP_VERBOSE(p_hwfn, ECORE_MSG_IFUP, "Reinitialized hw after low power state\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5839
ecore_hw_prepare_single(struct ecore_hwfn *p_hwfn, void OSAL_IOMEM *p_regview,
sys/dev/qlnx/qlnxe/ecore_dev.c
5844
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
5849
p_hwfn->regview = p_regview;
sys/dev/qlnx/qlnxe/ecore_dev.c
5850
p_hwfn->doorbells = p_doorbells;
sys/dev/qlnx/qlnxe/ecore_dev.c
5851
p_hwfn->db_phys_addr = db_phys_addr;
sys/dev/qlnx/qlnxe/ecore_dev.c
5854
p_hwfn->reg_offset = (u8 *)p_hwfn->regview - (u8 *)p_hwfn->p_dev->regview;
sys/dev/qlnx/qlnxe/ecore_dev.c
5855
p_hwfn->db_offset = (u8 *)p_hwfn->doorbells - (u8 *)p_hwfn->p_dev->doorbells;
sys/dev/qlnx/qlnxe/ecore_dev.c
5859
return ecore_vf_hw_prepare(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5862
if (REG_RD(p_hwfn, PXP_PF_ME_OPAQUE_ADDR) == 0xffffffff) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5863
DP_ERR(p_hwfn, "Reading the ME register returns all Fs; Preventing further chip access\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5869
get_function_id(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5872
rc = ecore_ptt_pool_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5874
DP_NOTICE(p_hwfn, false, "Failed to prepare hwfn's hw\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5881
p_hwfn->p_main_ptt = ecore_get_reserved_ptt(p_hwfn, RESERVED_PTT_MAIN);
sys/dev/qlnx/qlnxe/ecore_dev.c
5884
if (!p_hwfn->my_id) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5885
rc = ecore_get_dev_info(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5894
ecore_hw_hwfn_prepare(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5897
rc = ecore_mcp_cmd_init(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5899
DP_NOTICE(p_hwfn, false, "Failed initializing mcp command\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5906
rc = ecore_get_hw_info(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5909
DP_NOTICE(p_hwfn, false, "Failed to get HW information\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5916
if (p_params->initiate_pf_flr && IS_LEAD_HWFN(p_hwfn) &&
sys/dev/qlnx/qlnxe/ecore_dev.c
5918
rc = ecore_mcp_initiate_pf_flr(p_hwfn, p_hwfn->p_main_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
5920
DP_NOTICE(p_hwfn, false, "Failed to initiate PF FLR\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5924
if (IS_LEAD_HWFN(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
5928
rc = ecore_mcp_mdump_get_info(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5931
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
5934
rc = ecore_mcp_mdump_get_retain(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5937
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
5942
ecore_mcp_mdump_set_values(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5950
rc = ecore_init_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5952
DP_NOTICE(p_hwfn, false, "Failed to allocate the init array\n");
sys/dev/qlnx/qlnxe/ecore_dev.c
5960
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
5962
ecore_wr(p_hwfn, p_hwfn->p_main_ptt, PCIE_REG_PRTY_MASK_K2_E5,
sys/dev/qlnx/qlnxe/ecore_dev.c
5965
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
5967
ecore_wr(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
5974
if (IS_LEAD_HWFN(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
5976
ecore_mcp_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5978
ecore_hw_hwfn_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
5986
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
6000
rc = ecore_hw_prepare_single(p_hwfn, p_dev->regview,
sys/dev/qlnx/qlnxe/ecore_dev.c
6006
p_params->personality = p_hwfn->hw_info.personality;
sys/dev/qlnx/qlnxe/ecore_dev.c
6016
offset = ecore_hw_bar_size(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
6021
offset = ecore_hw_bar_size(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
6041
ecore_init_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6042
ecore_mcp_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6043
ecore_hw_hwfn_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6056
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
6060
ecore_mcp_ov_update_driver_state(p_hwfn, p_hwfn->p_main_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
6064
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
6067
ecore_vf_pf_release(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6071
ecore_init_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6072
ecore_hw_hwfn_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6073
ecore_mcp_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6076
OSAL_SPIN_LOCK_DEALLOC(&p_hwfn->dmae_info.lock);
sys/dev/qlnx/qlnxe/ecore_dev.c
6370
enum _ecore_status_t ecore_fw_l2_queue(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6373
if (src_id >= RESC_NUM(p_hwfn, ECORE_L2_QUEUE)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
6376
min = (u16)RESC_START(p_hwfn, ECORE_L2_QUEUE);
sys/dev/qlnx/qlnxe/ecore_dev.c
6377
max = min + RESC_NUM(p_hwfn, ECORE_L2_QUEUE);
sys/dev/qlnx/qlnxe/ecore_dev.c
6378
DP_NOTICE(p_hwfn, true, "l2_queue id [%d] is not valid, available indices [%d - %d]\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
6384
*dst_id = RESC_START(p_hwfn, ECORE_L2_QUEUE) + src_id;
sys/dev/qlnx/qlnxe/ecore_dev.c
6389
enum _ecore_status_t ecore_fw_vport(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6392
if (src_id >= RESC_NUM(p_hwfn, ECORE_VPORT)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
6395
min = (u8)RESC_START(p_hwfn, ECORE_VPORT);
sys/dev/qlnx/qlnxe/ecore_dev.c
6396
max = min + RESC_NUM(p_hwfn, ECORE_VPORT);
sys/dev/qlnx/qlnxe/ecore_dev.c
6397
DP_NOTICE(p_hwfn, true, "vport id [%d] is not valid, available indices [%d - %d]\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
6403
*dst_id = RESC_START(p_hwfn, ECORE_VPORT) + src_id;
sys/dev/qlnx/qlnxe/ecore_dev.c
6408
enum _ecore_status_t ecore_fw_rss_eng(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6411
if (src_id >= RESC_NUM(p_hwfn, ECORE_RSS_ENG)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
6414
min = (u8)RESC_START(p_hwfn, ECORE_RSS_ENG);
sys/dev/qlnx/qlnxe/ecore_dev.c
6415
max = min + RESC_NUM(p_hwfn, ECORE_RSS_ENG);
sys/dev/qlnx/qlnxe/ecore_dev.c
6416
DP_NOTICE(p_hwfn, true, "rss_eng id [%d] is not valid, available indices [%d - %d]\n",
sys/dev/qlnx/qlnxe/ecore_dev.c
6422
*dst_id = RESC_START(p_hwfn, ECORE_RSS_ENG) + src_id;
sys/dev/qlnx/qlnxe/ecore_dev.c
6428
ecore_llh_set_function_as_default(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6431
if (OSAL_TEST_BIT(ECORE_MF_NEED_DEF_PF, &p_hwfn->p_dev->mf_bits)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
6432
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
6434
1 << p_hwfn->abs_pf_id / 2);
sys/dev/qlnx/qlnxe/ecore_dev.c
6435
ecore_wr(p_hwfn, p_ptt, PRS_REG_MSG_INFO, 0);
sys/dev/qlnx/qlnxe/ecore_dev.c
6438
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
6444
static enum _ecore_status_t ecore_set_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6452
if (p_hwfn->p_dev->int_coalescing_mode != ECORE_COAL_MODE_ENABLE) {
sys/dev/qlnx/qlnxe/ecore_dev.c
6453
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_dev.c
6462
ecore_memcpy_to(p_hwfn, p_ptt, hw_addr, p_eth_qzone, eth_qzone_size);
sys/dev/qlnx/qlnxe/ecore_dev.c
6467
enum _ecore_status_t ecore_set_queue_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6481
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_dev.c
6482
return ecore_vf_pf_set_coalesce(p_hwfn, rx_coal,
sys/dev/qlnx/qlnxe/ecore_dev.c
6486
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6491
rc = ecore_set_rxq_coalesce(p_hwfn, p_ptt, rx_coal, p_cid);
sys/dev/qlnx/qlnxe/ecore_dev.c
6494
p_hwfn->p_dev->rx_coalesce_usecs = rx_coal;
sys/dev/qlnx/qlnxe/ecore_dev.c
6498
rc = ecore_set_txq_coalesce(p_hwfn, p_ptt, tx_coal, p_cid);
sys/dev/qlnx/qlnxe/ecore_dev.c
6501
p_hwfn->p_dev->tx_coalesce_usecs = tx_coal;
sys/dev/qlnx/qlnxe/ecore_dev.c
6504
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
6509
enum _ecore_status_t ecore_set_rxq_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6527
DP_ERR(p_hwfn, "Invalid coalesce value - %d\n", coalesce);
sys/dev/qlnx/qlnxe/ecore_dev.c
6532
rc = ecore_int_set_timer_res(p_hwfn, p_ptt, timer_res,
sys/dev/qlnx/qlnxe/ecore_dev.c
6540
rc = ecore_set_coalesce(p_hwfn, p_ptt, address, ð_qzone,
sys/dev/qlnx/qlnxe/ecore_dev.c
6549
enum _ecore_status_t ecore_set_txq_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6567
DP_ERR(p_hwfn, "Invalid coalesce value - %d\n", coalesce);
sys/dev/qlnx/qlnxe/ecore_dev.c
6572
rc = ecore_int_set_timer_res(p_hwfn, p_ptt, timer_res,
sys/dev/qlnx/qlnxe/ecore_dev.c
6580
rc = ecore_set_coalesce(p_hwfn, p_ptt, address, ð_qzone,
sys/dev/qlnx/qlnxe/ecore_dev.c
6590
static void ecore_configure_wfq_for_all_vports(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6597
vport_params = p_hwfn->qm_info.qm_vport_params;
sys/dev/qlnx/qlnxe/ecore_dev.c
6599
for (i = 0; i < p_hwfn->qm_info.num_vports; i++) {
sys/dev/qlnx/qlnxe/ecore_dev.c
6600
u32 wfq_speed = p_hwfn->qm_info.wfq_data[i].min_speed;
sys/dev/qlnx/qlnxe/ecore_dev.c
6604
ecore_init_vport_wfq(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
6610
static void ecore_init_wfq_default_param(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev.c
6615
for (i = 0; i < p_hwfn->qm_info.num_vports; i++)
sys/dev/qlnx/qlnxe/ecore_dev.c
6616
p_hwfn->qm_info.qm_vport_params[i].vport_wfq = 1;
sys/dev/qlnx/qlnxe/ecore_dev.c
6619
static void ecore_disable_wfq_for_all_vports(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6625
vport_params = p_hwfn->qm_info.qm_vport_params;
sys/dev/qlnx/qlnxe/ecore_dev.c
6627
for (i = 0; i < p_hwfn->qm_info.num_vports; i++) {
sys/dev/qlnx/qlnxe/ecore_dev.c
6628
ecore_init_wfq_default_param(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6629
ecore_init_vport_wfq(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
6642
static enum _ecore_status_t ecore_init_wfq_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6649
num_vports = p_hwfn->qm_info.num_vports;
sys/dev/qlnx/qlnxe/ecore_dev.c
6655
if ((i != vport_id) && p_hwfn->qm_info.wfq_data[i].configured) {
sys/dev/qlnx/qlnxe/ecore_dev.c
6657
tmp_speed = p_hwfn->qm_info.wfq_data[i].min_speed;
sys/dev/qlnx/qlnxe/ecore_dev.c
6669
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
sys/dev/qlnx/qlnxe/ecore_dev.c
6677
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
sys/dev/qlnx/qlnxe/ecore_dev.c
6684
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
sys/dev/qlnx/qlnxe/ecore_dev.c
6696
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
sys/dev/qlnx/qlnxe/ecore_dev.c
6705
p_hwfn->qm_info.wfq_data[vport_id].min_speed = req_rate;
sys/dev/qlnx/qlnxe/ecore_dev.c
6706
p_hwfn->qm_info.wfq_data[vport_id].configured = true;
sys/dev/qlnx/qlnxe/ecore_dev.c
6709
if (p_hwfn->qm_info.wfq_data[i].configured)
sys/dev/qlnx/qlnxe/ecore_dev.c
6712
p_hwfn->qm_info.wfq_data[i].min_speed = left_rate_per_vp;
sys/dev/qlnx/qlnxe/ecore_dev.c
6718
static int __ecore_configure_vport_wfq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6725
p_link = &p_hwfn->p_dev->hwfns[0].mcp_info->link_output;
sys/dev/qlnx/qlnxe/ecore_dev.c
6728
p_hwfn->qm_info.wfq_data[vp_id].min_speed = rate;
sys/dev/qlnx/qlnxe/ecore_dev.c
6729
p_hwfn->qm_info.wfq_data[vp_id].configured = true;
sys/dev/qlnx/qlnxe/ecore_dev.c
6733
rc = ecore_init_wfq_param(p_hwfn, vp_id, rate, p_link->min_pf_rate);
sys/dev/qlnx/qlnxe/ecore_dev.c
6736
ecore_configure_wfq_for_all_vports(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
6739
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
6745
static int __ecore_configure_vp_wfq_on_link_change(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6754
for (i = 0; i < p_hwfn->qm_info.num_vports; i++) {
sys/dev/qlnx/qlnxe/ecore_dev.c
6757
if (!p_hwfn->qm_info.wfq_data[i].configured)
sys/dev/qlnx/qlnxe/ecore_dev.c
6760
rate = p_hwfn->qm_info.wfq_data[i].min_speed;
sys/dev/qlnx/qlnxe/ecore_dev.c
6763
rc = ecore_init_wfq_param(p_hwfn, i, rate, min_pf_rate);
sys/dev/qlnx/qlnxe/ecore_dev.c
6765
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
6772
ecore_configure_wfq_for_all_vports(p_hwfn, p_ptt, min_pf_rate);
sys/dev/qlnx/qlnxe/ecore_dev.c
6774
ecore_disable_wfq_for_all_vports(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
6795
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
6798
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6802
rc = __ecore_configure_vport_wfq(p_hwfn, p_ptt, vp_id, rate);
sys/dev/qlnx/qlnxe/ecore_dev.c
6805
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
6809
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
6830
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
6832
__ecore_configure_vp_wfq_on_link_change(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
6837
int __ecore_configure_pf_max_bandwidth(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6844
p_hwfn->mcp_info->func_info.bandwidth_max = max_bw;
sys/dev/qlnx/qlnxe/ecore_dev.c
6850
p_hwfn->qm_info.pf_rl = p_link->speed;
sys/dev/qlnx/qlnxe/ecore_dev.c
6857
p_hwfn->qm_info.pf_rl = 100000;
sys/dev/qlnx/qlnxe/ecore_dev.c
6859
rc = ecore_init_pf_rl(p_hwfn, p_ptt, p_hwfn->rel_pf_id,
sys/dev/qlnx/qlnxe/ecore_dev.c
6860
p_hwfn->qm_info.pf_rl);
sys/dev/qlnx/qlnxe/ecore_dev.c
6862
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
sys/dev/qlnx/qlnxe/ecore_dev.c
6880
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
6887
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6891
rc = __ecore_configure_pf_max_bandwidth(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
6894
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
6903
int __ecore_configure_pf_min_bandwidth(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6910
p_hwfn->mcp_info->func_info.bandwidth_min = min_bw;
sys/dev/qlnx/qlnxe/ecore_dev.c
6911
p_hwfn->qm_info.pf_wfq = min_bw;
sys/dev/qlnx/qlnxe/ecore_dev.c
6918
rc = ecore_init_pf_wfq(p_hwfn, p_ptt, p_hwfn->rel_pf_id, min_bw);
sys/dev/qlnx/qlnxe/ecore_dev.c
6920
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
sys/dev/qlnx/qlnxe/ecore_dev.c
6938
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_dev.c
6945
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
6949
rc = __ecore_configure_pf_min_bandwidth(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
6952
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
6959
rc = __ecore_configure_vp_wfq_on_link_change(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
6964
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
6970
void ecore_clean_wfq_db(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_dev.c
6974
p_link = &p_hwfn->mcp_info->link_output;
sys/dev/qlnx/qlnxe/ecore_dev.c
6977
ecore_disable_wfq_for_all_vports(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
6979
OSAL_MEMSET(p_hwfn->qm_info.wfq_data, 0,
sys/dev/qlnx/qlnxe/ecore_dev.c
6980
sizeof(*p_hwfn->qm_info.wfq_data) *
sys/dev/qlnx/qlnxe/ecore_dev.c
6981
p_hwfn->qm_info.num_vports);
sys/dev/qlnx/qlnxe/ecore_dev.c
722
__ecore_llh_set_engine_affin(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_dev.c
724
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
729
rc = ecore_mcp_get_engine_config(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
731
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_dev.c
737
if (ECORE_IS_ROCE_PERSONALITY(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
752
if (ECORE_IS_FCOE_PERSONALITY(p_hwfn) ||
sys/dev/qlnx/qlnxe/ecore_dev.c
753
ECORE_IS_ISCSI_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
776
ecore_llh_set_engine_affin(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_dev.c
779
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
791
if (ECORE_IS_ROCE_PERSONALITY(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
805
eng = (ECORE_IS_FCOE_PERSONALITY(p_hwfn) ||
sys/dev/qlnx/qlnxe/ecore_dev.c
806
ECORE_IS_ISCSI_PERSONALITY(p_hwfn)) ? ECORE_ENG0
sys/dev/qlnx/qlnxe/ecore_dev.c
825
return __ecore_llh_set_engine_affin(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
828
static enum _ecore_status_t ecore_llh_hw_init_pf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
832
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_dev.c
844
ecore_wr(p_hwfn, p_ptt, addr, p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_dev.c
848
!ECORE_IS_FCOE_PERSONALITY(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_dev.c
850
p_hwfn->hw_info.hw_mac_addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
857
rc = ecore_llh_set_engine_affin(p_hwfn, p_ptt, avoid_eng_affin);
sys/dev/qlnx/qlnxe/ecore_dev.c
884
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
885
struct ecore_ptt *p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
918
val = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
920
ecore_wr(p_hwfn, p_ptt, addr, val);
sys/dev/qlnx/qlnxe/ecore_dev.c
923
if (!ppfid && ECORE_IS_IWARP_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_dev.c
926
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
934
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_dev.c
935
struct ecore_ptt *p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev.c
955
ecore_wr(p_hwfn, p_ptt, NIG_REG_LLH_ENG_CLS_ROCE_QP_SEL,
sys/dev/qlnx/qlnxe/ecore_dev.c
971
val = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_dev.c
973
ecore_wr(p_hwfn, p_ptt, addr, val);
sys/dev/qlnx/qlnxe/ecore_dev.c
976
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_dev.c
990
ecore_llh_access_filter_e4(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev.c
995
u8 pfid = ECORE_PFID_BY_PPFID(p_hwfn, abs_ppfid);
sys/dev/qlnx/qlnxe/ecore_dev_api.h
223
enum _ecore_status_t ecore_hw_start_fastpath(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev_api.h
311
enum _ecore_status_t ecore_get_wake_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
323
void ecore_wol_buffer_clear(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
336
struct ecore_ptt *ecore_ptt_acquire(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev_api.h
348
void ecore_ptt_release(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
500
ecore_dmae_host2grc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
520
ecore_dmae_grc2host(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
541
ecore_dmae_host2host(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
588
enum _ecore_status_t ecore_fw_l2_queue(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
601
enum _ecore_status_t ecore_fw_vport(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
614
enum _ecore_status_t ecore_fw_rss_eng(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
756
ecore_llh_set_function_as_default(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
769
enum _ecore_status_t ecore_final_cleanup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
784
ecore_get_queue_coalesce(struct ecore_hwfn *p_hwfn, u16 *coal,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
804
ecore_set_queue_coalesce(struct ecore_hwfn *p_hwfn, u16 rx_coal,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
815
void ecore_hw_set_feat(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_dev_api.h
826
enum _ecore_status_t ecore_pglueb_set_pfid_enable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_dev_api.h
872
static OSAL_INLINE bool ecore_is_mf_ufp(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_dev_api.h
874
return !!OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits);
sys/dev/qlnx/qlnxe/ecore_fcoe.h
44
enum _ecore_status_t ecore_fcoe_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_fcoe.h
46
void ecore_fcoe_setup(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_fcoe.h
48
void ecore_fcoe_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_fcoe.h
50
static inline enum _ecore_status_t ecore_fcoe_alloc(struct ecore_hwfn OSAL_UNUSED *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_fcoe.h
54
static inline void ecore_fcoe_setup(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {}
sys/dev/qlnx/qlnxe/ecore_fcoe.h
55
static inline void ecore_fcoe_free(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {}
sys/dev/qlnx/qlnxe/ecore_fcoe.h
60
ecore_sp_fcoe_conn_offload(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe.h
66
ecore_sp_fcoe_conn_destroy(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
100
ecore_fcoe_acquire_connection(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
104
void OSAL_IOMEM *ecore_fcoe_get_db_addr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
107
void OSAL_IOMEM *ecore_fcoe_get_global_cmdq_cons(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
110
void OSAL_IOMEM *ecore_fcoe_get_primary_bdq_prod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
113
void OSAL_IOMEM *ecore_fcoe_get_secondary_bdq_prod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
117
ecore_fcoe_offload_connection(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
121
ecore_fcoe_terminate_connection(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
124
void ecore_fcoe_release_connection(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
128
ecore_sp_fcoe_func_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
133
ecore_sp_fcoe_func_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_fcoe_api.h
139
ecore_fcoe_get_stats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
1007
enum _ecore_status_t ecore_dmae_host2grc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
1017
OSAL_SPIN_LOCK(&p_hwfn->dmae_info.lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
1019
rc = ecore_dmae_execute_command(p_hwfn, p_ptt, source_addr,
sys/dev/qlnx/qlnxe/ecore_hw.c
102
p_hwfn->p_ptt_pool = p_pool;
sys/dev/qlnx/qlnxe/ecore_hw.c
1025
OSAL_SPIN_UNLOCK(&p_hwfn->dmae_info.lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
1030
enum _ecore_status_t ecore_dmae_grc2host(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
104
if (OSAL_SPIN_LOCK_ALLOC(p_hwfn, &p_pool->lock)) {
sys/dev/qlnx/qlnxe/ecore_hw.c
1040
OSAL_SPIN_LOCK(&(p_hwfn->dmae_info.lock));
sys/dev/qlnx/qlnxe/ecore_hw.c
1042
rc = ecore_dmae_execute_command(p_hwfn, p_ptt, grc_addr_in_dw,
sys/dev/qlnx/qlnxe/ecore_hw.c
1047
OSAL_SPIN_UNLOCK(&(p_hwfn->dmae_info.lock));
sys/dev/qlnx/qlnxe/ecore_hw.c
105
__ecore_ptt_pool_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_hw.c
1052
enum _ecore_status_t ecore_dmae_host2host(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
1061
OSAL_SPIN_LOCK(&p_hwfn->dmae_info.lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
1063
rc = ecore_dmae_execute_command(p_hwfn, p_ptt, source_addr,
sys/dev/qlnx/qlnxe/ecore_hw.c
1070
OSAL_SPIN_UNLOCK(&p_hwfn->dmae_info.lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
1075
void ecore_hw_err_notify(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
1079
if (p_hwfn->p_dev->recov_in_prog && err_type != ECORE_HW_ERR_FAN_FAIL) {
sys/dev/qlnx/qlnxe/ecore_hw.c
1080
DP_VERBOSE(p_hwfn, ECORE_MSG_DRV,
sys/dev/qlnx/qlnxe/ecore_hw.c
1086
OSAL_HW_ERROR_OCCURRED(p_hwfn, err_type);
sys/dev/qlnx/qlnxe/ecore_hw.c
1089
enum _ecore_status_t ecore_dmae_sanity(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
1099
p_virt = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev, &p_phys, 2 * size);
sys/dev/qlnx/qlnxe/ecore_hw.c
1101
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_hw.c
1119
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_hw.c
1125
rc = ecore_dmae_host2host(p_hwfn, p_ptt, p_phys, p_phys + size,
sys/dev/qlnx/qlnxe/ecore_hw.c
1129
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_hw.c
113
void ecore_ptt_invalidate(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_hw.c
1143
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_hw.c
1154
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, p_virt, p_phys, 2 * size);
sys/dev/qlnx/qlnxe/ecore_hw.c
1158
void ecore_ppfid_wr(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_hw.c
1161
u8 pfid = ECORE_PFID_BY_PPFID(p_hwfn, abs_ppfid);
sys/dev/qlnx/qlnxe/ecore_hw.c
1163
ecore_fid_pretend(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_hw.c
1165
ecore_wr(p_hwfn, p_ptt, hw_addr, val);
sys/dev/qlnx/qlnxe/ecore_hw.c
1166
ecore_fid_pretend(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_hw.c
1167
p_hwfn->rel_pf_id <<
sys/dev/qlnx/qlnxe/ecore_hw.c
1171
u32 ecore_ppfid_rd(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_hw.c
1174
u8 pfid = ECORE_PFID_BY_PPFID(p_hwfn, abs_ppfid);
sys/dev/qlnx/qlnxe/ecore_hw.c
1177
ecore_fid_pretend(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_hw.c
1179
val = ecore_rd(p_hwfn, p_ptt, hw_addr);
sys/dev/qlnx/qlnxe/ecore_hw.c
1180
ecore_fid_pretend(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_hw.c
1181
p_hwfn->rel_pf_id <<
sys/dev/qlnx/qlnxe/ecore_hw.c
119
p_ptt = &p_hwfn->p_ptt_pool->ptts[i];
sys/dev/qlnx/qlnxe/ecore_hw.c
124
void ecore_ptt_pool_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_hw.c
127
if (p_hwfn->p_ptt_pool)
sys/dev/qlnx/qlnxe/ecore_hw.c
128
OSAL_SPIN_LOCK_DEALLOC(&p_hwfn->p_ptt_pool->lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
130
__ecore_ptt_pool_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_hw.c
133
struct ecore_ptt *ecore_ptt_acquire(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_hw.c
140
OSAL_SPIN_LOCK(&p_hwfn->p_ptt_pool->lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
142
if (!OSAL_LIST_IS_EMPTY(&p_hwfn->p_ptt_pool->free_list)) {
sys/dev/qlnx/qlnxe/ecore_hw.c
143
p_ptt = OSAL_LIST_FIRST_ENTRY(&p_hwfn->p_ptt_pool->free_list,
sys/dev/qlnx/qlnxe/ecore_hw.c
146
&p_hwfn->p_ptt_pool->free_list);
sys/dev/qlnx/qlnxe/ecore_hw.c
148
OSAL_SPIN_UNLOCK(&p_hwfn->p_ptt_pool->lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
150
DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_hw.c
156
OSAL_SPIN_UNLOCK(&p_hwfn->p_ptt_pool->lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
160
DP_NOTICE(p_hwfn, true, "PTT acquire timeout - failed to allocate PTT\n");
sys/dev/qlnx/qlnxe/ecore_hw.c
164
void ecore_ptt_release(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
169
OSAL_SPIN_LOCK(&p_hwfn->p_ptt_pool->lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
170
OSAL_LIST_PUSH_HEAD(&p_ptt->list_entry, &p_hwfn->p_ptt_pool->free_list);
sys/dev/qlnx/qlnxe/ecore_hw.c
171
OSAL_SPIN_UNLOCK(&p_hwfn->p_ptt_pool->lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
192
void ecore_ptt_set_win(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
204
DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_hw.c
211
REG_WR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
217
static u32 ecore_set_ptt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
226
if (p_ptt->hwfn_id != p_hwfn->my_id)
sys/dev/qlnx/qlnxe/ecore_hw.c
227
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_hw.c
229
p_ptt->idx, p_ptt->hwfn_id, p_hwfn->my_id);
sys/dev/qlnx/qlnxe/ecore_hw.c
234
ecore_ptt_set_win(p_hwfn, p_ptt, hw_addr);
sys/dev/qlnx/qlnxe/ecore_hw.c
241
struct ecore_ptt *ecore_get_reserved_ptt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
245
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_hw.c
250
return &p_hwfn->p_ptt_pool->ptts[ptt_idx];
sys/dev/qlnx/qlnxe/ecore_hw.c
253
static bool ecore_is_reg_fifo_empty(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
259
if (!p_hwfn->p_dev->chk_reg_fifo)
sys/dev/qlnx/qlnxe/ecore_hw.c
263
bar_addr = ecore_set_ptt(p_hwfn, p_ptt, GRC_REG_TRACE_FIFO_VALID_DATA);
sys/dev/qlnx/qlnxe/ecore_hw.c
264
is_empty = REG_RD(p_hwfn, bar_addr) == 0;
sys/dev/qlnx/qlnxe/ecore_hw.c
267
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_hw.c
275
void ecore_wr(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, u32 hw_addr,
sys/dev/qlnx/qlnxe/ecore_hw.c
281
prev_fifo_err = !ecore_is_reg_fifo_empty(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_hw.c
283
bar_addr = ecore_set_ptt(p_hwfn, p_ptt, hw_addr);
sys/dev/qlnx/qlnxe/ecore_hw.c
284
REG_WR(p_hwfn, bar_addr, val);
sys/dev/qlnx/qlnxe/ecore_hw.c
285
DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_hw.c
290
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_hw.c
294
OSAL_WARN(!prev_fifo_err && !ecore_is_reg_fifo_empty(p_hwfn, p_ptt),
sys/dev/qlnx/qlnxe/ecore_hw.c
299
u32 ecore_rd(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, u32 hw_addr)
sys/dev/qlnx/qlnxe/ecore_hw.c
304
prev_fifo_err = !ecore_is_reg_fifo_empty(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_hw.c
306
bar_addr = ecore_set_ptt(p_hwfn, p_ptt, hw_addr);
sys/dev/qlnx/qlnxe/ecore_hw.c
307
val = REG_RD(p_hwfn, bar_addr);
sys/dev/qlnx/qlnxe/ecore_hw.c
309
DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_hw.c
314
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_hw.c
318
OSAL_WARN(!prev_fifo_err && !ecore_is_reg_fifo_empty(p_hwfn, p_ptt),
sys/dev/qlnx/qlnxe/ecore_hw.c
325
static void ecore_memcpy_hw(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
340
if (IS_PF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_hw.c
341
ecore_ptt_set_win(p_hwfn, p_ptt, hw_addr + done);
sys/dev/qlnx/qlnxe/ecore_hw.c
349
reg_addr = (u32 OSAL_IOMEM *)OSAL_REG_ADDR(p_hwfn, hw_offset);
sys/dev/qlnx/qlnxe/ecore_hw.c
353
DIRECT_REG_WR(p_hwfn, reg_addr++, *host_addr++);
sys/dev/qlnx/qlnxe/ecore_hw.c
356
*host_addr++ = DIRECT_REG_RD(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
363
void ecore_memcpy_from(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
367
DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_hw.c
371
ecore_memcpy_hw(p_hwfn, p_ptt, dest, hw_addr, n, false);
sys/dev/qlnx/qlnxe/ecore_hw.c
374
void ecore_memcpy_to(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
378
DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_hw.c
382
ecore_memcpy_hw(p_hwfn, p_ptt, src, hw_addr, n, true);
sys/dev/qlnx/qlnxe/ecore_hw.c
385
void ecore_fid_pretend(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
406
REG_WR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
412
void ecore_port_pretend(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
422
REG_WR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
428
void ecore_port_unpretend(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
439
REG_WR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
445
u32 ecore_vfid_to_concrete(struct ecore_hwfn *p_hwfn, u8 vfid)
sys/dev/qlnx/qlnxe/ecore_hw.c
449
SET_FIELD(concrete_fid, PXP_CONCRETE_FID_PFID, p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_hw.c
464
enum _ecore_status_t ecore_hw_lock(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
477
p_hwfn->rel_pf_id *
sys/dev/qlnx/qlnxe/ecore_hw.c
481
lock_status = ecore_rd(p_hwfn, p_ptt, hw_lock_cntr_reg);
sys/dev/qlnx/qlnxe/ecore_hw.c
484
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_hw.c
492
ecore_wr(p_hwfn, p_ptt, hw_lock_cntr_reg + sizeof(u32), resource);
sys/dev/qlnx/qlnxe/ecore_hw.c
496
lock_status = ecore_rd(p_hwfn, p_ptt, hw_lock_cntr_reg);
sys/dev/qlnx/qlnxe/ecore_hw.c
510
DP_NOTICE(p_hwfn, true, "Lock timeout resource=0x%x\n",
sys/dev/qlnx/qlnxe/ecore_hw.c
516
ecore_wr(p_hwfn, p_ptt, hw_lock_cntr_reg, resource);
sys/dev/qlnx/qlnxe/ecore_hw.c
521
enum _ecore_status_t ecore_hw_unlock(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
532
p_hwfn->rel_pf_id *
sys/dev/qlnx/qlnxe/ecore_hw.c
536
lock_status = ecore_rd(p_hwfn, p_ptt, hw_lock_cntr_reg);
sys/dev/qlnx/qlnxe/ecore_hw.c
539
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_hw.c
547
ecore_wr(p_hwfn, p_ptt, hw_lock_cntr_reg, resource);
sys/dev/qlnx/qlnxe/ecore_hw.c
557
static void ecore_dmae_opcode(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
574
p_params->src_pfid : p_hwfn->rel_pf_id;
sys/dev/qlnx/qlnxe/ecore_hw.c
583
p_params->dst_pfid : p_hwfn->rel_pf_id;
sys/dev/qlnx/qlnxe/ecore_hw.c
607
p_params->port_id : p_hwfn->port_id;
sys/dev/qlnx/qlnxe/ecore_hw.c
634
p_hwfn->dmae_info.p_dmae_cmd->opcode = OSAL_CPU_TO_LE32(opcode);
sys/dev/qlnx/qlnxe/ecore_hw.c
635
p_hwfn->dmae_info.p_dmae_cmd->opcode_b = OSAL_CPU_TO_LE16(opcode_b);
sys/dev/qlnx/qlnxe/ecore_hw.c
647
static enum _ecore_status_t ecore_dmae_post_command(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
650
struct dmae_cmd *p_command = p_hwfn->dmae_info.p_dmae_cmd;
sys/dev/qlnx/qlnxe/ecore_hw.c
651
u8 idx_cmd = p_hwfn->dmae_info.channel, i;
sys/dev/qlnx/qlnxe/ecore_hw.c
657
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_hw.c
672
DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_hw.c
694
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_hw.c
700
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_hw.c
707
enum _ecore_status_t ecore_dmae_info_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_hw.c
709
dma_addr_t *p_addr = &p_hwfn->dmae_info.completion_word_phys_addr;
sys/dev/qlnx/qlnxe/ecore_hw.c
71
static void __ecore_ptt_pool_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_hw.c
710
struct dmae_cmd **p_cmd = &p_hwfn->dmae_info.p_dmae_cmd;
sys/dev/qlnx/qlnxe/ecore_hw.c
711
u32 **p_buff = &p_hwfn->dmae_info.p_intermediate_buffer;
sys/dev/qlnx/qlnxe/ecore_hw.c
712
u32 **p_comp = &p_hwfn->dmae_info.p_completion_word;
sys/dev/qlnx/qlnxe/ecore_hw.c
714
*p_comp = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev, p_addr, sizeof(u32));
sys/dev/qlnx/qlnxe/ecore_hw.c
716
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_hw.c
721
p_addr = &p_hwfn->dmae_info.dmae_cmd_phys_addr;
sys/dev/qlnx/qlnxe/ecore_hw.c
722
*p_cmd = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev, p_addr,
sys/dev/qlnx/qlnxe/ecore_hw.c
725
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_hw.c
73
OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_ptt_pool);
sys/dev/qlnx/qlnxe/ecore_hw.c
730
p_addr = &p_hwfn->dmae_info.intermediate_buffer_phys_addr;
sys/dev/qlnx/qlnxe/ecore_hw.c
731
*p_buff = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev, p_addr,
sys/dev/qlnx/qlnxe/ecore_hw.c
734
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_hw.c
739
p_hwfn->dmae_info.channel = p_hwfn->rel_pf_id;
sys/dev/qlnx/qlnxe/ecore_hw.c
74
p_hwfn->p_ptt_pool = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_hw.c
740
p_hwfn->dmae_info.b_mem_ready = true;
sys/dev/qlnx/qlnxe/ecore_hw.c
744
ecore_dmae_info_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_hw.c
748
void ecore_dmae_info_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_hw.c
752
OSAL_SPIN_LOCK(&p_hwfn->dmae_info.lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
753
p_hwfn->dmae_info.b_mem_ready = false;
sys/dev/qlnx/qlnxe/ecore_hw.c
754
OSAL_SPIN_UNLOCK(&p_hwfn->dmae_info.lock);
sys/dev/qlnx/qlnxe/ecore_hw.c
756
if (p_hwfn->dmae_info.p_completion_word != OSAL_NULL) {
sys/dev/qlnx/qlnxe/ecore_hw.c
757
p_phys = p_hwfn->dmae_info.completion_word_phys_addr;
sys/dev/qlnx/qlnxe/ecore_hw.c
758
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_hw.c
759
p_hwfn->dmae_info.p_completion_word,
sys/dev/qlnx/qlnxe/ecore_hw.c
761
p_hwfn->dmae_info.p_completion_word = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_hw.c
764
if (p_hwfn->dmae_info.p_dmae_cmd != OSAL_NULL) {
sys/dev/qlnx/qlnxe/ecore_hw.c
765
p_phys = p_hwfn->dmae_info.dmae_cmd_phys_addr;
sys/dev/qlnx/qlnxe/ecore_hw.c
766
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_hw.c
767
p_hwfn->dmae_info.p_dmae_cmd,
sys/dev/qlnx/qlnxe/ecore_hw.c
769
p_hwfn->dmae_info.p_dmae_cmd = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_hw.c
77
enum _ecore_status_t ecore_ptt_pool_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_hw.c
772
if (p_hwfn->dmae_info.p_intermediate_buffer != OSAL_NULL) {
sys/dev/qlnx/qlnxe/ecore_hw.c
773
p_phys = p_hwfn->dmae_info.intermediate_buffer_phys_addr;
sys/dev/qlnx/qlnxe/ecore_hw.c
774
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_hw.c
775
p_hwfn->dmae_info.p_intermediate_buffer,
sys/dev/qlnx/qlnxe/ecore_hw.c
777
p_hwfn->dmae_info.p_intermediate_buffer = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_hw.c
782
ecore_dmae_operation_wait(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_hw.c
788
u32 factor = (CHIP_REV_IS_EMUL(p_hwfn->p_dev) ?
sys/dev/qlnx/qlnxe/ecore_hw.c
79
struct ecore_ptt_pool *p_pool = OSAL_ALLOC(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_hw.c
790
(CHIP_REV_IS_FPGA(p_hwfn->p_dev) ?
sys/dev/qlnx/qlnxe/ecore_hw.c
800
OSAL_BARRIER(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_hw.c
801
while (*p_hwfn->dmae_info.p_completion_word != DMAE_COMPLETION_VAL) {
sys/dev/qlnx/qlnxe/ecore_hw.c
804
DP_NOTICE(p_hwfn->p_dev, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_hw.c
806
*(p_hwfn->dmae_info.p_completion_word),
sys/dev/qlnx/qlnxe/ecore_hw.c
815
OSAL_BARRIER(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_hw.c
819
*p_hwfn->dmae_info.p_completion_word = 0;
sys/dev/qlnx/qlnxe/ecore_hw.c
824
static enum _ecore_status_t ecore_dmae_execute_sub_operation(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
832
dma_addr_t phys = p_hwfn->dmae_info.intermediate_buffer_phys_addr;
sys/dev/qlnx/qlnxe/ecore_hw.c
833
struct dmae_cmd *cmd = p_hwfn->dmae_info.p_dmae_cmd;
sys/dev/qlnx/qlnxe/ecore_hw.c
846
OSAL_MEMCPY(&(p_hwfn->dmae_info.p_intermediate_buffer[0]),
sys/dev/qlnx/qlnxe/ecore_hw.c
873
OSAL_DMA_SYNC(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_hw.c
879
ecore_dmae_post_command(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_hw.c
881
ecore_status = ecore_dmae_operation_wait(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_hw.c
887
OSAL_DMA_SYNC(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_hw.c
894
DP_NOTICE(p_hwfn, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_hw.c
897
(unsigned long long)p_hwfn->dmae_info.intermediate_buffer_phys_addr);
sys/dev/qlnx/qlnxe/ecore_hw.c
903
&p_hwfn->dmae_info.p_intermediate_buffer[0],
sys/dev/qlnx/qlnxe/ecore_hw.c
909
static enum _ecore_status_t ecore_dmae_execute_command(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
916
dma_addr_t phys = p_hwfn->dmae_info.completion_word_phys_addr;
sys/dev/qlnx/qlnxe/ecore_hw.c
918
struct dmae_cmd *cmd = p_hwfn->dmae_info.p_dmae_cmd;
sys/dev/qlnx/qlnxe/ecore_hw.c
92
p_pool->ptts[i].hwfn_id = p_hwfn->my_id;
sys/dev/qlnx/qlnxe/ecore_hw.c
924
if (!p_hwfn->dmae_info.b_mem_ready) {
sys/dev/qlnx/qlnxe/ecore_hw.c
925
DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_hw.c
932
if (p_hwfn->p_dev->recov_in_prog) {
sys/dev/qlnx/qlnxe/ecore_hw.c
933
DP_VERBOSE(p_hwfn, ECORE_MSG_HW,
sys/dev/qlnx/qlnxe/ecore_hw.c
944
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_hw.c
950
ecore_dmae_opcode(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
987
ecore_status = ecore_dmae_execute_sub_operation(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.c
995
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_hw.c
999
ecore_hw_err_notify(p_hwfn, ECORE_HW_ERR_DMAE_FAIL);
sys/dev/qlnx/qlnxe/ecore_hw.h
104
enum _ecore_status_t ecore_ptt_pool_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_hw.h
111
void ecore_ptt_pool_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_hw.h
130
void ecore_ptt_set_win(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.h
142
struct ecore_ptt *ecore_get_reserved_ptt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.h
153
void ecore_wr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.h
165
u32 ecore_rd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.h
179
void ecore_memcpy_from(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.h
195
void ecore_memcpy_to(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.h
211
void ecore_fid_pretend(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.h
223
void ecore_port_pretend(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.h
234
void ecore_port_unpretend(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.h
245
u32 ecore_vfid_to_concrete(struct ecore_hwfn *p_hwfn, u8 vfid);
sys/dev/qlnx/qlnxe/ecore_hw.h
252
enum _ecore_status_t ecore_dmae_info_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_hw.h
260
void ecore_dmae_info_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_hw.h
265
void ecore_hw_err_notify(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.h
268
enum _ecore_status_t ecore_dmae_sanity(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_hw.h
282
void ecore_ppfid_wr(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_hw.h
294
u32 ecore_ppfid_rd(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_hw.h
95
void ecore_ptt_invalidate(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1013
ecore_wr(p_hwfn, p_ptt, tc_weight_base_addr + tc_weight_addr_diff * tc_client_offset, byte_weight);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1016
ecore_wr(p_hwfn, p_ptt, tc_bound_base_addr + tc_bound_addr_diff * tc_client_offset, NIG_ETS_UP_BOUND(byte_weight, req->mtu));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1020
void ecore_init_nig_lb_rl(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1029
ecore_wr(p_hwfn, p_ptt, NIG_REG_TX_LB_GLBRATELIMIT_CTRL, ctrl);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1034
ecore_wr(p_hwfn, p_ptt, NIG_REG_TX_LB_GLBRATELIMIT_INC_PERIOD, NIG_RL_PERIOD_CLK_25M);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1036
ecore_wr(p_hwfn, p_ptt, NIG_REG_TX_LB_GLBRATELIMIT_INC_VALUE, inc_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1037
ecore_wr(p_hwfn, p_ptt, NIG_REG_TX_LB_GLBRATELIMIT_MAX_VALUE, NIG_RL_MAX_VAL(inc_val, req->mtu));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1041
ecore_wr(p_hwfn, p_ptt, NIG_REG_TX_LB_GLBRATELIMIT_CTRL, ctrl);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1046
ecore_wr(p_hwfn, p_ptt, NIG_REG_LB_BRBRATELIMIT_CTRL, ctrl);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1051
ecore_wr(p_hwfn, p_ptt, NIG_REG_LB_BRBRATELIMIT_INC_PERIOD, NIG_RL_PERIOD_CLK_25M);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1053
ecore_wr(p_hwfn, p_ptt, NIG_REG_LB_BRBRATELIMIT_INC_VALUE, inc_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1054
ecore_wr(p_hwfn, p_ptt, NIG_REG_LB_BRBRATELIMIT_MAX_VALUE, NIG_RL_MAX_VAL(inc_val, req->mtu));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1058
ecore_wr(p_hwfn, p_ptt, NIG_REG_LB_BRBRATELIMIT_CTRL, ctrl);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1065
ecore_wr(p_hwfn, p_ptt, NIG_REG_LB_TCRATELIMIT_CTRL_0 + reg_offset, ctrl);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1072
ecore_wr(p_hwfn, p_ptt, NIG_REG_LB_TCRATELIMIT_INC_PERIOD_0 + reg_offset, NIG_RL_PERIOD_CLK_25M);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1074
ecore_wr(p_hwfn, p_ptt, NIG_REG_LB_TCRATELIMIT_INC_VALUE_0 + reg_offset, inc_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1075
ecore_wr(p_hwfn, p_ptt, NIG_REG_LB_TCRATELIMIT_MAX_VALUE_0 + reg_offset, NIG_RL_MAX_VAL(inc_val, req->mtu));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1079
ecore_wr(p_hwfn, p_ptt, NIG_REG_LB_TCRATELIMIT_CTRL_0 + reg_offset, ctrl);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1083
void ecore_init_nig_pri_tc_map(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1100
ecore_wr(p_hwfn, p_ptt, NIG_REG_PKT_PRIORITY_TO_TC, pri_tc_mask);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1104
ecore_wr(p_hwfn, p_ptt, NIG_REG_PRIORITY_FOR_TC_0 + tc * 4, tc_pri_mask[tc]);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1105
ecore_wr(p_hwfn, p_ptt, NIG_REG_RX_TC0_PRIORITY_MASK + tc * 4, tc_pri_mask[tc]);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1117
void ecore_init_prs_ets(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1146
ecore_wr(p_hwfn, p_ptt, PRS_REG_ETS_ARB_CLIENT_IS_STRICT, sp_tc_map);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1149
ecore_wr(p_hwfn, p_ptt, PRS_REG_ETS_ARB_CLIENT_IS_SUBJECT2WFQ, wfq_tc_map);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1163
ecore_wr(p_hwfn, p_ptt, PRS_REG_ETS_ARB_CREDIT_WEIGHT_0 + tc * tc_weight_addr_diff, byte_weight);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1166
ecore_wr(p_hwfn, p_ptt, PRS_REG_ETS_ARB_CREDIT_UPPER_BOUND_0 + tc * tc_bound_addr_diff, PRS_ETS_UP_BOUND(byte_weight, req->mtu));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1182
void ecore_init_brb_ram(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1192
total_blocks = ECORE_IS_K2(p_hwfn->p_dev) ? BRB_TOTAL_RAM_BLOCKS_K2 : BRB_TOTAL_RAM_BLOCKS_BB;
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1218
ecore_wr(p_hwfn, p_ptt, BRB_REG_TOTAL_MAC_SIZE + port * 4, port_blocks);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1221
ecore_wr(p_hwfn, p_ptt, BRB_REG_SHARED_HR_AREA + port * 4, port_shared_blocks);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1234
ecore_wr(p_hwfn, p_ptt, BRB_REG_TC_GUARANTIED_0 + reg_offset, tc_guaranteed_blocks);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1235
ecore_wr(p_hwfn, p_ptt, BRB_REG_MAIN_TC_GUARANTIED_HYST_0 + reg_offset, BRB_HYST_BLOCKS);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1240
ecore_wr(p_hwfn, p_ptt, BRB_REG_LB_TC_FULL_XOFF_THRESHOLD_0 + reg_offset, full_xoff_th);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1241
ecore_wr(p_hwfn, p_ptt, BRB_REG_LB_TC_FULL_XON_THRESHOLD_0 + reg_offset, full_xon_th);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1242
ecore_wr(p_hwfn, p_ptt, BRB_REG_LB_TC_PAUSE_XOFF_THRESHOLD_0 + reg_offset, pause_xoff_th);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1243
ecore_wr(p_hwfn, p_ptt, BRB_REG_LB_TC_PAUSE_XON_THRESHOLD_0 + reg_offset, pause_xon_th);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1248
ecore_wr(p_hwfn, p_ptt, BRB_REG_MAIN_TC_FULL_XOFF_THRESHOLD_0 + reg_offset, full_xoff_th);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1249
ecore_wr(p_hwfn, p_ptt, BRB_REG_MAIN_TC_FULL_XON_THRESHOLD_0 + reg_offset, full_xon_th);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1250
ecore_wr(p_hwfn, p_ptt, BRB_REG_MAIN_TC_PAUSE_XOFF_THRESHOLD_0 + reg_offset, pause_xoff_th);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1251
ecore_wr(p_hwfn, p_ptt, BRB_REG_MAIN_TC_PAUSE_XON_THRESHOLD_0 + reg_offset, pause_xon_th);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1260
void ecore_set_port_mf_ovlan_eth_type(struct ecore_hwfn *p_hwfn, u32 ethType)
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1263
STORE_RT_REG(p_hwfn, DORQ_REG_TAG1_ETHERTYPE_RT_OFFSET, ethType);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1272
void ecore_set_vxlan_dest_port(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1277
ecore_wr(p_hwfn, p_ptt, PRS_REG_VXLAN_PORT, dest_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1280
ecore_wr(p_hwfn, p_ptt, NIG_REG_VXLAN_CTRL, dest_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1283
ecore_wr(p_hwfn, p_ptt, PBF_REG_VXLAN_PORT, dest_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1286
void ecore_set_vxlan_enable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1293
reg_val = ecore_rd(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1295
ecore_wr(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN, reg_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1298
reg_val = ecore_rd(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1303
ecore_wr(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2, (u32)PRS_ETH_TUNN_OUTPUT_FORMAT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1308
reg_val = ecore_rd(p_hwfn, p_ptt, NIG_REG_ENC_TYPE_ENABLE);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1310
ecore_wr(p_hwfn, p_ptt, NIG_REG_ENC_TYPE_ENABLE, reg_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1313
ecore_wr(p_hwfn, p_ptt, DORQ_REG_L2_EDPM_TUNNEL_VXLAN_EN, vxlan_enable ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1316
void ecore_set_gre_enable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1324
reg_val = ecore_rd(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1327
ecore_wr(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN, reg_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1330
reg_val = ecore_rd(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1335
ecore_wr(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2, (u32)PRS_ETH_TUNN_OUTPUT_FORMAT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1340
reg_val = ecore_rd(p_hwfn, p_ptt, NIG_REG_ENC_TYPE_ENABLE);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1343
ecore_wr(p_hwfn, p_ptt, NIG_REG_ENC_TYPE_ENABLE, reg_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1346
ecore_wr(p_hwfn, p_ptt, DORQ_REG_L2_EDPM_TUNNEL_GRE_ETH_EN, eth_gre_enable ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1347
ecore_wr(p_hwfn, p_ptt, DORQ_REG_L2_EDPM_TUNNEL_GRE_IP_EN, ip_gre_enable ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1350
void ecore_set_geneve_dest_port(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1356
ecore_wr(p_hwfn, p_ptt, PRS_REG_NGE_PORT, dest_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1359
ecore_wr(p_hwfn, p_ptt, NIG_REG_NGE_PORT, dest_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1362
ecore_wr(p_hwfn, p_ptt, PBF_REG_NGE_PORT, dest_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1365
void ecore_set_geneve_enable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1373
reg_val = ecore_rd(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1376
ecore_wr(p_hwfn, p_ptt, PRS_REG_ENCAPSULATION_TYPE_EN, reg_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1379
reg_val = ecore_rd(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1384
ecore_wr(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2, (u32)PRS_ETH_TUNN_OUTPUT_FORMAT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1389
ecore_wr(p_hwfn, p_ptt, NIG_REG_NGE_ETH_ENABLE, eth_geneve_enable ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1390
ecore_wr(p_hwfn, p_ptt, NIG_REG_NGE_IP_ENABLE, ip_geneve_enable ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1393
if (ECORE_IS_BB_B0(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1397
ecore_wr(p_hwfn, p_ptt, DORQ_REG_L2_EDPM_TUNNEL_NGE_ETH_EN_K2_E5, eth_geneve_enable ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1398
ecore_wr(p_hwfn, p_ptt, DORQ_REG_L2_EDPM_TUNNEL_NGE_IP_EN_K2_E5, ip_geneve_enable ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1404
void ecore_set_vxlan_no_l2_enable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1411
reg_val = ecore_rd(p_hwfn, p_ptt, PRS_REG_MSG_INFO);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1422
ecore_wr(p_hwfn, p_ptt, PRS_REG_OUTPUT_FORMAT_4_0_BB_K2, (u32)PRS_ETH_VXLAN_NO_L2_OUTPUT_FORMAT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1431
ecore_wr(p_hwfn, p_ptt, PRS_REG_MSG_INFO, reg_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1444
void ecore_gft_disable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1449
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_GFT, 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1454
ecore_wr(p_hwfn, p_ptt, PRS_REG_GFT_CAM + CAM_LINE_SIZE*pf_id, 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1457
ecore_wr(p_hwfn, p_ptt, PRS_REG_GFT_PROFILE_MASK_RAM + RAM_LINE_SIZE*pf_id, 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1458
ecore_wr(p_hwfn, p_ptt, PRS_REG_GFT_PROFILE_MASK_RAM + RAM_LINE_SIZE*pf_id + REG_SIZE, 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1461
void ecore_set_gft_event_id_cm_hdr (struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1467
rfs_cm_hdr_event_id = ecore_rd(p_hwfn, p_ptt, PRS_REG_CM_HDR_GFT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1470
ecore_wr(p_hwfn, p_ptt, PRS_REG_CM_HDR_GFT, rfs_cm_hdr_event_id);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1473
void ecore_gft_config(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1485
DP_NOTICE(p_hwfn, true, "gft_config: must accept at least on of - ipv4 or ipv6'\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1487
DP_NOTICE(p_hwfn, true, "gft_config: must accept at least on of - udp or tcp\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1489
DP_NOTICE(p_hwfn, true, "gft_config: unsupported gft_profile_type\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1494
ecore_wr(p_hwfn, p_ptt, PRS_REG_CM_HDR_GFT, reg_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1497
ecore_wr(p_hwfn, p_ptt, PRS_REG_LOAD_L2_FILTER, 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1500
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_TENANT_ID, 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1527
ecore_wr(p_hwfn, p_ptt, PRS_REG_GFT_CAM + CAM_LINE_SIZE*pf_id, cam_line);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1528
cam_line = ecore_rd(p_hwfn, p_ptt, PRS_REG_GFT_CAM + CAM_LINE_SIZE*pf_id);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1568
ecore_wr(p_hwfn, p_ptt, PRS_REG_GFT_PROFILE_MASK_RAM + RAM_LINE_SIZE*pf_id, ram_line_lo);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1569
ecore_wr(p_hwfn, p_ptt, PRS_REG_GFT_PROFILE_MASK_RAM + RAM_LINE_SIZE*pf_id + REG_SIZE, ram_line_hi);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1572
ecore_wr(p_hwfn, p_ptt, PRS_REG_GFT_PROFILE_MASK_RAM + RAM_LINE_SIZE*PRS_GFT_CAM_LINES_NO_MATCH, 0xffffffff);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1573
ecore_wr(p_hwfn, p_ptt, PRS_REG_GFT_PROFILE_MASK_RAM + RAM_LINE_SIZE*PRS_GFT_CAM_LINES_NO_MATCH + REG_SIZE, 0x3ff);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1576
ecore_wr(p_hwfn, p_ptt, PRS_REG_SEARCH_GFT, 1);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1582
void ecore_config_vf_zone_size_mode(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, u16 mode, bool runtime_init)
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1595
STORE_RT_REG(p_hwfn, PGLUE_REG_B_MSDM_VF_SHIFT_B_RT_OFFSET, msdm_vf_size_log);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1596
STORE_RT_REG(p_hwfn, PGLUE_REG_B_MSDM_OFFSET_MASK_B_RT_OFFSET, msdm_vf_offset_mask);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1599
ecore_wr(p_hwfn, p_ptt, PGLUE_B_REG_MSDM_VF_SHIFT_B, msdm_vf_size_log);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1600
ecore_wr(p_hwfn, p_ptt, PGLUE_B_REG_MSDM_OFFSET_MASK_B, msdm_vf_offset_mask);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1605
u32 ecore_get_mstorm_queue_stat_offset(struct ecore_hwfn *p_hwfn, u16 stat_cnt_id, u16 vf_zone_size_mode)
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1620
u32 ecore_get_mstorm_eth_vf_prods_offset(struct ecore_hwfn *p_hwfn, u8 vf_id, u8 vf_queue_id, u16 vf_zone_size_mode)
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
173
#define QM_INIT_TX_PQ_MAP(p_hwfn, map, chip, pq_id, rl_valid, vp_pq_id, rl_id, ext_voq, wrr) OSAL_MEMSET(&map, 0, sizeof(map)); SET_FIELD(map.reg, QM_RF_PQ_MAP_##chip##_PQ_VALID, 1); SET_FIELD(map.reg, QM_RF_PQ_MAP_##chip##_RL_VALID, rl_valid); SET_FIELD(map.reg, QM_RF_PQ_MAP_##chip##_VP_PQ_ID, vp_pq_id); SET_FIELD(map.reg, QM_RF_PQ_MAP_##chip##_RL_ID, rl_id); SET_FIELD(map.reg, QM_RF_PQ_MAP_##chip##_VOQ, ext_voq); SET_FIELD(map.reg, QM_RF_PQ_MAP_##chip##_WRR_WEIGHT_GROUP, wrr); STORE_RT_REG(p_hwfn, QM_REG_TXPQMAP_RT_OFFSET + pq_id, *((u32 *)&map))
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1762
void ecore_enable_context_validation(struct ecore_hwfn * p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1768
ecore_wr(p_hwfn, p_ptt, CDU_REG_CCFC_CTX_VALID0, ctx_validation);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1772
ecore_wr(p_hwfn, p_ptt, CDU_REG_CCFC_CTX_VALID1, ctx_validation);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1776
ecore_wr(p_hwfn, p_ptt, CDU_REG_TCFC_CTX_VALID0, ctx_validation);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1784
void ecore_update_eth_rss_ind_table_entry(struct ecore_hwfn * p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1818
ecore_wr(p_hwfn, p_ptt, RSS_REG_RSS_RAM_ADDR, rss_addr);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
182
static u8 ecore_get_ext_voq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1821
ecore_wr(p_hwfn, p_ptt, RSS_REG_RSS_RAM_MASK, reg_val[0]);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1822
ecore_wr(p_hwfn, p_ptt, RSS_REG_RSS_RAM_MASK + 4, reg_val[1]);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1823
ecore_wr(p_hwfn, p_ptt, RSS_REG_RSS_RAM_MASK + 8, reg_val[2]);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1824
ecore_wr(p_hwfn, p_ptt, RSS_REG_RSS_RAM_MASK + 12, reg_val[3]);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1827
ecore_wr(p_hwfn, p_ptt, RSS_REG_RSS_RAM_DATA, reg_val[0]);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1828
ecore_wr(p_hwfn, p_ptt, RSS_REG_RSS_RAM_DATA + 4, reg_val[1]);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1829
ecore_wr(p_hwfn, p_ptt, RSS_REG_RSS_RAM_DATA + 8, reg_val[2]);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
1830
ecore_wr(p_hwfn, p_ptt, RSS_REG_RSS_RAM_DATA + 12, reg_val[3]);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
188
return NUM_OF_PHYS_TCS * (ECORE_IS_E5(p_hwfn->p_dev) ? MAX_NUM_PORTS_E5 : MAX_NUM_PORTS_BB) + port_id;
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
190
return port_id * (ECORE_IS_E5(p_hwfn->p_dev) ? NUM_OF_PHYS_TCS : max_phys_tcs_per_port) + tc;
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
194
static void ecore_enable_pf_rl(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
197
STORE_RT_REG(p_hwfn, QM_REG_RLPFENABLE_RT_OFFSET, pf_rl_en ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
199
u8 num_ext_voqs = ECORE_IS_E5(p_hwfn->p_dev) ? QM_E5_NUM_EXT_VOQ : MAX_NUM_VOQS_E4;
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
203
STORE_RT_REG(p_hwfn, QM_REG_RLPFVOQENABLE_RT_OFFSET, (u32)voq_bit_mask);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
206
STORE_RT_REG(p_hwfn, QM_REG_RLPFVOQENABLE_MSB_RT_OFFSET, (u32)(voq_bit_mask >> 32));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
210
STORE_RT_REG(p_hwfn, QM_REG_RLPFPERIOD_RT_OFFSET, QM_RL_PERIOD_CLK_25M);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
211
STORE_RT_REG(p_hwfn, QM_REG_RLPFPERIODTIMER_RT_OFFSET, QM_RL_PERIOD_CLK_25M);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
215
STORE_RT_REG(p_hwfn, QM_REG_AFULLQMBYPTHRPFRL_RT_OFFSET, QM_PF_RL_UPPER_BOUND);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
220
static void ecore_enable_pf_wfq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
223
STORE_RT_REG(p_hwfn, QM_REG_WFQPFENABLE_RT_OFFSET, pf_wfq_en ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
227
STORE_RT_REG(p_hwfn, QM_REG_AFULLQMBYPTHRPFWFQ_RT_OFFSET, QM_WFQ_UPPER_BOUND);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
231
static void ecore_enable_vport_rl(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
234
STORE_RT_REG(p_hwfn, QM_REG_RLGLBLENABLE_RT_OFFSET, vport_rl_en ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
237
STORE_RT_REG(p_hwfn, QM_REG_RLGLBLPERIOD_0_RT_OFFSET, QM_RL_PERIOD_CLK_25M);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
238
STORE_RT_REG(p_hwfn, QM_REG_RLGLBLPERIODTIMER_0_RT_OFFSET, QM_RL_PERIOD_CLK_25M);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
242
STORE_RT_REG(p_hwfn, QM_REG_AFULLQMBYPTHRGLBLRL_RT_OFFSET, QM_VP_RL_BYPASS_THRESH_SPEED);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
247
static void ecore_enable_vport_wfq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
250
STORE_RT_REG(p_hwfn, QM_REG_WFQVPENABLE_RT_OFFSET, vport_wfq_en ? 1 : 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
254
STORE_RT_REG(p_hwfn, QM_REG_AFULLQMBYPTHRVPWFQ_RT_OFFSET, QM_WFQ_UPPER_BOUND);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
260
static void ecore_cmdq_lines_voq_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
268
OVERWRITE_RT_REG(p_hwfn, PBF_CMDQ_LINES_RT_OFFSET(ext_voq), (u32)cmdq_lines);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
269
STORE_RT_REG(p_hwfn, QM_REG_VOQCRDLINE_RT_OFFSET + ext_voq, qm_line_crd);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
270
STORE_RT_REG(p_hwfn, QM_REG_VOQINITCRDLINE_RT_OFFSET + ext_voq, qm_line_crd);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
274
static void ecore_cmdq_lines_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
280
u8 num_ext_voqs = ECORE_IS_E5(p_hwfn->p_dev) ? QM_E5_NUM_EXT_VOQ : MAX_NUM_VOQS_E4;
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
284
STORE_RT_REG(p_hwfn, PBF_CMDQ_LINES_RT_OFFSET(ext_voq), 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
297
if (ECORE_IS_E5(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
310
ext_voq = ecore_get_ext_voq(p_hwfn, port_id, tc, max_phys_tcs_per_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
312
ecore_cmdq_lines_voq_rt_init(p_hwfn, ext_voq, phys_lines_per_tc);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
316
ext_voq = ecore_get_ext_voq(p_hwfn, port_id, PURE_LB_TC, max_phys_tcs_per_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
317
ecore_cmdq_lines_voq_rt_init(p_hwfn, ext_voq, PBF_CMDQ_PURE_LB_LINES);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
340
static void ecore_btb_blocks_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
370
ext_voq = ecore_get_ext_voq(p_hwfn, port_id, tc, max_phys_tcs_per_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
371
STORE_RT_REG(p_hwfn, PBF_BTB_GUARANTEED_RT_OFFSET(ext_voq), phys_blocks);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
376
ext_voq = ecore_get_ext_voq(p_hwfn, port_id, PURE_LB_TC, max_phys_tcs_per_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
377
STORE_RT_REG(p_hwfn, PBF_BTB_GUARANTEED_RT_OFFSET(ext_voq), pure_lb_blocks);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
382
static void ecore_tx_pq_map_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
415
STORE_RT_REG(p_hwfn, QM_REG_PQTX2PF_0_RT_OFFSET + pq_group, (u32)(pf_id));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
418
STORE_RT_REG(p_hwfn, QM_REG_MAXPQSIZE_0_RT_OFFSET, QM_PQ_SIZE_256B(num_pf_cids));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
419
STORE_RT_REG(p_hwfn, QM_REG_MAXPQSIZE_1_RT_OFFSET, QM_PQ_SIZE_256B(num_vf_cids));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
428
ext_voq = ecore_get_ext_voq(p_hwfn, port_id, pq_params[i].tc_id, max_phys_tcs_per_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
436
u32 map_val = (ext_voq << QM_WFQ_VP_PQ_VOQ_SHIFT) | (pf_id << (ECORE_IS_E5(p_hwfn->p_dev) ? QM_WFQ_VP_PQ_PF_E5_SHIFT : QM_WFQ_VP_PQ_PF_E4_SHIFT));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
443
STORE_RT_REG(p_hwfn, QM_REG_WFQVPMAP_RT_OFFSET + first_tx_pq_id, map_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
448
DP_NOTICE(p_hwfn, true, "Invalid VPORT ID for rate limiter configuration\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
451
if (ECORE_IS_E5(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
453
QM_INIT_TX_PQ_MAP(p_hwfn, tx_pq_map, E5, pq_id, rl_valid ? 1 : 0, first_tx_pq_id, rl_valid ? pq_params[i].vport_id : 0, ext_voq, pq_params[i].wrr_group);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
457
QM_INIT_TX_PQ_MAP(p_hwfn, tx_pq_map, E4, pq_id, rl_valid ? 1 : 0, first_tx_pq_id, rl_valid ? pq_params[i].vport_id : 0, ext_voq, pq_params[i].wrr_group);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
461
STORE_RT_REG(p_hwfn, QM_REG_BASEADDRTXPQ_RT_OFFSET + pq_id, mem_addr_4kb);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
466
STORE_RT_REG(p_hwfn, QM_REG_PTRTBLTX_RT_OFFSET + (pq_id * 2) + j, 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
473
ecore_wr(p_hwfn, p_ptt, PQ_INFO_RAM_GRC_ADDRESS(pq_id), pq_info);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
489
STORE_RT_REG(p_hwfn, QM_REG_MAXPQSIZETXSEL_0_RT_OFFSET + i, tx_pq_vf_mask[i]);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
493
static void ecore_other_pq_map_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
512
STORE_RT_REG(p_hwfn, QM_REG_PQOTHER2PF_0_RT_OFFSET + pq_group, (u32)(pf_id));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
515
STORE_RT_REG(p_hwfn, QM_REG_MAXPQSIZE_2_RT_OFFSET, QM_PQ_SIZE_256B(pq_size));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
519
STORE_RT_REG(p_hwfn, QM_REG_BASEADDROTHERPQ_RT_OFFSET + pq_id, mem_addr_4kb);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
524
STORE_RT_REG(p_hwfn, QM_REG_PTRTBLOTHER_RT_OFFSET + (pq_id * 2) + j, 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
533
static int ecore_pf_wfq_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
547
DP_NOTICE(p_hwfn, true, "Invalid PF WFQ weight configuration\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
552
ext_voq = ecore_get_ext_voq(p_hwfn, port_id, pq_params[i].tc_id, max_phys_tcs_per_port);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
553
crd_reg_offset = ECORE_IS_E5(p_hwfn->p_dev) ?
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
556
OVERWRITE_RT_REG(p_hwfn, crd_reg_offset, (u32)QM_WFQ_CRD_REG_SIGN_BIT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
559
STORE_RT_REG(p_hwfn, QM_REG_WFQPFUPPERBOUND_RT_OFFSET + pf_id, QM_WFQ_UPPER_BOUND | (u32)QM_WFQ_CRD_REG_SIGN_BIT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
560
STORE_RT_REG(p_hwfn, QM_REG_WFQPFWEIGHT_RT_OFFSET + pf_id, inc_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
568
static int ecore_pf_rl_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
576
DP_NOTICE(p_hwfn, true, "Invalid PF rate limit configuration\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
580
STORE_RT_REG(p_hwfn, QM_REG_RLPFCRD_RT_OFFSET + pf_id, (u32)QM_RL_CRD_REG_SIGN_BIT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
581
STORE_RT_REG(p_hwfn, QM_REG_RLPFUPPERBOUND_RT_OFFSET + pf_id, QM_PF_RL_UPPER_BOUND | (u32)QM_RL_CRD_REG_SIGN_BIT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
582
STORE_RT_REG(p_hwfn, QM_REG_RLPFINCVAL_RT_OFFSET + pf_id, inc_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
590
static int ecore_vp_wfq_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
605
DP_NOTICE(p_hwfn, true, "Invalid VPORT WFQ weight configuration\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
613
STORE_RT_REG(p_hwfn, QM_REG_WFQVPCRD_RT_OFFSET + vport_pq_id, (u32)QM_WFQ_CRD_REG_SIGN_BIT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
614
STORE_RT_REG(p_hwfn, QM_REG_WFQVPWEIGHT_RT_OFFSET + vport_pq_id, inc_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
625
static int ecore_vport_rl_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
635
DP_NOTICE(p_hwfn, true, "Invalid VPORT ID for rate limiter configuration\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
643
DP_NOTICE(p_hwfn, true, "Invalid VPORT rate-limit configuration\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
647
STORE_RT_REG(p_hwfn, QM_REG_RLGLBLCRD_RT_OFFSET + vport_id, (u32)QM_RL_CRD_REG_SIGN_BIT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
648
STORE_RT_REG(p_hwfn, QM_REG_RLGLBLUPPERBOUND_RT_OFFSET + vport_id, QM_VP_RL_UPPER_BOUND(link_speed) | (u32)QM_RL_CRD_REG_SIGN_BIT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
649
STORE_RT_REG(p_hwfn, QM_REG_RLGLBLINCVAL_RT_OFFSET + vport_id, inc_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
655
static bool ecore_poll_on_qm_cmd_ready(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
662
reg_val = ecore_rd(p_hwfn, p_ptt, QM_REG_SDMCMDREADY);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
667
DP_VERBOSE(p_hwfn, ECORE_MSG_DEBUG, "Timeout when waiting for QM SDM command ready signal\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
674
static bool ecore_send_qm_cmd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
680
if (!ecore_poll_on_qm_cmd_ready(p_hwfn, p_ptt))
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
683
ecore_wr(p_hwfn, p_ptt, QM_REG_SDMCMDADDR, cmd_addr);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
684
ecore_wr(p_hwfn, p_ptt, QM_REG_SDMCMDDATALSB, cmd_data_lsb);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
685
ecore_wr(p_hwfn, p_ptt, QM_REG_SDMCMDDATAMSB, cmd_data_msb);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
686
ecore_wr(p_hwfn, p_ptt, QM_REG_SDMCMDGO, 1);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
687
ecore_wr(p_hwfn, p_ptt, QM_REG_SDMCMDGO, 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
689
return ecore_poll_on_qm_cmd_ready(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
705
int ecore_qm_common_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
725
STORE_RT_REG(p_hwfn, QM_REG_AFULLOPRTNSTCCRDMASK_RT_OFFSET, mask);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
728
ecore_enable_pf_rl(p_hwfn, pf_rl_en);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
731
ecore_enable_pf_wfq(p_hwfn, pf_wfq_en);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
734
ecore_enable_vport_rl(p_hwfn, vport_rl_en);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
737
ecore_enable_vport_wfq(p_hwfn, vport_wfq_en);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
740
ecore_cmdq_lines_rt_init(p_hwfn, max_ports_per_engine, max_phys_tcs_per_port, port_params);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
743
ecore_btb_blocks_rt_init(p_hwfn, max_ports_per_engine, max_phys_tcs_per_port, port_params);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
748
int ecore_qm_pf_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
780
ecore_other_pq_map_rt_init(p_hwfn, pf_id, is_pf_loading, num_pf_cids, num_tids, 0);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
784
ecore_tx_pq_map_rt_init(p_hwfn, p_ptt, port_id, pf_id, max_phys_tcs_per_port, is_pf_loading, num_pf_cids, num_vf_cids,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
789
if (ecore_pf_wfq_rt_init(p_hwfn, port_id, pf_id, pf_wfq, max_phys_tcs_per_port, num_pf_pqs + num_vf_pqs, pq_params))
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
793
if (ecore_pf_rl_rt_init(p_hwfn, pf_id, pf_rl))
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
797
if (ecore_vp_wfq_rt_init(p_hwfn, num_vports, vport_params))
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
801
if (ecore_vport_rl_rt_init(p_hwfn, start_vport, num_vports, link_speed, vport_params))
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
807
int ecore_init_pf_wfq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
816
DP_NOTICE(p_hwfn, true, "Invalid PF WFQ weight configuration\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
820
ecore_wr(p_hwfn, p_ptt, QM_REG_WFQPFWEIGHT + pf_id * 4, inc_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
825
int ecore_init_pf_rl(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
834
DP_NOTICE(p_hwfn, true, "Invalid PF rate limit configuration\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
838
ecore_wr(p_hwfn, p_ptt, QM_REG_RLPFCRD + pf_id * 4, (u32)QM_RL_CRD_REG_SIGN_BIT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
839
ecore_wr(p_hwfn, p_ptt, QM_REG_RLPFINCVAL + pf_id * 4, inc_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
844
int ecore_init_vport_wfq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
855
DP_NOTICE(p_hwfn, true, "Invalid VPORT WFQ weight configuration\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
862
ecore_wr(p_hwfn, p_ptt, QM_REG_WFQVPWEIGHT + vport_pq_id * 4, inc_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
869
int ecore_init_vport_rl(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
878
DP_NOTICE(p_hwfn, true, "Invalid VPORT ID for rate limiter configuration\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
884
DP_NOTICE(p_hwfn, true, "Invalid VPORT rate-limit configuration\n");
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
888
ecore_wr(p_hwfn, p_ptt, QM_REG_RLGLBLCRD + vport_id * 4, (u32)QM_RL_CRD_REG_SIGN_BIT);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
889
ecore_wr(p_hwfn, p_ptt, QM_REG_RLGLBLINCVAL + vport_id * 4, inc_val);
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
894
bool ecore_send_qm_stop_cmd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
919
if (!ecore_send_qm_cmd(p_hwfn, p_ptt, QM_STOP_CMD_ADDR, cmd_arr[0], cmd_arr[1]))
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
957
void ecore_init_nig_ets(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
996
ecore_wr(p_hwfn, p_ptt, is_lb ? NIG_REG_LB_ARB_CLIENT_IS_STRICT : NIG_REG_TX_ARB_CLIENT_IS_STRICT, (sp_tc_map << tc_client_offset));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c
999
ecore_wr(p_hwfn, p_ptt, is_lb ? NIG_REG_LB_ARB_CLIENT_IS_SUBJECT2WFQ : NIG_REG_TX_ARB_CLIENT_IS_SUBJECT2WFQ, (wfq_tc_map << tc_client_offset));
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
114
int ecore_qm_pf_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
144
int ecore_init_pf_wfq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
159
int ecore_init_pf_rl(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
176
int ecore_init_vport_wfq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
193
int ecore_init_vport_rl(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
212
bool ecore_send_qm_stop_cmd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
233
void ecore_init_nig_ets(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
247
void ecore_init_nig_lb_rl(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
262
void ecore_init_nig_pri_tc_map(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
277
void ecore_init_prs_ets(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
293
void ecore_init_brb_ram(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
307
void ecore_set_port_mf_ovlan_eth_type(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
320
void ecore_set_vxlan_dest_port(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
331
void ecore_set_vxlan_enable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
343
void ecore_set_gre_enable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
356
void ecore_set_geneve_dest_port(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
368
void ecore_set_geneve_enable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
379
void ecore_set_vxlan_no_l2_enable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
391
void ecore_set_gft_event_id_cm_hdr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
401
void ecore_gft_disable(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
417
void ecore_gft_config(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
440
void ecore_config_vf_zone_size_mode(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
453
u32 ecore_get_mstorm_queue_stat_offset(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
466
u32 ecore_get_mstorm_eth_vf_prods_offset(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
478
void ecore_enable_context_validation(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
544
void ecore_update_eth_rss_ind_table_entry(struct ecore_hwfn * p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h
71
int ecore_qm_common_rt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
101
p_hwfn->rt_data.init_val[rt_offset + i] = p_val[i];
sys/dev/qlnx/qlnxe/ecore_init_ops.c
102
p_hwfn->rt_data.b_valid[rt_offset + i] = true;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
106
static enum _ecore_status_t ecore_init_rt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
113
u32 *p_init_val = &p_hwfn->rt_data.init_val[rt_offset];
sys/dev/qlnx/qlnxe/ecore_init_ops.c
114
bool *p_valid = &p_hwfn->rt_data.b_valid[rt_offset];
sys/dev/qlnx/qlnxe/ecore_init_ops.c
129
ecore_wr(p_hwfn, p_ptt, addr + (i << 2),
sys/dev/qlnx/qlnxe/ecore_init_ops.c
139
rc = ecore_dmae_host2grc(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
153
enum _ecore_status_t ecore_init_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_init_ops.c
155
struct ecore_rt_data *rt_data = &p_hwfn->rt_data;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
157
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_init_ops.c
160
rt_data->b_valid = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
165
rt_data->init_val = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
168
OSAL_FREE(p_hwfn->p_dev, rt_data->b_valid);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
176
void ecore_init_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_init_ops.c
178
OSAL_FREE(p_hwfn->p_dev, p_hwfn->rt_data.init_val);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
179
p_hwfn->rt_data.init_val = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
180
OSAL_FREE(p_hwfn->p_dev, p_hwfn->rt_data.b_valid);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
181
p_hwfn->rt_data.b_valid = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
184
static enum _ecore_status_t ecore_init_array_dmae(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
194
if ((CHIP_REV_IS_SLOW(p_hwfn->p_dev) && (size < 16)) ||
sys/dev/qlnx/qlnxe/ecore_init_ops.c
203
ecore_wr(p_hwfn, p_ptt, addr + (i << 2), data[i]);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
205
rc = ecore_dmae_host2grc(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
215
static enum _ecore_status_t ecore_init_fill_dmae(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
226
return ecore_dmae_host2grc(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
231
static void ecore_init_fill(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
238
ecore_wr(p_hwfn, p_ptt, addr, fill);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
241
static enum _ecore_status_t ecore_init_cmd_array(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
253
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
271
OSAL_MEMSET(p_hwfn->unzip_buf, 0, max_size);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
273
output_len = OSAL_UNZIP_DATA(p_hwfn, input_len,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
275
max_size, (u8 *)p_hwfn->unzip_buf);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
277
rc = ecore_init_array_dmae(p_hwfn, p_ptt, addr, 0,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
279
p_hwfn->unzip_buf,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
282
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
287
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
302
rc = ecore_init_array_dmae(p_hwfn, p_ptt, addr,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
314
rc = ecore_init_array_dmae(p_hwfn, p_ptt, addr,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
325
static enum _ecore_status_t ecore_init_cmd_wr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
337
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
346
ecore_wr(p_hwfn, p_ptt, addr, data);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
351
rc = ecore_init_fill_dmae(p_hwfn, p_ptt, addr, data);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
353
ecore_init_fill(p_hwfn, p_ptt, addr, 0, data);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
356
rc = ecore_init_cmd_array(p_hwfn, p_ptt, p_cmd,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
360
rc = ecore_init_rt(p_hwfn, p_ptt, addr,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
386
static void ecore_init_cmd_rd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
400
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_init_ops.c
404
val = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
420
DP_ERR(p_hwfn, "Invalid poll comparison type %08x\n",
sys/dev/qlnx/qlnxe/ecore_init_ops.c
430
val = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
434
DP_ERR(p_hwfn, "Timeout when polling reg: 0x%08x [ Waiting-for: %08x Got: %08x (comparison %08x)]\n",
sys/dev/qlnx/qlnxe/ecore_init_ops.c
441
static enum _ecore_status_t ecore_init_cmd_cb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
449
rc = ecore_dmae_sanity(p_hwfn, p_ptt, "engine_phase");
sys/dev/qlnx/qlnxe/ecore_init_ops.c
452
DP_NOTICE(p_hwfn, false, "Unexpected init op callback ID %d\n",
sys/dev/qlnx/qlnxe/ecore_init_ops.c
460
static u8 ecore_init_cmd_mode_match(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
463
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
471
return ecore_init_cmd_mode_match(p_hwfn, p_offset, modes) ^ 1;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
473
arg1 = ecore_init_cmd_mode_match(p_hwfn, p_offset, modes);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
474
arg2 = ecore_init_cmd_mode_match(p_hwfn, p_offset, modes);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
477
arg1 = ecore_init_cmd_mode_match(p_hwfn, p_offset, modes);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
478
arg2 = ecore_init_cmd_mode_match(p_hwfn, p_offset, modes);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
486
static u32 ecore_init_cmd_mode(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
491
if (ecore_init_cmd_mode_match(p_hwfn, &offset, modes))
sys/dev/qlnx/qlnxe/ecore_init_ops.c
512
enum _ecore_status_t ecore_init_run(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
518
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
528
p_hwfn->unzip_buf = OSAL_ZALLOC(p_hwfn->p_dev, GFP_ATOMIC,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
530
if (!p_hwfn->unzip_buf) {
sys/dev/qlnx/qlnxe/ecore_init_ops.c
531
DP_NOTICE(p_hwfn, true, "Failed to allocate unzip buffer\n");
sys/dev/qlnx/qlnxe/ecore_init_ops.c
542
rc = ecore_init_cmd_wr(p_hwfn, p_ptt, &cmd->write,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
547
ecore_init_cmd_rd(p_hwfn, p_ptt, &cmd->read);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
551
cmd_num += ecore_init_cmd_mode(p_hwfn, &cmd->if_mode,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
568
rc = ecore_init_cmd_cb(p_hwfn, p_ptt, &cmd->callback);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
576
OSAL_FREE(p_hwfn->p_dev, p_hwfn->unzip_buf);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
577
p_hwfn->unzip_buf = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
582
void ecore_gtt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
589
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_init_ops.c
601
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
609
ecore_ptt_invalidate(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_init_ops.c
610
val = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
615
DP_ERR(p_hwfn, "PGLUE_B_REG_INIT_DONE didn't complete\n");
sys/dev/qlnx/qlnxe/ecore_init_ops.c
624
REG_WR(p_hwfn, gtt_base + i * PXP_GLOBAL_ENTRY_SIZE,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
64
void ecore_init_clear_rt_data(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_init_ops.c
69
p_hwfn->rt_data.b_valid[i] = false;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
72
void ecore_init_store_rt_reg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
76
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
82
p_hwfn->rt_data.init_val[rt_offset] = val;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
83
p_hwfn->rt_data.b_valid[rt_offset] = true;
sys/dev/qlnx/qlnxe/ecore_init_ops.c
86
void ecore_init_store_rt_agg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.c
93
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.h
113
void ecore_init_store_rt_agg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.h
128
void ecore_gtt_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.h
53
enum _ecore_status_t ecore_init_run(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_init_ops.h
67
enum _ecore_status_t ecore_init_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_init_ops.h
75
void ecore_init_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_init_ops.h
83
void ecore_init_clear_rt_data(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_init_ops.h
93
void ecore_init_store_rt_reg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1003
static enum _ecore_status_t ecore_int_deassertion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1006
struct ecore_sb_attn_info *sb_attn_sw = p_hwfn->p_sb_attn;
sys/dev/qlnx/qlnxe/ecore_int.c
1013
aeu_inv_arr[i] = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
1016
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
1028
en = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en);
sys/dev/qlnx/qlnxe/ecore_int.c
1038
if (ecore_int_is_parity_flag(p_hwfn, p_bit) &&
sys/dev/qlnx/qlnxe/ecore_int.c
1040
ecore_int_deassertion_parity(p_hwfn, p_bit,
sys/dev/qlnx/qlnxe/ecore_int.c
1061
en = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en);
sys/dev/qlnx/qlnxe/ecore_int.c
1079
p_aeu = ecore_int_aeu_translate(p_hwfn, p_aeu);
sys/dev/qlnx/qlnxe/ecore_int.c
1083
if (ecore_int_is_parity_flag(p_hwfn, p_aeu)) {
sys/dev/qlnx/qlnxe/ecore_int.c
1124
ecore_int_deassertion_aeu_bit(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1138
DIRECT_REG_WR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1139
(u8 OSAL_IOMEM*)p_hwfn->regview +
sys/dev/qlnx/qlnxe/ecore_int.c
1146
aeu_mask = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
1149
ecore_wr(p_hwfn, p_hwfn->p_dpc_ptt, IGU_REG_ATTENTION_ENABLE, aeu_mask);
sys/dev/qlnx/qlnxe/ecore_int.c
1157
static enum _ecore_status_t ecore_int_attentions(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
1159
struct ecore_sb_attn_info *p_sb_attn_sw = p_hwfn->p_sb_attn;
sys/dev/qlnx/qlnxe/ecore_int.c
1186
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1191
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1194
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
1198
rc = ecore_int_assertion(p_hwfn, asserted_bits);
sys/dev/qlnx/qlnxe/ecore_int.c
120
enum _ecore_status_t (*cb)(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.c
1204
rc = ecore_int_deassertion(p_hwfn, deasserted_bits);
sys/dev/qlnx/qlnxe/ecore_int.c
1209
static void ecore_sb_ack_attn(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1221
DIRECT_REG_WR(p_hwfn, igu_addr, igu_ack.sb_id_and_flags);
sys/dev/qlnx/qlnxe/ecore_int.c
1226
OSAL_MMIOWB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
1227
OSAL_BARRIER(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
1232
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)hwfn_cookie;
sys/dev/qlnx/qlnxe/ecore_int.c
1239
if (!p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
1242
if (!p_hwfn->p_sp_sb) {
sys/dev/qlnx/qlnxe/ecore_int.c
1243
DP_ERR(p_hwfn->p_dev, "DPC called - no p_sp_sb\n");
sys/dev/qlnx/qlnxe/ecore_int.c
1247
sb_info = &p_hwfn->p_sp_sb->sb_info;
sys/dev/qlnx/qlnxe/ecore_int.c
1248
arr_size = OSAL_ARRAY_SIZE(p_hwfn->p_sp_sb->pi_info_arr);
sys/dev/qlnx/qlnxe/ecore_int.c
1250
DP_ERR(p_hwfn->p_dev, "Status block is NULL - cannot ack interrupts\n");
sys/dev/qlnx/qlnxe/ecore_int.c
1254
if (!p_hwfn->p_sb_attn) {
sys/dev/qlnx/qlnxe/ecore_int.c
1255
DP_ERR(p_hwfn->p_dev, "DPC called - no p_sb_attn");
sys/dev/qlnx/qlnxe/ecore_int.c
1258
sb_attn = p_hwfn->p_sb_attn;
sys/dev/qlnx/qlnxe/ecore_int.c
1260
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR, "DPC Called! (hwfn %p %d)\n",
sys/dev/qlnx/qlnxe/ecore_int.c
1261
p_hwfn, p_hwfn->my_id);
sys/dev/qlnx/qlnxe/ecore_int.c
1270
DP_ERR(p_hwfn->p_dev, "Interrupt Status block is NULL - cannot check for new interrupts!\n");
sys/dev/qlnx/qlnxe/ecore_int.c
1274
DP_VERBOSE(p_hwfn->p_dev, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
1280
DP_ERR(p_hwfn->p_dev, "Attentions Status block is NULL - cannot check for new attentions!\n");
sys/dev/qlnx/qlnxe/ecore_int.c
1284
rc |= ecore_attn_update_idx(p_hwfn, sb_attn);
sys/dev/qlnx/qlnxe/ecore_int.c
1285
DP_VERBOSE(p_hwfn->p_dev, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
1297
if (!p_hwfn->p_dpc_ptt) {
sys/dev/qlnx/qlnxe/ecore_int.c
1298
DP_NOTICE(p_hwfn->p_dev, true, "Failed to allocate PTT\n");
sys/dev/qlnx/qlnxe/ecore_int.c
1304
ecore_int_attentions(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.c
1315
pi_info = &p_hwfn->p_sp_sb->pi_info_arr[pi];
sys/dev/qlnx/qlnxe/ecore_int.c
1317
pi_info->comp_cb(p_hwfn, pi_info->cookie);
sys/dev/qlnx/qlnxe/ecore_int.c
132
static enum _ecore_status_t ecore_mcp_attn_cb(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
1325
ecore_sb_ack_attn(p_hwfn, sb_info->igu_addr, sb_attn->index);
sys/dev/qlnx/qlnxe/ecore_int.c
1331
static void ecore_int_sb_attn_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
1333
struct ecore_sb_attn_info *p_sb = p_hwfn->p_sb_attn;
sys/dev/qlnx/qlnxe/ecore_int.c
1339
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, p_sb->sb_attn,
sys/dev/qlnx/qlnxe/ecore_int.c
134
u32 tmp = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt, MCP_REG_CPU_STATE);
sys/dev/qlnx/qlnxe/ecore_int.c
1341
SB_ATTN_ALIGNED_SIZE(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_int.c
1344
OSAL_FREE(p_hwfn->p_dev, p_sb);
sys/dev/qlnx/qlnxe/ecore_int.c
1345
p_hwfn->p_sb_attn = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_int.c
1348
static void ecore_int_sb_attn_setup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1351
struct ecore_sb_attn_info *sb_info = p_hwfn->p_sb_attn;
sys/dev/qlnx/qlnxe/ecore_int.c
1359
ecore_wr(p_hwfn, p_ptt, IGU_REG_ATTN_MSG_ADDR_L,
sys/dev/qlnx/qlnxe/ecore_int.c
136
DP_INFO(p_hwfn->p_dev, "MCP_REG_CPU_STATE: %08x - Masking...\n",
sys/dev/qlnx/qlnxe/ecore_int.c
1360
DMA_LO(p_hwfn->p_sb_attn->sb_phys));
sys/dev/qlnx/qlnxe/ecore_int.c
1361
ecore_wr(p_hwfn, p_ptt, IGU_REG_ATTN_MSG_ADDR_H,
sys/dev/qlnx/qlnxe/ecore_int.c
1362
DMA_HI(p_hwfn->p_sb_attn->sb_phys));
sys/dev/qlnx/qlnxe/ecore_int.c
1365
static void ecore_int_sb_attn_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1370
struct ecore_sb_attn_info *sb_info = p_hwfn->p_sb_attn;
sys/dev/qlnx/qlnxe/ecore_int.c
138
ecore_wr(p_hwfn, p_hwfn->p_dpc_ptt, MCP_REG_CPU_EVENT_MASK,
sys/dev/qlnx/qlnxe/ecore_int.c
1387
if (ecore_int_is_parity_flag(p_hwfn, p_aeu))
sys/dev/qlnx/qlnxe/ecore_int.c
1392
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
1398
sb_info->mfw_attn_addr = (p_hwfn->rel_pf_id << 3) +
sys/dev/qlnx/qlnxe/ecore_int.c
1401
ecore_int_sb_attn_setup(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_int.c
1404
static enum _ecore_status_t ecore_int_sb_attn_alloc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1407
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_int.c
1421
SB_ATTN_ALIGNED_SIZE(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_int.c
1429
p_hwfn->p_sb_attn = p_sb;
sys/dev/qlnx/qlnxe/ecore_int.c
1430
ecore_int_sb_attn_init(p_hwfn, p_ptt, p_virt, p_phys);
sys/dev/qlnx/qlnxe/ecore_int.c
1439
void ecore_init_cau_sb_entry(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1443
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_int.c
1486
static void _ecore_int_cau_conf_pi(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1495
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_int.c
1508
if (p_hwfn->hw_init_done) {
sys/dev/qlnx/qlnxe/ecore_int.c
1509
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
1513
STORE_RT_REG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1519
void ecore_int_cau_conf_pi(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1525
_ecore_int_cau_conf_pi(p_hwfn, p_ptt, p_sb->igu_sb_id,
sys/dev/qlnx/qlnxe/ecore_int.c
1529
void ecore_int_cau_conf_sb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1536
ecore_init_cau_sb_entry(p_hwfn, &sb_entry, p_hwfn->rel_pf_id,
sys/dev/qlnx/qlnxe/ecore_int.c
1539
if (p_hwfn->hw_init_done) {
sys/dev/qlnx/qlnxe/ecore_int.c
1543
ecore_dmae_host2grc(p_hwfn, p_ptt, (u64)(osal_uintptr_t)&phys_addr,
sys/dev/qlnx/qlnxe/ecore_int.c
1547
ecore_dmae_host2grc(p_hwfn, p_ptt, (u64)(osal_uintptr_t)&sb_entry,
sys/dev/qlnx/qlnxe/ecore_int.c
1553
STORE_RT_REG_AGG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1557
STORE_RT_REG_AGG(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1563
if (p_hwfn->p_dev->int_coalescing_mode == ECORE_COAL_MODE_ENABLE) {
sys/dev/qlnx/qlnxe/ecore_int.c
1567
u8 num_tc = p_hwfn->hw_info.num_hw_tc;
sys/dev/qlnx/qlnxe/ecore_int.c
1573
if (p_hwfn->p_dev->rx_coalesce_usecs <= 0x7F)
sys/dev/qlnx/qlnxe/ecore_int.c
1575
else if (p_hwfn->p_dev->rx_coalesce_usecs <= 0xFF)
sys/dev/qlnx/qlnxe/ecore_int.c
1579
timeset = (u8)(p_hwfn->p_dev->rx_coalesce_usecs >> timer_res);
sys/dev/qlnx/qlnxe/ecore_int.c
1580
_ecore_int_cau_conf_pi(p_hwfn, p_ptt, igu_sb_id, RX_PI,
sys/dev/qlnx/qlnxe/ecore_int.c
1584
if (p_hwfn->p_dev->tx_coalesce_usecs <= 0x7F)
sys/dev/qlnx/qlnxe/ecore_int.c
1586
else if (p_hwfn->p_dev->tx_coalesce_usecs <= 0xFF)
sys/dev/qlnx/qlnxe/ecore_int.c
1590
timeset = (u8)(p_hwfn->p_dev->tx_coalesce_usecs >> timer_res);
sys/dev/qlnx/qlnxe/ecore_int.c
1592
_ecore_int_cau_conf_pi(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
1600
void ecore_int_sb_setup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1608
if (IS_PF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_int.c
1609
ecore_int_cau_conf_sb(p_hwfn, p_ptt, sb_info->sb_phys,
sys/dev/qlnx/qlnxe/ecore_int.c
1614
ecore_get_igu_free_sb(struct ecore_hwfn *p_hwfn, bool b_is_pf)
sys/dev/qlnx/qlnxe/ecore_int.c
1619
for (igu_id = 0; igu_id < ECORE_MAPPING_MEMORY_SIZE(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
1621
p_block = &p_hwfn->hw_info.p_igu_info->entry[igu_id];
sys/dev/qlnx/qlnxe/ecore_int.c
1635
static u16 ecore_get_pf_igu_sb_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1641
for (igu_id = 0; igu_id < ECORE_MAPPING_MEMORY_SIZE(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
1643
p_block = &p_hwfn->hw_info.p_igu_info->entry[igu_id];
sys/dev/qlnx/qlnxe/ecore_int.c
1656
u16 ecore_get_igu_sb_id(struct ecore_hwfn *p_hwfn, u16 sb_id)
sys/dev/qlnx/qlnxe/ecore_int.c
1662
igu_sb_id = p_hwfn->hw_info.p_igu_info->igu_dsb_id;
sys/dev/qlnx/qlnxe/ecore_int.c
1663
else if (IS_PF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_int.c
1664
igu_sb_id = ecore_get_pf_igu_sb_id(p_hwfn, sb_id + 1);
sys/dev/qlnx/qlnxe/ecore_int.c
1666
igu_sb_id = ecore_vf_get_igu_sb_id(p_hwfn, sb_id);
sys/dev/qlnx/qlnxe/ecore_int.c
1669
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_int.c
1673
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
1676
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
168
static enum _ecore_status_t ecore_pswhst_attn_cb(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
1682
enum _ecore_status_t ecore_int_sb_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1692
sb_info->igu_sb_id = ecore_get_igu_sb_id(p_hwfn, sb_id);
sys/dev/qlnx/qlnxe/ecore_int.c
1699
if (IS_PF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_int.c
170
u32 tmp = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt, PSWHST_REG_VF_DISABLED_ERROR_VALID);
sys/dev/qlnx/qlnxe/ecore_int.c
1703
p_info = p_hwfn->hw_info.p_igu_info;
sys/dev/qlnx/qlnxe/ecore_int.c
1710
ecore_vf_set_sb_info(p_hwfn, sb_id, sb_info);
sys/dev/qlnx/qlnxe/ecore_int.c
1715
sb_info->p_hwfn = p_hwfn;
sys/dev/qlnx/qlnxe/ecore_int.c
1717
sb_info->p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_int.c
1722
if (IS_PF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_int.c
1723
sb_info->igu_addr = (u8 OSAL_IOMEM*)p_hwfn->regview +
sys/dev/qlnx/qlnxe/ecore_int.c
1729
(u8 OSAL_IOMEM*)p_hwfn->regview +
sys/dev/qlnx/qlnxe/ecore_int.c
1736
ecore_int_sb_setup(p_hwfn, p_ptt, sb_info);
sys/dev/qlnx/qlnxe/ecore_int.c
1741
enum _ecore_status_t ecore_int_sb_release(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1755
if (IS_VF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_int.c
1756
ecore_vf_set_sb_info(p_hwfn, sb_id, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_int.c
176
addr = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
1760
p_info = p_hwfn->hw_info.p_igu_info;
sys/dev/qlnx/qlnxe/ecore_int.c
1765
DP_ERR(p_hwfn, "Do Not free sp sb using this function");
sys/dev/qlnx/qlnxe/ecore_int.c
1777
static void ecore_int_sp_sb_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
1779
struct ecore_sb_sp_info *p_sb = p_hwfn->p_sp_sb;
sys/dev/qlnx/qlnxe/ecore_int.c
178
data = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
1785
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_int.c
1788
SB_ALIGNED_SIZE(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_int.c
1791
OSAL_FREE(p_hwfn->p_dev, p_sb);
sys/dev/qlnx/qlnxe/ecore_int.c
1792
p_hwfn->p_sp_sb = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_int.c
1795
static enum _ecore_status_t ecore_int_sp_sb_alloc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
180
DP_INFO(p_hwfn->p_dev, "PF[0x%02x] VF [0x%02x] [Valid 0x%02x] Client [0x%02x] Write [0x%02x] Addr [0x%08x]\n",
sys/dev/qlnx/qlnxe/ecore_int.c
1803
p_sb = OSAL_ALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*p_sb));
sys/dev/qlnx/qlnxe/ecore_int.c
1805
DP_NOTICE(p_hwfn, false, "Failed to allocate `struct ecore_sb_info'\n");
sys/dev/qlnx/qlnxe/ecore_int.c
1810
p_virt = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_int.c
1812
SB_ALIGNED_SIZE(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_int.c
1814
DP_NOTICE(p_hwfn, false, "Failed to allocate status block\n");
sys/dev/qlnx/qlnxe/ecore_int.c
1815
OSAL_FREE(p_hwfn->p_dev, p_sb);
sys/dev/qlnx/qlnxe/ecore_int.c
1820
p_hwfn->p_sp_sb = p_sb;
sys/dev/qlnx/qlnxe/ecore_int.c
1821
ecore_int_sb_init(p_hwfn, p_ptt, &p_sb->sb_info,
sys/dev/qlnx/qlnxe/ecore_int.c
1829
enum _ecore_status_t ecore_int_register_cb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1835
struct ecore_sb_sp_info *p_sp_sb = p_hwfn->p_sp_sb;
sys/dev/qlnx/qlnxe/ecore_int.c
1855
enum _ecore_status_t ecore_int_unregister_cb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1858
struct ecore_sb_sp_info *p_sp_sb = p_hwfn->p_sp_sb;
sys/dev/qlnx/qlnxe/ecore_int.c
1869
u16 ecore_int_get_sp_sb_id(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
1871
return p_hwfn->p_sp_sb->sb_info.igu_sb_id;
sys/dev/qlnx/qlnxe/ecore_int.c
1874
void ecore_int_igu_enable_int(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1881
if (CHIP_REV_IS_FPGA(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_int.c
1882
DP_INFO(p_hwfn, "FPGA - don't enable ATTN generation in IGU\n");
sys/dev/qlnx/qlnxe/ecore_int.c
1887
p_hwfn->p_dev->int_mode = int_mode;
sys/dev/qlnx/qlnxe/ecore_int.c
1888
switch (p_hwfn->p_dev->int_mode) {
sys/dev/qlnx/qlnxe/ecore_int.c
1906
ecore_wr(p_hwfn, p_ptt, IGU_REG_PF_CONFIGURATION, igu_pf_conf);
sys/dev/qlnx/qlnxe/ecore_int.c
1909
static void ecore_int_igu_enable_attn(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1913
if (CHIP_REV_IS_FPGA(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_int.c
1914
DP_INFO(p_hwfn, "FPGA - Don't enable Attentions in IGU and MISC\n");
sys/dev/qlnx/qlnxe/ecore_int.c
1920
ecore_wr(p_hwfn, p_ptt, IGU_REG_ATTENTION_ENABLE, 0);
sys/dev/qlnx/qlnxe/ecore_int.c
1921
ecore_wr(p_hwfn, p_ptt, IGU_REG_LEADING_EDGE_LATCH, 0xfff);
sys/dev/qlnx/qlnxe/ecore_int.c
1922
ecore_wr(p_hwfn, p_ptt, IGU_REG_TRAILING_EDGE_LATCH, 0xfff);
sys/dev/qlnx/qlnxe/ecore_int.c
1923
ecore_wr(p_hwfn, p_ptt, IGU_REG_ATTENTION_ENABLE, 0xfff);
sys/dev/qlnx/qlnxe/ecore_int.c
1926
OSAL_MMIOWB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
1929
ecore_wr(p_hwfn, p_ptt, MISC_REG_AEU_MASK_ATTN_IGU, 0xff);
sys/dev/qlnx/qlnxe/ecore_int.c
1933
ecore_int_igu_enable(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
1938
ecore_int_igu_enable_attn(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_int.c
194
tmp = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
1940
if ((int_mode != ECORE_INT_MODE_INTA) || IS_LEAD_HWFN(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_int.c
1941
rc = OSAL_SLOWPATH_IRQ_REQ(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.c
1943
DP_NOTICE(p_hwfn, true, "Slowpath IRQ request failed\n");
sys/dev/qlnx/qlnxe/ecore_int.c
1946
p_hwfn->b_int_requested = true;
sys/dev/qlnx/qlnxe/ecore_int.c
1950
ecore_int_igu_enable_int(p_hwfn, p_ptt, int_mode);
sys/dev/qlnx/qlnxe/ecore_int.c
1952
p_hwfn->b_int_enabled = 1;
sys/dev/qlnx/qlnxe/ecore_int.c
1957
void ecore_int_igu_disable_int(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
1960
p_hwfn->b_int_enabled = 0;
sys/dev/qlnx/qlnxe/ecore_int.c
1962
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_int.c
1965
ecore_wr(p_hwfn, p_ptt, IGU_REG_PF_CONFIGURATION, 0);
sys/dev/qlnx/qlnxe/ecore_int.c
1969
static void ecore_int_igu_cleanup_sb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
199
addr = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
1997
ecore_wr(p_hwfn, p_ptt, IGU_REG_COMMAND_REG_32LSB_DATA, data);
sys/dev/qlnx/qlnxe/ecore_int.c
1999
OSAL_BARRIER(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
2001
ecore_wr(p_hwfn, p_ptt, IGU_REG_COMMAND_REG_CTRL, cmd_ctrl);
sys/dev/qlnx/qlnxe/ecore_int.c
2004
OSAL_MMIOWB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
201
data = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2014
val = ecore_rd(p_hwfn, p_ptt, sb_bit_addr);
sys/dev/qlnx/qlnxe/ecore_int.c
2021
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_int.c
2026
void ecore_int_igu_init_pure_rt_single(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
203
length = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2033
p_block = &p_hwfn->hw_info.p_igu_info->entry[igu_sb_id];
sys/dev/qlnx/qlnxe/ecore_int.c
2034
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
2041
ecore_int_igu_cleanup_sb(p_hwfn, p_ptt, igu_sb_id, 1, opaque);
sys/dev/qlnx/qlnxe/ecore_int.c
2044
ecore_int_igu_cleanup_sb(p_hwfn, p_ptt, igu_sb_id, 0, opaque);
sys/dev/qlnx/qlnxe/ecore_int.c
2050
val = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2059
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_int.c
206
DP_INFO(p_hwfn->p_dev, "Incorrect access to %08x of length %08x - PF [%02x] VF [%04x] [valid %02x] client [%02x] write [%02x] Byte-Enable [%04x] [%08x]\n",
sys/dev/qlnx/qlnxe/ecore_int.c
2065
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2069
void ecore_int_igu_init_pure_rt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2074
struct ecore_igu_info *p_info = p_hwfn->hw_info.p_igu_info;
sys/dev/qlnx/qlnxe/ecore_int.c
2080
val = ecore_rd(p_hwfn, p_ptt, IGU_REG_BLOCK_CONFIGURATION);
sys/dev/qlnx/qlnxe/ecore_int.c
2083
ecore_wr(p_hwfn, p_ptt, IGU_REG_BLOCK_CONFIGURATION, val);
sys/dev/qlnx/qlnxe/ecore_int.c
2087
igu_sb_id < ECORE_MAPPING_MEMORY_SIZE(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
2096
ecore_int_igu_init_pure_rt_single(p_hwfn, p_ptt, igu_sb_id,
sys/dev/qlnx/qlnxe/ecore_int.c
2097
p_hwfn->hw_info.opaque_fid,
sys/dev/qlnx/qlnxe/ecore_int.c
2102
ecore_int_igu_init_pure_rt_single(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2104
p_hwfn->hw_info.opaque_fid,
sys/dev/qlnx/qlnxe/ecore_int.c
2108
int ecore_int_igu_reset_cam(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2111
struct ecore_igu_info *p_info = p_hwfn->hw_info.p_igu_info;
sys/dev/qlnx/qlnxe/ecore_int.c
2117
if (!RESC_NUM(p_hwfn, ECORE_SB)) {
sys/dev/qlnx/qlnxe/ecore_int.c
2129
if (p_info->usage.cnt != RESC_NUM(p_hwfn, ECORE_SB) - 1) {
sys/dev/qlnx/qlnxe/ecore_int.c
2130
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2132
RESC_NUM(p_hwfn, ECORE_SB) - 1,
sys/dev/qlnx/qlnxe/ecore_int.c
2134
p_info->usage.cnt = RESC_NUM(p_hwfn, ECORE_SB) - 1;
sys/dev/qlnx/qlnxe/ecore_int.c
2138
if (IS_PF_SRIOV(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_int.c
2139
u16 vfs = p_hwfn->p_dev->p_iov_info->total_vfs;
sys/dev/qlnx/qlnxe/ecore_int.c
2142
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
2153
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_int.c
2164
if (IS_PF_SRIOV(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_int.c
2165
p_info->usage.iov_cnt = p_hwfn->p_dev->p_iov_info->total_vfs;
sys/dev/qlnx/qlnxe/ecore_int.c
2180
igu_sb_id < ECORE_MAPPING_MEMORY_SIZE(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
2189
p_block->function_id = p_hwfn->rel_pf_id;
sys/dev/qlnx/qlnxe/ecore_int.c
2197
p_block->function_id = p_hwfn->rel_pf_id;
sys/dev/qlnx/qlnxe/ecore_int.c
2205
p_hwfn->p_dev->p_iov_info->first_vf_in_pf +
sys/dev/qlnx/qlnxe/ecore_int.c
2227
rval = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2232
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2237
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
2248
int ecore_int_igu_reset_cam_default(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2251
struct ecore_sb_cnt_info *p_cnt = &p_hwfn->hw_info.p_igu_info->usage;
sys/dev/qlnx/qlnxe/ecore_int.c
2265
return ecore_int_igu_reset_cam(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_int.c
2268
static void ecore_int_igu_read_cam_block(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2272
u32 val = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2276
p_block = &p_hwfn->hw_info.p_igu_info->entry[igu_sb_id];
sys/dev/qlnx/qlnxe/ecore_int.c
2287
enum _ecore_status_t ecore_int_igu_read_cam(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2295
p_hwfn->hw_info.p_igu_info = OSAL_ZALLOC(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_int.c
2298
if (!p_hwfn->hw_info.p_igu_info)
sys/dev/qlnx/qlnxe/ecore_int.c
2300
p_igu_info = p_hwfn->hw_info.p_igu_info;
sys/dev/qlnx/qlnxe/ecore_int.c
2306
if (p_hwfn->p_dev->p_iov_info) {
sys/dev/qlnx/qlnxe/ecore_int.c
2307
struct ecore_hw_sriov_info *p_iov = p_hwfn->p_dev->p_iov_info;
sys/dev/qlnx/qlnxe/ecore_int.c
2314
igu_sb_id < ECORE_MAPPING_MEMORY_SIZE(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
2317
ecore_int_igu_read_cam_block(p_hwfn, p_ptt, igu_sb_id);
sys/dev/qlnx/qlnxe/ecore_int.c
2321
(p_block->function_id == p_hwfn->rel_pf_id)) {
sys/dev/qlnx/qlnxe/ecore_int.c
2353
(p_hwfn->abs_pf_id == 0))
sys/dev/qlnx/qlnxe/ecore_int.c
2354
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
2361
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_int.c
2371
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
2380
ecore_int_igu_relocate_sb(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2383
struct ecore_igu_info *p_info = p_hwfn->hw_info.p_igu_info;
sys/dev/qlnx/qlnxe/ecore_int.c
2388
if (IS_VF(p_hwfn->p_dev) || !IS_PF_SRIOV(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_int.c
2395
DP_INFO(p_hwfn, "Can't relocate SBs as MFW is too old.\n");
sys/dev/qlnx/qlnxe/ecore_int.c
2403
igu_sb_id = ecore_get_pf_igu_sb_id(p_hwfn, sb_id + 1);
sys/dev/qlnx/qlnxe/ecore_int.c
2412
if (ecore_get_pf_igu_sb_id(p_hwfn, sb_id + 1) !=
sys/dev/qlnx/qlnxe/ecore_int.c
2421
for (; igu_sb_id < ECORE_MAPPING_MEMORY_SIZE(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
2437
if (igu_sb_id == ECORE_MAPPING_MEMORY_SIZE(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_int.c
2438
DP_VERBOSE(p_hwfn, (ECORE_MSG_INTR | ECORE_MSG_IOV),
sys/dev/qlnx/qlnxe/ecore_int.c
2444
DP_VERBOSE(p_hwfn, (ECORE_MSG_INTR | ECORE_MSG_IOV),
sys/dev/qlnx/qlnxe/ecore_int.c
2456
vf_num = (u16)p_hwfn->p_dev->p_iov_info->first_vf_in_pf;
sys/dev/qlnx/qlnxe/ecore_int.c
2471
p_hwfn->hw_info.feat_num[ECORE_PF_L2_QUE]--;
sys/dev/qlnx/qlnxe/ecore_int.c
2472
p_hwfn->hw_info.feat_num[ECORE_VF_L2_QUE]++;
sys/dev/qlnx/qlnxe/ecore_int.c
2475
p_block->function_id = p_hwfn->rel_pf_id;
sys/dev/qlnx/qlnxe/ecore_int.c
2484
p_hwfn->hw_info.feat_num[ECORE_PF_L2_QUE]++;
sys/dev/qlnx/qlnxe/ecore_int.c
2485
p_hwfn->hw_info.feat_num[ECORE_VF_L2_QUE]--;
sys/dev/qlnx/qlnxe/ecore_int.c
2496
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2500
ecore_int_cau_conf_sb(p_hwfn, p_ptt, 0,
sys/dev/qlnx/qlnxe/ecore_int.c
2504
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
2517
void ecore_int_igu_init_rt(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
2521
STORE_RT_REG(p_hwfn, IGU_REG_PF_CONFIGURATION_RT_OFFSET, igu_pf_conf);
sys/dev/qlnx/qlnxe/ecore_int.c
2528
u64 ecore_int_igu_read_sisr_reg(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
2533
intr_status_lo = REG_RD(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2536
intr_status_hi = REG_RD(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2544
static void ecore_int_sp_dpc_setup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
2546
OSAL_DPC_INIT(p_hwfn->sp_dpc, p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.c
2547
p_hwfn->b_sp_dpc_enabled = true;
sys/dev/qlnx/qlnxe/ecore_int.c
2550
static enum _ecore_status_t ecore_int_sp_dpc_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
2552
p_hwfn->sp_dpc = OSAL_DPC_ALLOC(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.c
2553
if (!p_hwfn->sp_dpc)
sys/dev/qlnx/qlnxe/ecore_int.c
2559
static void ecore_int_sp_dpc_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
2561
OSAL_FREE(p_hwfn->p_dev, p_hwfn->sp_dpc);
sys/dev/qlnx/qlnxe/ecore_int.c
2562
p_hwfn->sp_dpc = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_int.c
2565
enum _ecore_status_t ecore_int_alloc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2570
rc = ecore_int_sp_dpc_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.c
2572
DP_ERR(p_hwfn->p_dev, "Failed to allocate sp dpc mem\n");
sys/dev/qlnx/qlnxe/ecore_int.c
2576
rc = ecore_int_sp_sb_alloc(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_int.c
2578
DP_ERR(p_hwfn->p_dev, "Failed to allocate sp sb mem\n");
sys/dev/qlnx/qlnxe/ecore_int.c
258
static enum _ecore_status_t ecore_grc_attn_cb(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
2582
rc = ecore_int_sb_attn_alloc(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_int.c
2584
DP_ERR(p_hwfn->p_dev, "Failed to allocate sb attn mem\n");
sys/dev/qlnx/qlnxe/ecore_int.c
2589
void ecore_int_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
2591
ecore_int_sp_sb_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.c
2592
ecore_int_sb_attn_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.c
2593
ecore_int_sp_dpc_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.c
2596
void ecore_int_setup(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_int.c
2598
if (!p_hwfn || !p_hwfn->p_sp_sb || !p_hwfn->p_sb_attn)
sys/dev/qlnx/qlnxe/ecore_int.c
2601
ecore_int_sb_setup(p_hwfn, p_ptt, &p_hwfn->p_sp_sb->sb_info);
sys/dev/qlnx/qlnxe/ecore_int.c
2602
ecore_int_sb_attn_setup(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_int.c
2603
ecore_int_sp_dpc_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.c
2606
void ecore_int_get_num_sbs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2609
struct ecore_igu_info *p_igu_info = p_hwfn->hw_info.p_igu_info;
sys/dev/qlnx/qlnxe/ecore_int.c
2631
enum _ecore_status_t ecore_int_set_timer_res(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2638
if (!p_hwfn->hw_init_done) {
sys/dev/qlnx/qlnxe/ecore_int.c
2639
DP_ERR(p_hwfn, "hardware not initialized yet\n");
sys/dev/qlnx/qlnxe/ecore_int.c
2643
rc = ecore_dmae_grc2host(p_hwfn, p_ptt, CAU_REG_SB_VAR_MEMORY +
sys/dev/qlnx/qlnxe/ecore_int.c
2648
DP_ERR(p_hwfn, "dmae_grc2host failed %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_int.c
265
tmp = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2657
rc = ecore_dmae_host2grc(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2662
DP_ERR(p_hwfn, "dmae_host2grc failed %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_int.c
2669
enum _ecore_status_t ecore_int_get_sb_dbg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
2677
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_int.c
2680
if (sbid > NUM_OF_SBS(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_int.c
2683
p_info->igu_prod = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2685
p_info->igu_cons = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
2689
p_info->pi[i] = (u16)ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
271
tmp = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
273
tmp2 = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
276
DP_NOTICE(p_hwfn->p_dev, false,
sys/dev/qlnx/qlnxe/ecore_int.c
293
ecore_wr(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
312
enum _ecore_status_t ecore_pglueb_rbc_attn_handler(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
317
tmp = ecore_rd(p_hwfn, p_ptt, PGLUE_B_REG_TX_ERR_WR_DETAILS2);
sys/dev/qlnx/qlnxe/ecore_int.c
321
addr_lo = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
323
addr_hi = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
325
details = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
328
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_int.c
340
tmp = ecore_rd(p_hwfn, p_ptt, PGLUE_B_REG_TX_ERR_RD_DETAILS2);
sys/dev/qlnx/qlnxe/ecore_int.c
344
addr_lo = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
346
addr_hi = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
348
details = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
351
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_int.c
363
tmp = ecore_rd(p_hwfn, p_ptt, PGLUE_B_REG_TX_ERR_WR_DETAILS_ICPL);
sys/dev/qlnx/qlnxe/ecore_int.c
365
DP_NOTICE(p_hwfn, false, "ICPL error - %08x\n", tmp);
sys/dev/qlnx/qlnxe/ecore_int.c
367
tmp = ecore_rd(p_hwfn, p_ptt, PGLUE_B_REG_MASTER_ZLR_ERR_DETAILS);
sys/dev/qlnx/qlnxe/ecore_int.c
371
addr_lo = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
373
addr_hi = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
376
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_int.c
381
tmp = ecore_rd(p_hwfn, p_ptt, PGLUE_B_REG_VF_ILT_ERR_DETAILS2);
sys/dev/qlnx/qlnxe/ecore_int.c
385
addr_lo = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
387
addr_hi = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
389
details = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
392
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_int.c
398
ecore_wr(p_hwfn, p_ptt, PGLUE_B_REG_LATCHED_ERRORS_CLR, (1 << 2));
sys/dev/qlnx/qlnxe/ecore_int.c
403
static enum _ecore_status_t ecore_pglueb_rbc_attn_cb(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
405
return ecore_pglueb_rbc_attn_handler(p_hwfn, p_hwfn->p_dpc_ptt);
sys/dev/qlnx/qlnxe/ecore_int.c
408
static enum _ecore_status_t ecore_fw_assertion(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
410
DP_NOTICE(p_hwfn, false, "FW assertion!\n");
sys/dev/qlnx/qlnxe/ecore_int.c
412
ecore_hw_err_notify(p_hwfn, ECORE_HW_ERR_FW_ASSERT);
sys/dev/qlnx/qlnxe/ecore_int.c
418
ecore_general_attention_35(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
420
DP_INFO(p_hwfn, "General attention 35!\n");
sys/dev/qlnx/qlnxe/ecore_int.c
435
static enum _ecore_status_t ecore_db_rec_attn(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
452
usage = ecore_rd(p_hwfn, p_ptt, DORQ_REG_PF_USAGE_CNT);
sys/dev/qlnx/qlnxe/ecore_int.c
458
DP_NOTICE(p_hwfn->p_dev, false,
sys/dev/qlnx/qlnxe/ecore_int.c
465
ecore_wr(p_hwfn, p_ptt, DORQ_REG_DPM_FORCE_ABORT, 0x1);
sys/dev/qlnx/qlnxe/ecore_int.c
468
ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_OVFL_STICKY, 0x0);
sys/dev/qlnx/qlnxe/ecore_int.c
471
ecore_db_recovery_execute(p_hwfn, DB_REC_REAL_DEAL);
sys/dev/qlnx/qlnxe/ecore_int.c
476
static enum _ecore_status_t ecore_dorq_attn_cb(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
480
struct ecore_ptt *p_ptt = p_hwfn->p_dpc_ptt;
sys/dev/qlnx/qlnxe/ecore_int.c
483
int_sts = ecore_rd(p_hwfn, p_ptt, DORQ_REG_INT_STS);
sys/dev/qlnx/qlnxe/ecore_int.c
484
DP_NOTICE(p_hwfn->p_dev, false, "DORQ attention. int_sts was %x\n",
sys/dev/qlnx/qlnxe/ecore_int.c
499
first_drop_reason = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
502
details = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
504
address = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
506
overflow = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
508
all_drops_reason = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
512
DP_NOTICE(p_hwfn->p_dev, false,
sys/dev/qlnx/qlnxe/ecore_int.c
526
rc = ecore_db_rec_attn(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_int.c
532
ecore_wr(p_hwfn, p_ptt, DORQ_REG_DB_DROP_DETAILS_REL, 0);
sys/dev/qlnx/qlnxe/ecore_int.c
537
ecore_wr(p_hwfn, p_ptt, DORQ_REG_INT_STS_WR,
sys/dev/qlnx/qlnxe/ecore_int.c
548
DP_INFO(p_hwfn, "DORQ fatal attention\n");
sys/dev/qlnx/qlnxe/ecore_int.c
553
static enum _ecore_status_t ecore_tm_attn_cb(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
556
if (CHIP_REV_IS_EMUL_B0(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_int.c
557
u32 val = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
566
DP_INFO(p_hwfn, "TM attention on emulation - most likely results of clock-ratios\n");
sys/dev/qlnx/qlnxe/ecore_int.c
567
val = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt, TM_REG_INT_MASK_1);
sys/dev/qlnx/qlnxe/ecore_int.c
570
ecore_wr(p_hwfn, p_hwfn->p_dpc_ptt, TM_REG_INT_MASK_1, val);
sys/dev/qlnx/qlnxe/ecore_int.c
758
ecore_int_aeu_translate(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
761
if (!ECORE_IS_BB(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_int.c
771
static bool ecore_int_is_parity_flag(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
774
return !!(ecore_int_aeu_translate(p_hwfn, p_bit)->flags &
sys/dev/qlnx/qlnxe/ecore_int.c
801
static u16 ecore_attn_update_idx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
806
OSAL_MMIOWB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
814
OSAL_MMIOWB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_int.c
826
static enum _ecore_status_t ecore_int_assertion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
829
struct ecore_sb_attn_info *sb_attn_sw = p_hwfn->p_sb_attn;
sys/dev/qlnx/qlnxe/ecore_int.c
833
igu_mask = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
835
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR, "IGU mask: 0x%08x --> 0x%08x\n",
sys/dev/qlnx/qlnxe/ecore_int.c
838
ecore_wr(p_hwfn, p_hwfn->p_dpc_ptt, IGU_REG_ATTENTION_ENABLE, igu_mask);
sys/dev/qlnx/qlnxe/ecore_int.c
840
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR,
sys/dev/qlnx/qlnxe/ecore_int.c
848
ecore_mcp_handle_events(p_hwfn, p_hwfn->p_dpc_ptt);
sys/dev/qlnx/qlnxe/ecore_int.c
850
ecore_wr(p_hwfn, p_hwfn->p_dpc_ptt,
sys/dev/qlnx/qlnxe/ecore_int.c
855
DIRECT_REG_WR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
856
(u8 OSAL_IOMEM*)p_hwfn->regview +
sys/dev/qlnx/qlnxe/ecore_int.c
861
DP_VERBOSE(p_hwfn, ECORE_MSG_INTR, "set cmd IGU: 0x%04x\n",
sys/dev/qlnx/qlnxe/ecore_int.c
867
static void ecore_int_attn_print(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
876
status = ecore_dbg_read_attn(p_hwfn, p_hwfn->p_dpc_ptt, id, type,
sys/dev/qlnx/qlnxe/ecore_int.c
880
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_int.c
884
ecore_dbg_parse_attn(p_hwfn, &attn_results);
sys/dev/qlnx/qlnxe/ecore_int.c
887
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_int.c
891
ecore_dbg_print_attn(p_hwfn, &attn_results);
sys/dev/qlnx/qlnxe/ecore_int.c
90
#define SB_ATTN_ALIGNED_SIZE(p_hwfn) \
sys/dev/qlnx/qlnxe/ecore_int.c
908
ecore_int_deassertion_aeu_bit(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
91
ALIGNED_TYPE_SIZE(struct atten_status_block, p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.c
917
DP_INFO(p_hwfn, "Deasserted attention `%s'[%08x]\n",
sys/dev/qlnx/qlnxe/ecore_int.c
922
DP_INFO(p_hwfn, "`%s (attention)': Calling Callback function\n",
sys/dev/qlnx/qlnxe/ecore_int.c
924
rc = p_aeu->cb(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.c
932
ecore_int_attn_print(p_hwfn, p_aeu->block_index,
sys/dev/qlnx/qlnxe/ecore_int.c
937
DP_NOTICE(p_hwfn, true, "`%s': Fatal attention\n",
sys/dev/qlnx/qlnxe/ecore_int.c
940
ecore_hw_err_notify(p_hwfn, ECORE_HW_ERR_HW_ATTN);
sys/dev/qlnx/qlnxe/ecore_int.c
945
p_hwfn->p_dev->attn_clr_en) {
sys/dev/qlnx/qlnxe/ecore_int.c
948
val = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en_reg);
sys/dev/qlnx/qlnxe/ecore_int.c
949
ecore_wr(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en_reg, (val & mask));
sys/dev/qlnx/qlnxe/ecore_int.c
950
DP_INFO(p_hwfn, "`%s' - Disabled future attentions\n",
sys/dev/qlnx/qlnxe/ecore_int.c
965
static void ecore_int_deassertion_parity(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.c
971
DP_NOTICE(p_hwfn->p_dev, false,
sys/dev/qlnx/qlnxe/ecore_int.c
976
ecore_int_attn_print(p_hwfn, block_id, ATTN_TYPE_PARITY, false);
sys/dev/qlnx/qlnxe/ecore_int.c
980
ecore_int_attn_print(p_hwfn, BLOCK_OPTE,
sys/dev/qlnx/qlnxe/ecore_int.c
982
ecore_int_attn_print(p_hwfn, BLOCK_MCP,
sys/dev/qlnx/qlnxe/ecore_int.c
989
val = ecore_rd(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en_reg);
sys/dev/qlnx/qlnxe/ecore_int.c
990
ecore_wr(p_hwfn, p_hwfn->p_dpc_ptt, aeu_en_reg, val & mask);
sys/dev/qlnx/qlnxe/ecore_int.c
991
DP_INFO(p_hwfn, "`%s' - Disabled future parity errors\n",
sys/dev/qlnx/qlnxe/ecore_int.h
104
u16 ecore_get_igu_sb_id(struct ecore_hwfn *p_hwfn, u16 sb_id);
sys/dev/qlnx/qlnxe/ecore_int.h
115
ecore_get_igu_free_sb(struct ecore_hwfn *p_hwfn, bool b_is_pf);
sys/dev/qlnx/qlnxe/ecore_int.h
118
void ecore_int_igu_init_pure_rt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.h
123
void ecore_int_igu_init_rt(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int.h
136
enum _ecore_status_t ecore_int_igu_read_cam(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.h
41
#define SB_ALIGNED_SIZE(p_hwfn) \
sys/dev/qlnx/qlnxe/ecore_int.h
42
ALIGNED_TYPE_SIZE(struct status_block_e4, p_hwfn)
sys/dev/qlnx/qlnxe/ecore_int.h
84
int ecore_int_igu_reset_cam(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int.h
93
int ecore_int_igu_reset_cam_default(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
137
DIRECT_REG_WR(sb_info->p_hwfn, sb_info->igu_addr,
sys/dev/qlnx/qlnxe/ecore_int_api.h
151
static OSAL_INLINE void __internal_ram_wr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
155
static OSAL_INLINE void __internal_ram_wr(void *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
164
DIRECT_REG_WR(p_hwfn, &((u32 OSAL_IOMEM *)addr)[i], data[i]);
sys/dev/qlnx/qlnxe/ecore_int_api.h
168
static OSAL_INLINE void internal_ram_wr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
172
__internal_ram_wr(p_hwfn, addr, size, data);
sys/dev/qlnx/qlnxe/ecore_int_api.h
202
void ecore_int_cau_conf_pi(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
216
void ecore_int_igu_enable_int(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
226
void ecore_int_igu_disable_int(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
237
u64 ecore_int_igu_read_sisr_reg(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_int_api.h
257
enum _ecore_status_t ecore_int_sb_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
271
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
288
enum _ecore_status_t ecore_int_sb_release(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
310
void ecore_int_get_num_sbs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
344
enum _ecore_status_t ecore_int_get_sb_dbg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_int_api.h
361
ecore_int_igu_relocate_sb(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_int_api.h
61
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/ecore_iov_api.h
153
ecore_iov_get_vf_sw_mbx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
216
ecore_iov_init_hw_for_vf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
228
void ecore_iov_process_mbx_req(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
244
enum _ecore_status_t ecore_iov_release_hw_for_vf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
257
enum _ecore_status_t ecore_iov_set_vf_ctx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
269
enum _ecore_status_t ecore_iov_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
282
ecore_iov_single_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
296
void ecore_iov_set_link(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
311
void ecore_iov_get_link(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
325
bool ecore_iov_is_vf_pending_flr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
342
bool ecore_iov_is_valid_vfid(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
357
ecore_iov_get_public_vf_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
366
void ecore_iov_pf_get_pending_events(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
378
enum _ecore_status_t ecore_iov_copy_vf_msg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
389
void ecore_iov_bulletin_set_forced_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
400
enum _ecore_status_t ecore_iov_bulletin_set_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
415
ecore_iov_bulletin_set_forced_untagged_default(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
42
#define IS_PF_SRIOV(p_hwfn) (!!((p_hwfn)->p_dev->p_iov_info))
sys/dev/qlnx/qlnxe/ecore_iov_api.h
426
void ecore_iov_get_vfs_opaque_fid(struct ecore_hwfn *p_hwfn, int vfid,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
437
void ecore_iov_bulletin_set_forced_vlan(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
44
#define IS_PF_SRIOV(p_hwfn) (0)
sys/dev/qlnx/qlnxe/ecore_iov_api.h
446
bool ecore_iov_vf_has_vport_instance(struct ecore_hwfn *p_hwfn, int vfid);
sys/dev/qlnx/qlnxe/ecore_iov_api.h
457
enum _ecore_status_t ecore_iov_post_vf_bulletin(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
46
#define IS_PF_SRIOV_ALLOC(p_hwfn) (!!((p_hwfn)->pf_iov_info))
sys/dev/qlnx/qlnxe/ecore_iov_api.h
469
bool ecore_iov_is_vf_stopped(struct ecore_hwfn *p_hwfn, int vfid);
sys/dev/qlnx/qlnxe/ecore_iov_api.h
47
#define IS_PF_PDA(p_hwfn) 0 /* @@TBD Michalk */
sys/dev/qlnx/qlnxe/ecore_iov_api.h
480
enum _ecore_status_t ecore_iov_spoofchk_set(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
491
bool ecore_iov_spoofchk_get(struct ecore_hwfn *p_hwfn, int vfid);
sys/dev/qlnx/qlnxe/ecore_iov_api.h
501
bool ecore_iov_pf_sanity_check(struct ecore_hwfn *p_hwfn, int vfid);
sys/dev/qlnx/qlnxe/ecore_iov_api.h
510
u8 ecore_iov_vf_chains_per_pf(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iov_api.h
520
void ecore_iov_get_vf_req_virt_mbx_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
533
void ecore_iov_get_vf_reply_virt_mbx_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
563
u8 *ecore_iov_bulletin_get_forced_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
574
u16 ecore_iov_bulletin_get_forced_vlan(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
586
enum _ecore_status_t ecore_iov_configure_tx_rate(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
600
enum _ecore_status_t ecore_iov_get_vf_stats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
613
u8 ecore_iov_get_vf_num_rxqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
624
u8 ecore_iov_get_vf_num_active_rxqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
635
void *ecore_iov_get_vf_ctx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
646
u8 ecore_iov_get_vf_num_sbs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
657
bool ecore_iov_is_vf_wait_for_acquire(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
668
bool ecore_iov_is_vf_acquired_not_initialized(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
679
bool ecore_iov_is_vf_initialized(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
690
bool ecore_iov_is_vf_started(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
700
int ecore_iov_get_vf_min_rate(struct ecore_hwfn *p_hwfn, int vfid);
sys/dev/qlnx/qlnxe/ecore_iov_api.h
731
ecore_iov_pf_configure_vf_queue_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
743
u16 ecore_iov_get_next_active_vf(struct ecore_hwfn *p_hwfn, u16 rel_vf_id);
sys/dev/qlnx/qlnxe/ecore_iov_api.h
744
void ecore_iov_bulletin_set_udp_ports(struct ecore_hwfn *p_hwfn, int vfid,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
757
void ecore_iov_set_vf_hw_channel(struct ecore_hwfn *p_hwfn, int vfid,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
764
static OSAL_INLINE enum _ecore_status_t ecore_iov_init_hw_for_vf(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_ptt OSAL_UNUSED *p_ptt, struct ecore_iov_vf_init_params OSAL_UNUSED *p_params) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
765
static OSAL_INLINE void ecore_iov_process_mbx_req(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_ptt OSAL_UNUSED *p_ptt, int OSAL_UNUSED vfid) {}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
766
static OSAL_INLINE enum _ecore_status_t ecore_iov_release_hw_for_vf(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_ptt OSAL_UNUSED *p_ptt, u16 OSAL_UNUSED rel_vf_id) {return ECORE_SUCCESS;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
767
static OSAL_INLINE enum _ecore_status_t ecore_iov_set_vf_ctx(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED vf_id, OSAL_UNUSED void *ctx) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
768
static OSAL_INLINE enum _ecore_status_t ecore_iov_vf_flr_cleanup(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_ptt OSAL_UNUSED *p_ptt) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
769
static OSAL_INLINE enum _ecore_status_t ecore_iov_single_vf_flr_cleanup(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_ptt OSAL_UNUSED *p_ptt, u16 OSAL_UNUSED rel_vf_id) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
770
static OSAL_INLINE void ecore_iov_set_link(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED vfid, struct ecore_mcp_link_params OSAL_UNUSED *params, struct ecore_mcp_link_state OSAL_UNUSED *link, struct ecore_mcp_link_capabilities OSAL_UNUSED *p_caps) {}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
771
static OSAL_INLINE void ecore_iov_get_link(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED vfid, struct ecore_mcp_link_params OSAL_UNUSED *params, struct ecore_mcp_link_state OSAL_UNUSED *link, struct ecore_mcp_link_capabilities OSAL_UNUSED *p_caps) {}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
772
static OSAL_INLINE bool ecore_iov_is_vf_pending_flr(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id) {return false;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
775
ecore_iov_is_valid_vfid(struct ecore_hwfn OSAL_UNUSED *p_hwfn, int OSAL_UNUSED rel_vf_id,
sys/dev/qlnx/qlnxe/ecore_iov_api.h
782
static OSAL_INLINE struct ecore_public_vf_info* ecore_iov_get_public_vf_info(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED vfid, bool OSAL_UNUSED b_enabled_only) {return OSAL_NULL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
783
static OSAL_INLINE void ecore_iov_pf_add_pending_events(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED vfid) {}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
784
static OSAL_INLINE void ecore_iov_pf_get_and_clear_pending_events(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u64 OSAL_UNUSED *events) {}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
785
static OSAL_INLINE enum _ecore_status_t ecore_iov_copy_vf_msg(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_ptt OSAL_UNUSED *ptt, int OSAL_UNUSED vfid) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
786
static OSAL_INLINE void ecore_iov_bulletin_set_forced_mac(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED *mac, int OSAL_UNUSED vfid) {}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
787
static OSAL_INLINE enum _ecore_status_t ecore_iov_bulletin_set_mac(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED *mac, OSAL_UNUSED int vfid) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
788
static OSAL_INLINE enum _ecore_status_t ecore_iov_bulletin_set_forced_untagged_default(struct ecore_hwfn OSAL_UNUSED *p_hwfn, bool OSAL_UNUSED b_untagged_only, int OSAL_UNUSED vfid) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
789
static OSAL_INLINE void ecore_iov_get_vfs_opaque_fid(struct ecore_hwfn OSAL_UNUSED *p_hwfn, int OSAL_UNUSED vfid, u16 OSAL_UNUSED *opaque_fid) {}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
790
static OSAL_INLINE void ecore_iov_bulletin_set_forced_vlan(struct ecore_hwfn OSAL_UNUSED p_hwfn, u16 OSAL_UNUSED pvid, int OSAL_UNUSED vfid) {}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
791
static OSAL_INLINE bool ecore_iov_vf_has_vport_instance(struct ecore_hwfn OSAL_UNUSED *p_hwfn, int OSAL_UNUSED vfid) {return false;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
792
static OSAL_INLINE enum _ecore_status_t ecore_iov_post_vf_bulletin(struct ecore_hwfn OSAL_UNUSED *p_hwfn, int OSAL_UNUSED vfid, struct ecore_ptt OSAL_UNUSED *p_ptt) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
793
static OSAL_INLINE bool ecore_iov_is_vf_stopped(struct ecore_hwfn OSAL_UNUSED *p_hwfn, int OSAL_UNUSED vfid) {return false;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
794
static OSAL_INLINE enum _ecore_status_t ecore_iov_spoofchk_set(struct ecore_hwfn OSAL_UNUSED *p_hwfn, int OSAL_UNUSED vfid, bool OSAL_UNUSED val) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
795
static OSAL_INLINE bool ecore_iov_spoofchk_get(struct ecore_hwfn OSAL_UNUSED *p_hwfn, int OSAL_UNUSED vfid) {return false;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
796
static OSAL_INLINE bool ecore_iov_pf_sanity_check(struct ecore_hwfn OSAL_UNUSED *p_hwfn, int OSAL_UNUSED vfid) {return false;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
797
static OSAL_INLINE u8 ecore_iov_vf_chains_per_pf(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return 0;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
798
static OSAL_INLINE void ecore_iov_get_vf_req_virt_mbx_params(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id, void OSAL_UNUSED **pp_req_virt_addr, u16 OSAL_UNUSED *p_req_virt_size) {}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
799
static OSAL_INLINE void ecore_iov_get_vf_reply_virt_mbx_params(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id, void OSAL_UNUSED **pp_reply_virt_addr, u16 OSAL_UNUSED *p_reply_virt_size) {}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
802
static OSAL_INLINE u8 *ecore_iov_bulletin_get_forced_mac(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id) {return OSAL_NULL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
803
static OSAL_INLINE u16 ecore_iov_bulletin_get_forced_vlan(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id) {return 0;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
804
static OSAL_INLINE enum _ecore_status_t ecore_iov_configure_tx_rate(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_ptt OSAL_UNUSED *p_ptt, int OSAL_UNUSED vfid, int OSAL_UNUSED val) { return ECORE_INVAL; }
sys/dev/qlnx/qlnxe/ecore_iov_api.h
805
static OSAL_INLINE enum _ecore_status_t ecore_iov_get_vf_stats(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_ptt OSAL_UNUSED *p_ptt, int OSAL_UNUSED vfid, struct ecore_eth_stats OSAL_UNUSED *p_stats) { return ECORE_INVAL; }
sys/dev/qlnx/qlnxe/ecore_iov_api.h
806
static OSAL_INLINE u8 ecore_iov_get_vf_num_rxqs(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id) {return 0;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
807
static OSAL_INLINE u8 ecore_iov_get_vf_num_active_rxqs(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id) {return 0;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
808
static OSAL_INLINE void *ecore_iov_get_vf_ctx(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id) {return OSAL_NULL;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
809
static OSAL_INLINE u8 ecore_iov_get_vf_num_sbs(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id) {return 0;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
810
static OSAL_INLINE bool ecore_iov_is_vf_wait_for_acquire(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id) {return false;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
811
static OSAL_INLINE bool ecore_iov_is_vf_acquired_not_initialized(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id) {return false;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
812
static OSAL_INLINE bool ecore_iov_is_vf_initialized(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id) {return false;}
sys/dev/qlnx/qlnxe/ecore_iov_api.h
813
static OSAL_INLINE int ecore_iov_get_vf_min_rate(struct ecore_hwfn OSAL_UNUSED *p_hwfn, int OSAL_UNUSED vfid) { return 0; }
sys/dev/qlnx/qlnxe/ecore_iov_api.h
816
static OSAL_INLINE void ecore_iov_bulletin_set_udp_ports(struct ecore_hwfn OSAL_UNUSED *p_hwfn, int OSAL_UNUSED vfid, u16 OSAL_UNUSED vxlan_port, u16 OSAL_UNUSED geneve_port) { return; }
sys/dev/qlnx/qlnxe/ecore_iov_api.h
817
static OSAL_INLINE u16 ecore_iov_get_next_active_vf(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED rel_vf_id) { return MAX_NUM_VFS_E4; }
sys/dev/qlnx/qlnxe/ecore_iov_api.h
821
ecore_iov_set_vf_hw_channel(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iscsi.h
104
ecore_sp_iscsi_conn_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iscsi.h
122
ecore_sp_iscsi_mac_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iscsi.h
141
ecore_sp_iscsi_stats_tcp_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iscsi.h
161
ecore_sp_iscsi_conn_terminate(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iscsi.h
180
ecore_sp_iscsi_conn_clear_sq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iscsi.h
50
enum _ecore_status_t ecore_iscsi_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iscsi.h
52
void ecore_iscsi_setup(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iscsi.h
54
void ecore_iscsi_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iscsi.h
57
ecore_iscsi_alloc(struct ecore_hwfn OSAL_UNUSED *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iscsi.h
63
ecore_iscsi_setup(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {}
sys/dev/qlnx/qlnxe/ecore_iscsi.h
66
ecore_iscsi_free(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {}
sys/dev/qlnx/qlnxe/ecore_iscsi.h
70
void ecore_iscsi_free_connection(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iscsi.h
86
ecore_sp_iscsi_conn_offload(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
100
ecore_iwarp_get_curr_fpdu(struct ecore_hwfn *p_hwfn, u16 cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1008
ecore_iwarp_mpa_offload(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1014
DP_ERR(p_hwfn, "MPA_NEGOTIATE Received MPA rev 2 on driver supporting only MPA rev 1\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
104
ecore_iwarp_init_devinfo(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
106
struct ecore_rdma_device *dev = p_hwfn->p_rdma_info->dev;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1067
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1090
ecore_iwarp_move_to_ep_list(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1096
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1098
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1102
ecore_iwarp_return_ep(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
111
p_hwfn->p_rdma_info->num_qps) -
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1115
ecore_iwarp_alloc_tcp_cid(p_hwfn, &ep->tcp_cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1118
ecore_iwarp_move_to_ep_list(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1119
&p_hwfn->p_rdma_info->iwarp.ep_free_list,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1124
ecore_iwarp_parse_private_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1132
if (MPA_REV2(p_hwfn->p_rdma_info->iwarp.mpa_rev)) {
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1151
ecore_iwarp_mpa_reply_arrived(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1157
DP_NOTICE(p_hwfn, true, "MPA reply event not expected on passive side!\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1163
ecore_iwarp_parse_private_data(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1165
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1185
ecore_iwarp_mpa_complete(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1198
ecore_iwarp_parse_private_data(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1201
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
121
ecore_iwarp_init_hw(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1212
DP_NOTICE(p_hwfn, false, "%s(0x%x) ERROR: Got MPA complete without MPA offload fw_return_code=%d ep->state=%d\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1229
ecore_iwarp_modify_qp(p_hwfn, ep->qp,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
123
p_hwfn->rdma_prs_search_reg = PRS_REG_SEARCH_TCP;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1236
DP_NOTICE(p_hwfn, false, "%s(0x%x) MPA timeout\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
124
ecore_wr(p_hwfn, p_ptt, p_hwfn->rdma_prs_search_reg, 1);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1241
DP_NOTICE(p_hwfn, false, "%s(0x%x) MPA Reject\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1246
DP_NOTICE(p_hwfn, false, "%s(0x%x) MPA reset(tcp cid: 0x%x)\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
125
p_hwfn->b_rdma_enabled_in_prs = true;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1252
DP_NOTICE(p_hwfn, false, "%s(0x%x) MPA received FIN\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1257
DP_NOTICE(p_hwfn, false, "%s(0x%x) MPA insufficient ird\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1262
DP_NOTICE(p_hwfn, false, "%s(0x%x) MPA RTR MISMATCH\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1267
DP_NOTICE(p_hwfn, false, "%s(0x%x) MPA Invalid Packet\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1272
DP_NOTICE(p_hwfn, false, "%s(0x%x) MPA Local Error\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1277
DP_NOTICE(p_hwfn, false, "%s(0x%x) MPA TERMINATE\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1298
ecore_iwarp_return_ep(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1300
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1303
&p_hwfn->p_rdma_info->iwarp.ep_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1304
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
131
ecore_iwarp_init_fw_ramrod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1310
ecore_iwarp_mpa_v2_set_private(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
134
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1342
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
136
p_hwfn->p_rdma_info->iwarp.ll2_ooo_handle);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1361
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1371
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1379
iwarp_info = &p_hwfn->p_rdma_info->iwarp;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1382
rc = ecore_iwarp_alloc_cid(p_hwfn, &cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1387
rc = ecore_iwarp_create_ep(p_hwfn, &ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
139
p_hwfn->hw_info.resc_start[ECORE_LL2_QUEUE] +
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1392
DP_ERR(p_hwfn, "Note re-use of QP for different connect\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1398
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
140
p_hwfn->p_rdma_info->iwarp.ll2_ooo_handle;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1400
&p_hwfn->p_rdma_info->iwarp.ep_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1401
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1426
ecore_iwarp_mpa_v2_set_private(p_hwfn, ep, &mpa_data_size);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1436
if (p_hwfn->p_rdma_info->iwarp.tcp_flags & ECORE_IWARP_TS_EN)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1448
rc = ecore_iwarp_tcp_offload(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1450
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "QP(0x%x) EP(0x%x) rc = %d\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1454
ecore_iwarp_destroy_ep(p_hwfn, ep, true);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1460
ecore_iwarp_get_free_ep(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1465
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1467
if (OSAL_LIST_IS_EMPTY(&p_hwfn->p_rdma_info->iwarp.ep_free_list)) {
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1468
DP_ERR(p_hwfn, "Ep list is empty\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
147
ecore_iwarp_alloc_cid(struct ecore_hwfn *p_hwfn, u32 *cid)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1472
ep = OSAL_LIST_FIRST_ENTRY(&p_hwfn->p_rdma_info->iwarp.ep_free_list,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1480
rc = ecore_iwarp_alloc_tcp_cid(p_hwfn, &ep->tcp_cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1493
&p_hwfn->p_rdma_info->iwarp.ep_free_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1496
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
151
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1510
ecore_iwarp_wait_cid_map_cleared(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
153
rc = ecore_rdma_bmap_alloc_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1533
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
154
&p_hwfn->p_rdma_info->cid_map,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1543
ecore_iwarp_wait_for_all_cids(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1549
p_hwfn, &p_hwfn->p_rdma_info->tcp_cid_map);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1555
ecore_bmap_release_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1556
&p_hwfn->p_rdma_info->cid_map,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1562
p_hwfn, &p_hwfn->p_rdma_info->cid_map);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1568
ecore_iwarp_free_prealloc_ep(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
157
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1573
while (!OSAL_LIST_IS_EMPTY(&p_hwfn->p_rdma_info->iwarp.ep_free_list)) {
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1574
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1577
&p_hwfn->p_rdma_info->iwarp.ep_free_list,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
158
*cid += ecore_cxt_get_proto_cid_start(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1581
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
159
p_hwfn->p_rdma_info->proto);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1590
&p_hwfn->p_rdma_info->iwarp.ep_free_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1592
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1596
p_hwfn, p_hwfn->p_rdma_info->proto);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1598
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1600
ecore_bmap_release_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1601
&p_hwfn->p_rdma_info->tcp_cid_map,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1604
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1607
ecore_iwarp_destroy_ep(p_hwfn, ep, false);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
161
DP_NOTICE(p_hwfn, false, "Failed in allocating iwarp cid\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1612
ecore_iwarp_prealloc_ep(struct ecore_hwfn *p_hwfn, bool init)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1626
rc = ecore_iwarp_create_ep(p_hwfn, &ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1634
rc = ecore_iwarp_alloc_cid(p_hwfn, &cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1637
ecore_iwarp_set_tcp_cid(p_hwfn, cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1643
ecore_iwarp_alloc_tcp_cid(p_hwfn, &cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1648
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
165
rc = ecore_cxt_dynamic_ilt_alloc(p_hwfn, ECORE_ELEM_CXT, *cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1650
&p_hwfn->p_rdma_info->iwarp.ep_free_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1651
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1657
ecore_iwarp_destroy_ep(p_hwfn, ep, false);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1663
ecore_iwarp_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1668
OSAL_SPIN_LOCK_ALLOC(p_hwfn, &p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1669
OSAL_SPIN_LOCK_ALLOC(p_hwfn, &p_hwfn->p_rdma_info->iwarp.qp_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1671
OSAL_SPIN_LOCK_INIT(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1672
OSAL_SPIN_LOCK_INIT(&p_hwfn->p_rdma_info->iwarp.qp_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1678
rc = ecore_rdma_bmap_alloc(p_hwfn, &p_hwfn->p_rdma_info->tcp_cid_map,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
168
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1682
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1688
OSAL_LIST_INIT(&p_hwfn->p_rdma_info->iwarp.ep_free_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
169
*cid -= ecore_cxt_get_proto_cid_start(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1690
rc = ecore_iwarp_prealloc_ep(p_hwfn, true);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1692
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1697
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
170
p_hwfn->p_rdma_info->proto);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1701
return ecore_ooo_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1705
ecore_iwarp_resc_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1707
struct ecore_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1713
ecore_ooo_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1715
OSAL_FREE(p_hwfn->p_dev, iwarp_info->partial_fpdus);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1717
OSAL_FREE(p_hwfn->p_dev, iwarp_info->mpa_bufs);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1719
OSAL_FREE(p_hwfn->p_dev, iwarp_info->mpa_intermediate_buf);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
172
ecore_bmap_release_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1721
ecore_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->tcp_cid_map, 1);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1728
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
173
&p_hwfn->p_rdma_info->cid_map,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1735
DP_ERR(p_hwfn, "Ep Context receive in accept is NULL\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1739
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "QP(0x%x) EP(0x%x)\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1744
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1754
ecore_iwarp_prealloc_ep(p_hwfn, false);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1756
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1759
ecore_iwarp_return_ep(p_hwfn, iparams->qp->ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
176
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1762
ecore_iwarp_move_to_ep_list(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1763
&p_hwfn->p_rdma_info->iwarp.ep_list,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1791
ecore_iwarp_mpa_v2_set_private(p_hwfn, ep, &mpa_data_size);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1802
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1806
ecore_iwarp_return_ep(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1810
rc = ecore_iwarp_mpa_offload(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1812
ecore_iwarp_modify_qp(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1825
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
183
ecore_iwarp_set_tcp_cid(struct ecore_hwfn *p_hwfn, u32 cid)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1832
DP_ERR(p_hwfn, "Ep Context receive in reject is NULL\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1836
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "EP(0x%x)\n", ep->tcp_cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1841
ecore_iwarp_mpa_v2_set_private(p_hwfn, ep, &mpa_data_size);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
185
cid -= ecore_cxt_get_proto_cid_start(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1852
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1856
ecore_iwarp_return_ep(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
186
p_hwfn->p_rdma_info->proto);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1860
rc = ecore_iwarp_mpa_offload(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1865
ecore_iwarp_print_cm_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1868
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "ip_version = %d\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1870
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "remote_ip %x.%x.%x.%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1875
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "local_ip %x.%x.%x.%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
188
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1880
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "remote_port = %x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1882
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "local_port = %x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1884
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "vlan = %x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1886
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "private_data_len = %x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1888
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "ord = %d\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
189
ecore_bmap_set_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1890
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "ird = %d\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1895
ecore_iwarp_ll2_post_rx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
190
&p_hwfn->p_rdma_info->tcp_cid_map,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1902
p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1909
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1913
p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1917
OSAL_FREE(p_hwfn->p_dev, buf);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
192
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1924
ecore_iwarp_ep_exists(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1949
DP_NOTICE(p_hwfn, false, "SYN received on active connection - dropping\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1950
ecore_iwarp_print_cm_info(p_hwfn, cm_info);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1959
ecore_iwarp_get_listener(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1966
ecore_iwarp_print_cm_info(p_hwfn, cm_info);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1969
&p_hwfn->p_rdma_info->iwarp.listen_list,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1993
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "listener found = %p\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
1997
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "listener not found\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2002
ecore_iwarp_parse_rx_pkt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
201
ecore_iwarp_alloc_tcp_cid(struct ecore_hwfn *p_hwfn, u32 *cid)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2039
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "eth_type =%d Source mac: [0x%x]:[0x%x]:[0x%x]:[0x%x]:[0x%x]:[0x%x]\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2044
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "eth_hlen=%d destination mac: [0x%x]:[0x%x]:[0x%x]:[0x%x]:[0x%x]:[0x%x]\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
205
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2053
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
207
rc = ecore_rdma_bmap_alloc_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2070
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
208
&p_hwfn->p_rdma_info->tcp_cid_map,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2087
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2095
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2104
ecore_iwarp_print_cm_info(p_hwfn, cm_info);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
211
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2112
ecore_iwarp_get_curr_fpdu(struct ecore_hwfn *p_hwfn, u16 cid)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2114
struct ecore_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2116
u32 idx = cid - ecore_cxt_get_proto_cid_start(p_hwfn, PROTOCOLID_IWARP);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2119
DP_ERR(p_hwfn, "Invalid cid %x max_num_partial_fpdus=%x\n", cid,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
213
*cid += ecore_cxt_get_proto_cid_start(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
214
p_hwfn->p_rdma_info->proto);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2157
ecore_iwarp_recycle_pkt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
216
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2162
ecore_iwarp_mpa_classify(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
218
p_hwfn->p_rdma_info->tcp_cid_map.max_count);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2193
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2224
ecore_iwarp_copy_fpdu(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2231
u8 *tmp_buf = p_hwfn->p_rdma_info->iwarp.mpa_intermediate_buf;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2241
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2248
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2259
rc = ecore_iwarp_recycle_pkt(p_hwfn, fpdu, fpdu->mpa_buf);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2278
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2287
ecore_iwarp_update_fpdu_length(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
230
static void ecore_iwarp_cid_cleaned(struct ecore_hwfn *p_hwfn, u32 cid)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2300
DP_VERBOSE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
232
cid -= ecore_cxt_get_proto_cid_start(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2322
ecore_iwarp_recycle_pkt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
233
p_hwfn->p_rdma_info->proto);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2339
ll2_handle = p_hwfn->p_rdma_info->iwarp.ll2_mpa_handle;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2341
rc = ecore_ll2_prepare_tx_packet(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2345
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
235
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2351
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2358
ecore_iwarp_win_right_edge(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2378
ll2_handle = p_hwfn->p_rdma_info->iwarp.ll2_mpa_handle;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
238
ecore_bmap_release_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2380
rc = ecore_ll2_prepare_tx_packet(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2384
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
239
&p_hwfn->p_rdma_info->tcp_cid_map,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2390
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2397
ecore_iwarp_send_fpdu(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
242
ecore_bmap_release_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
243
&p_hwfn->p_rdma_info->cid_map,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2434
ll2_handle = p_hwfn->p_rdma_info->iwarp.ll2_mpa_handle;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2436
rc = ecore_ll2_prepare_tx_packet(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2442
rc = ecore_ll2_set_fragment_of_tx_packet(p_hwfn, ll2_handle,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2450
p_hwfn, ll2_handle,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2459
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
247
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2471
ecore_iwarp_mpa_get_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2485
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2493
ecore_iwarp_mpa_print_tcp_seq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2505
if ((p_hwfn->dp_level > ECORE_LEVEL_VERBOSE) ||
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2506
!(p_hwfn->dp_module & ECORE_MSG_RDMA))
sys/dev/qlnx/qlnxe/ecore_iwarp.c
251
ecore_iwarp_create_qp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2527
DP_ERR(p_hwfn, "Unexpected ethertype on ll2 %x\n", eth_type);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2533
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Processing MPA PKT: tcp_seq=0x%x tcp_ack_seq=0x%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2536
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "eth_type =%d Source mac: [0x%x]:[0x%x]:[0x%x]:[0x%x]:[0x%x]:[0x%x]\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2541
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "eth_hlen=%d destination mac: [0x%x]:[0x%x]:[0x%x]:[0x%x]:[0x%x]:[0x%x]\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2554
ecore_iwarp_process_mpa_pkt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2565
p_hwfn, (u8 *)(buf->data) + mpa_buf->placement_offset);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2567
fpdu = ecore_iwarp_get_curr_fpdu(p_hwfn, curr_pkt->cid & 0xffff);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2569
DP_ERR(p_hwfn, "Invalid cid, drop and post back to rx cid=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2572
p_hwfn, buf, p_hwfn->p_rdma_info->iwarp.ll2_mpa_handle);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2575
DP_ERR(p_hwfn, "Post rx buffer failed\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2588
pkt_type = ecore_iwarp_mpa_classify(p_hwfn, fpdu,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2604
rc = ecore_iwarp_win_right_edge(p_hwfn, fpdu);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2607
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2617
DP_ERR(p_hwfn, "SUSPICIOUS fpdu_length = 0x%x: assuming bug...aborting this packet...\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2628
rc = ecore_iwarp_send_fpdu(p_hwfn, fpdu, curr_pkt, buf,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
263
OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2632
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2641
ecore_iwarp_update_fpdu_length(p_hwfn, fpdu, mpa_data);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2647
rc = ecore_iwarp_win_right_edge(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2655
p_hwfn, fpdu, curr_pkt,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2667
rc = ecore_iwarp_send_fpdu(p_hwfn, fpdu, curr_pkt, buf,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
267
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2671
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2691
ecore_iwarp_process_pending_pkts(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2693
struct ecore_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2703
rc = ecore_iwarp_process_mpa_pkt(p_hwfn, mpa_buf);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2723
DP_NOTICE(p_hwfn, false, "process pkts failed rc=%d\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2734
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2735
struct ecore_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2744
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2750
DP_ERR(p_hwfn, "no free mpa buf. this is a driver bug.\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2755
ecore_iwarp_mpa_get_data(p_hwfn, &mpa_buf->data,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2767
ecore_iwarp_process_pending_pkts(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2773
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2792
DP_NOTICE(p_hwfn, false, "Error received on SYN packet: 0x%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2801
DP_NOTICE(p_hwfn, false, "Syn packet received with checksum error\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2806
p_hwfn, &cm_info, (u8 *)(buf->data) + data->u.placement_offset,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
281
rc = ecore_iwarp_alloc_cid(p_hwfn, &cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2813
listener = ecore_iwarp_get_listener(p_hwfn, &cm_info);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2815
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2830
p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2831
p_hwfn->p_rdma_info->iwarp.ll2_syn_handle,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2835
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2842
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Received syn on listening port\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2851
if (ecore_iwarp_ep_exists(p_hwfn, listener, &cm_info))
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2854
ep = ecore_iwarp_get_free_ep(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2871
if (p_hwfn->p_rdma_info->iwarp.tcp_flags & ECORE_IWARP_TS_EN)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2876
ep->mss = p_hwfn->p_rdma_info->iwarp.max_mtu - hdr_size;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
288
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2889
rc = ecore_iwarp_tcp_offload(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2891
ecore_iwarp_return_ep(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2898
p_hwfn, buf, p_hwfn->p_rdma_info->iwarp.ll2_syn_handle);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2908
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2912
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2917
OSAL_FREE(p_hwfn->p_dev, buffer);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
292
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2928
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2936
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2946
ecore_iwarp_ll2_post_rx(p_hwfn, piggy,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2950
ecore_iwarp_ll2_post_rx(p_hwfn, buffer,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2953
if (connection_handle == p_hwfn->p_rdma_info->iwarp.ll2_mpa_handle)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2954
ecore_iwarp_process_pending_pkts(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2967
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2976
p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2981
OSAL_FREE(p_hwfn->p_dev, buffer->piggy_buf);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2984
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
2989
OSAL_FREE(p_hwfn->p_dev, buffer);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3002
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3006
ecore_iwarp_mpa_get_data(p_hwfn, &unalign_data,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3009
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "(0x%x) Flush fpdu\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3012
fpdu = ecore_iwarp_get_curr_fpdu(p_hwfn, (u16)unalign_data.cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3018
ecore_iwarp_ll2_stop(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3020
struct ecore_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3024
rc = ecore_ll2_terminate_connection(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3027
DP_INFO(p_hwfn, "Failed to terminate syn connection\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3029
ecore_ll2_release_connection(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3035
rc = ecore_ll2_terminate_connection(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3038
DP_INFO(p_hwfn, "Failed to terminate ooo connection\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3040
ecore_ll2_release_connection(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3046
rc = ecore_ll2_terminate_connection(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3049
DP_INFO(p_hwfn, "Failed to terminate mpa connection\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3051
ecore_ll2_release_connection(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3056
ecore_llh_remove_mac_filter(p_hwfn->p_dev, 0,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3057
p_hwfn->p_rdma_info->iwarp.mac_addr);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3063
ecore_iwarp_ll2_alloc_buffers(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3073
buffer = OSAL_ZALLOC(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3076
DP_INFO(p_hwfn, "Failed to allocate LL2 buffer desc\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3081
OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3086
DP_INFO(p_hwfn, "Failed to allocate LL2 buffers\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3087
OSAL_FREE(p_hwfn->p_dev, buffer);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3093
rc = ecore_iwarp_ll2_post_rx(p_hwfn, buffer, ll2_handle);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3109
ecore_iwarp_ll2_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3120
iwarp_info = &p_hwfn->p_rdma_info->iwarp;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3127
OSAL_MEMCPY(p_hwfn->p_rdma_info->iwarp.mac_addr, params->mac_addr,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3130
rc = ecore_llh_add_mac_filter(p_hwfn->p_dev, 0, params->mac_addr);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3139
cbs.cookie = p_hwfn;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3152
rc = ecore_ll2_acquire_connection(p_hwfn, &data);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3154
DP_NOTICE(p_hwfn, false, "Failed to acquire LL2 connection\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3155
ecore_llh_remove_mac_filter(p_hwfn->p_dev, 0, params->mac_addr);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3159
rc = ecore_ll2_establish_connection(p_hwfn, iwarp_info->ll2_syn_handle);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3161
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3166
rc = ecore_iwarp_ll2_alloc_buffers(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3185
p_hwfn->p_rdma_info->iwarp.num_ooo_rx_bufs = data.input.rx_num_desc;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3191
rc = ecore_ll2_acquire_connection(p_hwfn, &data);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3195
rc = ecore_ll2_establish_connection(p_hwfn, iwarp_info->ll2_ooo_handle);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3216
rc = ecore_ll2_acquire_connection(p_hwfn, &data);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3220
rc = ecore_ll2_establish_connection(p_hwfn, iwarp_info->ll2_mpa_handle);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3225
rc = ecore_iwarp_ll2_alloc_buffers(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3233
OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3235
(u16)p_hwfn->p_rdma_info->num_qps);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3238
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3243
iwarp_info->max_num_partial_fpdus = (u16)p_hwfn->p_rdma_info->num_qps;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3251
OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3256
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3264
OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, mpa_buff_size);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3266
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3282
ecore_iwarp_ll2_stop(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3288
ecore_iwarp_set_defaults(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3297
if (ecore_device_num_ports(p_hwfn->p_dev) == 4) {
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3298
rcv_wnd_size = ECORE_IS_AH(p_hwfn->p_dev) ?
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3302
rcv_wnd_size = ECORE_IS_AH(p_hwfn->p_dev) ?
sys/dev/qlnx/qlnxe/ecore_iwarp.c
332
OSAL_CPU_TO_LE32((p_hwfn->hw_info.opaque_fid << 16) |
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3320
ecore_iwarp_setup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3327
iwarp_info = &(p_hwfn->p_rdma_info->iwarp);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3330
ecore_iwarp_set_defaults(p_hwfn, params);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
335
OSAL_CPU_TO_LE32((p_hwfn->hw_info.opaque_fid << 16) |
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3368
OSAL_LIST_INIT(&p_hwfn->p_rdma_info->iwarp.ep_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3369
OSAL_LIST_INIT(&p_hwfn->p_rdma_info->iwarp.listen_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3371
ecore_spq_register_async_cb(p_hwfn, PROTOCOLID_IWARP,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3373
ecore_ooo_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3375
rc = ecore_iwarp_ll2_start(p_hwfn, params);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3377
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3387
ecore_iwarp_stop(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3391
ecore_iwarp_free_prealloc_ep(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3392
rc = ecore_iwarp_wait_for_all_cids(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3396
ecore_spq_unregister_async_cb(p_hwfn, PROTOCOLID_IWARP);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3398
return ecore_iwarp_ll2_stop(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
340
physical_queue = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3402
ecore_iwarp_qp_in_error(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3408
ecore_iwarp_modify_qp(p_hwfn, ep->qp, ECORE_IWARP_QP_STATE_ERROR, true);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3417
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3419
&p_hwfn->p_rdma_info->iwarp.ep_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
342
physical_queue = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_ACK);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3420
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3426
ecore_iwarp_exception_received(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3433
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "EP(0x%x) fw_ret_code=%d\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
345
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3484
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3497
ecore_iwarp_tcp_connect_unsuccessful(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3511
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3518
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3525
DP_NOTICE(p_hwfn, false, "%s(0x%x) TCP timeout\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
353
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3531
DP_NOTICE(p_hwfn, false, "%s(0x%x) MPA not supported VER\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3537
DP_NOTICE(p_hwfn, false, "%s(0x%x) MPA Invalid Packet\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3542
DP_ERR(p_hwfn, "%s(0x%x) Unexpected return code tcp connect: %d\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3551
ecore_iwarp_return_ep(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3554
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3556
&p_hwfn->p_rdma_info->iwarp.ep_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3557
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3562
ecore_iwarp_connect_complete(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3569
p_hwfn, ep->syn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3570
p_hwfn->p_rdma_info->iwarp.ll2_syn_handle);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3579
ecore_iwarp_mpa_received(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3581
ecore_iwarp_tcp_connect_unsuccessful(p_hwfn, ep,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3586
ecore_iwarp_mpa_offload(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3588
ecore_iwarp_tcp_connect_unsuccessful(p_hwfn, ep,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3594
ecore_iwarp_check_ep_ok(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3598
DP_ERR(p_hwfn, "ERROR ON ASYNC ep=%p\n", ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3603
DP_ERR(p_hwfn, "ERROR ON ASYNC ep=%p\n", ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3611
ecore_iwarp_async_event(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
362
ecore_iwarp_modify_fw(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3627
if (!ecore_iwarp_check_ep_ok(p_hwfn, ep))
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3629
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3632
ecore_iwarp_connect_complete(p_hwfn, ep, fw_return_code);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3635
if (!ecore_iwarp_check_ep_ok(p_hwfn, ep))
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3637
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3640
ecore_iwarp_exception_received(p_hwfn, ep, fw_return_code);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3644
if (!ecore_iwarp_check_ep_ok(p_hwfn, ep))
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3646
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3649
ecore_iwarp_qp_in_error(p_hwfn, ep, fw_return_code);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3653
if (!ecore_iwarp_check_ep_ok(p_hwfn, ep))
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3655
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3658
ecore_iwarp_mpa_reply_arrived(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3662
if (!ecore_iwarp_check_ep_ok(p_hwfn, ep))
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3664
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3667
ecore_iwarp_mpa_complete(p_hwfn, ep, fw_return_code);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3671
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3674
ecore_iwarp_cid_cleaned(p_hwfn, cid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3678
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3681
p_hwfn->p_rdma_info->events.affiliated_event(
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3682
p_hwfn->p_rdma_info->events.context,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3687
DP_ERR(p_hwfn, "Received unexpected async iwarp event %d\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3699
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3702
listener = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*listener));
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3705
DP_NOTICE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3726
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3728
&p_hwfn->p_rdma_info->iwarp.listen_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3729
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
373
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3731
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "callback=%p handle=%p ip=%x:%x:%x:%x port=0x%x vlan=0x%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3757
ecore_iwarp_tcp_abort_comp(struct ecore_hwfn *p_hwfn, void *cookie,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
376
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3764
ecore_iwarp_return_ep(p_hwfn, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3771
ecore_iwarp_abort_inflight_connections(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
378
p_hwfn->p_rdma_info->proto,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3782
&p_hwfn->p_rdma_info->iwarp.listen_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3789
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3798
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3803
ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3808
ecore_iwarp_listener_state_transition(struct ecore_hwfn *p_hwfn, void *cookie,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3820
ecore_iwarp_abort_inflight_connections(p_hwfn, listener);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3828
ecore_iwarp_empty_ramrod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3838
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3839
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3843
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3850
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3861
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3872
rc = ecore_iwarp_empty_ramrod(p_hwfn, listener);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3876
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "listener=%p, state=%d\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3885
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3891
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "handle=%p\n", handle);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3894
rc = ecore_iwarp_empty_ramrod(p_hwfn, listener);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3899
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3903
DP_NOTICE(p_hwfn, false, "ep list close timeout\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3908
OSAL_FREE(p_hwfn->p_dev, listener);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
391
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3916
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3925
DP_ERR(p_hwfn, "Ep Context receive in send_rtr is NULL\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
393
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "QP(0x%x)rc=%d\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3931
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "QP(0x%x) EP(0x%x)\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3936
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3939
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3946
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
3948
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "ecore_iwarp_send_rtr, rc = 0x%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
446
ecore_iwarp_modify_qp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
458
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->iwarp.qp_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
462
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.qp_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
519
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "QP(0x%x) %s --> %s %s\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
525
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.qp_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
528
ecore_iwarp_modify_fw(p_hwfn, qp);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
534
ecore_iwarp_fw_destroy(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
544
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
547
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
549
p_hwfn->p_rdma_info->proto,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
554
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
556
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "QP(0x%x) rc = %d\n", qp->icid, rc);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
561
static void ecore_iwarp_destroy_ep(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
565
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
571
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
574
&p_hwfn->p_rdma_info->iwarp.ep_list);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
576
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->iwarp.iw_lock);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
582
OSAL_FREE(p_hwfn->p_dev, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
586
ecore_iwarp_destroy_qp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
594
fpdu = ecore_iwarp_get_curr_fpdu(p_hwfn, qp->icid);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
596
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
601
rc = ecore_iwarp_modify_qp(p_hwfn, qp,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
612
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
618
DP_NOTICE(p_hwfn, false, "ep state close timeout state=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
624
ecore_iwarp_destroy_ep(p_hwfn, ep, false);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
627
rc = ecore_iwarp_fw_destroy(p_hwfn, qp);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
630
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
639
ecore_iwarp_create_ep(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
645
ep = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*ep));
sys/dev/qlnx/qlnxe/ecore_iwarp.c
647
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
662
p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
667
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
681
OSAL_FREE(p_hwfn->p_dev, ep);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
686
ecore_iwarp_print_tcp_ramrod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
689
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, ">>> PRINT TCP RAMROD\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
691
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "local_mac=%x %x %x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
696
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "remote_mac=%x %x %x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
701
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "vlan_id=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
703
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "flags=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
706
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "ip_version=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
708
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "local_ip=%x.%x.%x.%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
713
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "remote_ip=%x.%x.%x.%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
718
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "flow_label=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
720
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "ttl=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
722
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "tos_or_tc=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
724
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "local_port=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
726
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "remote_port=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
728
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "mss=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
730
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "rcv_wnd_scale=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
732
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "connect_mode=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
734
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "syn_ip_payload_length=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
736
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "syn_phy_addr_lo=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
738
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "syn_phy_addr_hi=%x\n",
sys/dev/qlnx/qlnxe/ecore_iwarp.c
741
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "<<<f PRINT TCP RAMROD\n");
sys/dev/qlnx/qlnxe/ecore_iwarp.c
752
ecore_iwarp_tcp_offload(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
755
struct ecore_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
768
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
776
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
804
physical_q = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
806
physical_q = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_ACK);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
821
tcp_flags = p_hwfn->p_rdma_info->iwarp.tcp_flags;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
855
(u8)p_hwfn->p_rdma_info->iwarp.rcv_wnd_scale;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
867
ecore_iwarp_print_tcp_ramrod(p_hwfn, p_tcp_ramrod);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
869
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
871
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
881
ecore_iwarp_mpa_offload(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
89
ecore_iwarp_async_event(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
903
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
910
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
926
p_mpa_ramrod->common.crc_needed = p_hwfn->p_rdma_info->iwarp.crc_needed;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
931
p_mpa_ramrod->tcp_cid = p_hwfn->hw_info.opaque_fid << 16 | ep->tcp_cid;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
958
RESC_START(p_hwfn, ECORE_RDMA_STATS_QUEUE) +
sys/dev/qlnx/qlnxe/ecore_iwarp.c
96
ecore_iwarp_empty_ramrod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
964
iwarp_info = &p_hwfn->p_rdma_info->iwarp;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
972
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_iwarp.c
976
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
984
ecore_iwarp_mpa_received(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.c
987
struct ecore_iwarp_info *iwarp_info = &p_hwfn->p_rdma_info->iwarp;
sys/dev/qlnx/qlnxe/ecore_iwarp.c
998
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
211
ecore_iwarp_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.h
214
ecore_iwarp_setup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
218
ecore_iwarp_init_fw_ramrod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
222
ecore_iwarp_stop(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.h
225
ecore_iwarp_resc_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.h
228
ecore_iwarp_init_devinfo(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_iwarp.h
231
ecore_iwarp_init_hw(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt);
sys/dev/qlnx/qlnxe/ecore_iwarp.h
234
ecore_iwarp_create_qp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
239
ecore_iwarp_modify_qp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
245
ecore_iwarp_destroy_qp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
249
ecore_iwarp_fw_destroy(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
259
ecore_iwarp_alloc(struct ecore_hwfn OSAL_UNUSED *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.h
265
ecore_iwarp_setup(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
272
ecore_iwarp_init_fw_ramrod(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
278
ecore_iwarp_stop(struct ecore_hwfn OSAL_UNUSED *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.h
284
ecore_iwarp_resc_free(struct ecore_hwfn OSAL_UNUSED *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.h
289
ecore_iwarp_init_devinfo(struct ecore_hwfn OSAL_UNUSED *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_iwarp.h
294
ecore_iwarp_init_hw(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
301
ecore_iwarp_create_qp(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
309
ecore_iwarp_modify_qp(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
318
ecore_iwarp_destroy_qp(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_iwarp.h
325
ecore_iwarp_fw_destroy(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1000
__internal_ram_wr(p_hwfn, *pp_prod, sizeof(u32),
sys/dev/qlnx/qlnxe/ecore_l2.c
1003
return ecore_eth_rxq_start_ramrod(p_hwfn, p_cid,
sys/dev/qlnx/qlnxe/ecore_l2.c
1010
ecore_eth_rx_queue_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1023
p_cid = ecore_eth_queue_to_cid_pf(p_hwfn, opaque_fid, true, p_params);
sys/dev/qlnx/qlnxe/ecore_l2.c
1027
if (IS_PF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_l2.c
1028
rc = ecore_eth_pf_rx_queue_start(p_hwfn, p_cid,
sys/dev/qlnx/qlnxe/ecore_l2.c
103
pp_qids[i] = OSAL_VZALLOC(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_l2.c
1034
rc = ecore_vf_pf_rxq_start(p_hwfn, p_cid,
sys/dev/qlnx/qlnxe/ecore_l2.c
1043
ecore_eth_queue_cid_release(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_l2.c
1050
enum _ecore_status_t ecore_sp_eth_rx_queues_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1066
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_l2.c
1067
return ecore_vf_pf_rxqs_update(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1086
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
1099
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
110
if (OSAL_MUTEX_ALLOC(p_hwfn, &p_l2_info->lock))
sys/dev/qlnx/qlnxe/ecore_l2.c
1108
ecore_sp_eth_rx_queues_set_default(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1119
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_l2.c
1132
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
1146
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
1152
ecore_eth_pf_rx_queue_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1167
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
117
void ecore_l2_setup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_l2.c
1186
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
1189
enum _ecore_status_t ecore_eth_rx_queue_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
119
if (!ECORE_IS_L2_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_l2.c
1197
if (IS_PF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_l2.c
1198
rc = ecore_eth_pf_rx_queue_stop(p_hwfn, p_cid,
sys/dev/qlnx/qlnxe/ecore_l2.c
1202
rc = ecore_vf_pf_rxq_stop(p_hwfn, p_cid, cqe_completion);
sys/dev/qlnx/qlnxe/ecore_l2.c
1205
ecore_eth_queue_cid_release(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_l2.c
1210
ecore_eth_txq_start_ramrod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
122
OSAL_MUTEX_INIT(&p_hwfn->p_l2_info->lock);
sys/dev/qlnx/qlnxe/ecore_l2.c
1226
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
1247
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
125
void ecore_l2_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_l2.c
1251
ecore_eth_pf_tx_queue_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1260
rc = ecore_eth_txq_start_ramrod(p_hwfn, p_cid,
sys/dev/qlnx/qlnxe/ecore_l2.c
1262
ecore_get_cm_pq_idx_mcos(p_hwfn, tc));
sys/dev/qlnx/qlnxe/ecore_l2.c
1268
p_hwfn->doorbells +
sys/dev/qlnx/qlnxe/ecore_l2.c
1275
ecore_eth_tx_queue_start(struct ecore_hwfn *p_hwfn, u16 opaque_fid,
sys/dev/qlnx/qlnxe/ecore_l2.c
1284
p_cid = ecore_eth_queue_to_cid_pf(p_hwfn, opaque_fid, false, p_params);
sys/dev/qlnx/qlnxe/ecore_l2.c
1288
if (IS_PF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_l2.c
1289
rc = ecore_eth_pf_tx_queue_start(p_hwfn, p_cid, tc,
sys/dev/qlnx/qlnxe/ecore_l2.c
129
if (!ECORE_IS_L2_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_l2.c
1293
rc = ecore_vf_pf_txq_start(p_hwfn, p_cid,
sys/dev/qlnx/qlnxe/ecore_l2.c
1298
ecore_eth_queue_cid_release(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_l2.c
1306
ecore_eth_pf_tx_queue_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1318
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
132
if (p_hwfn->p_l2_info == OSAL_NULL)
sys/dev/qlnx/qlnxe/ecore_l2.c
1324
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
1327
enum _ecore_status_t ecore_eth_tx_queue_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1333
if (IS_PF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_l2.c
1334
rc = ecore_eth_pf_tx_queue_stop(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_l2.c
1336
rc = ecore_vf_pf_txq_stop(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_l2.c
1339
ecore_eth_queue_cid_release(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_l2.c
135
if (p_hwfn->p_l2_info->pp_qid_usage == OSAL_NULL)
sys/dev/qlnx/qlnxe/ecore_l2.c
1365
ecore_filter_ucast_common(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1381
rc = ecore_fw_vport(p_hwfn, p_filter_cmd->vport_to_remove_from,
sys/dev/qlnx/qlnxe/ecore_l2.c
1386
rc = ecore_fw_vport(p_hwfn, p_filter_cmd->vport_to_add_to,
sys/dev/qlnx/qlnxe/ecore_l2.c
139
for (i = 0; i < p_hwfn->p_l2_info->queues; i++) {
sys/dev/qlnx/qlnxe/ecore_l2.c
1393
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.c
1398
rc = ecore_sp_init_request(p_hwfn, pp_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
140
if (p_hwfn->p_l2_info->pp_qid_usage[i] == OSAL_NULL)
sys/dev/qlnx/qlnxe/ecore_l2.c
1410
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
1411
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_l2.c
142
OSAL_VFREE(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_l2.c
143
p_hwfn->p_l2_info->pp_qid_usage[i]);
sys/dev/qlnx/qlnxe/ecore_l2.c
144
p_hwfn->p_l2_info->pp_qid_usage[i] = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_l2.c
149
if (i == p_hwfn->p_l2_info->queues)
sys/dev/qlnx/qlnxe/ecore_l2.c
1497
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_l2.c
150
OSAL_MUTEX_DEALLOC(&p_hwfn->p_l2_info->lock);
sys/dev/qlnx/qlnxe/ecore_l2.c
1512
enum _ecore_status_t ecore_sp_eth_filter_ucast(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1523
rc = ecore_filter_ucast_common(p_hwfn, opaque_fid, p_filter_cmd,
sys/dev/qlnx/qlnxe/ecore_l2.c
1527
DP_ERR(p_hwfn, "Uni. filter command failed %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_l2.c
153
OSAL_VFREE(p_hwfn->p_dev, p_hwfn->p_l2_info->pp_qid_usage);
sys/dev/qlnx/qlnxe/ecore_l2.c
1533
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
1535
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
154
p_hwfn->p_l2_info->pp_qid_usage = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_l2.c
1541
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_l2.c
1554
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_l2.c
157
OSAL_VFREE(p_hwfn->p_dev, p_hwfn->p_l2_info);
sys/dev/qlnx/qlnxe/ecore_l2.c
158
p_hwfn->p_l2_info = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_l2.c
1614
ecore_sp_eth_filter_mcast(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
162
static bool ecore_eth_queue_qid_usage_add(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1627
rc = ecore_fw_vport(p_hwfn, p_filter_cmd->vport_to_add_to,
sys/dev/qlnx/qlnxe/ecore_l2.c
1630
rc = ecore_fw_vport(p_hwfn, p_filter_cmd->vport_to_remove_from,
sys/dev/qlnx/qlnxe/ecore_l2.c
1637
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.c
1638
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_l2.c
1642
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
1646
DP_ERR(p_hwfn, "Multi-cast command failed %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_l2.c
165
struct ecore_l2_info *p_l2_info = p_hwfn->p_l2_info;
sys/dev/qlnx/qlnxe/ecore_l2.c
1674
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
1676
DP_INFO(p_hwfn, "Multicast filter cmd: [%s], bins: [%08x, %08x, %08x, %08x, %08x, %08x, %08x, %08x], ret = %d\n",
sys/dev/qlnx/qlnxe/ecore_l2.c
1684
DP_ERR(p_hwfn, "Multicast filter command failed %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_l2.c
1704
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_l2.c
1707
ecore_vf_pf_filter_mcast(p_hwfn, p_filter_cmd);
sys/dev/qlnx/qlnxe/ecore_l2.c
1711
rc = ecore_sp_eth_filter_mcast(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
173
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_l2.c
1731
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_l2.c
1735
rc = ecore_vf_pf_filter_ucast(p_hwfn, p_filter_cmd);
sys/dev/qlnx/qlnxe/ecore_l2.c
1739
opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_l2.c
1740
rc = ecore_sp_eth_filter_ucast(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1753
static void __ecore_get_vport_pstats_addrlen(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1757
if (IS_PF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
1762
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_l2.c
1770
static void __ecore_get_vport_pstats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1778
__ecore_get_vport_pstats_addrlen(p_hwfn, &pstats_addr, &pstats_len,
sys/dev/qlnx/qlnxe/ecore_l2.c
1782
ecore_memcpy_from(p_hwfn, p_ptt, &pstats,
sys/dev/qlnx/qlnxe/ecore_l2.c
1801
static void __ecore_get_vport_tstats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1808
if (IS_PF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
1810
TSTORM_PORT_STAT_OFFSET(MFW_PORT(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_l2.c
1813
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_l2.c
1821
ecore_memcpy_from(p_hwfn, p_ptt, &tstats,
sys/dev/qlnx/qlnxe/ecore_l2.c
1830
static void __ecore_get_vport_ustats_addrlen(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1834
if (IS_PF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
1839
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_l2.c
1847
static void __ecore_get_vport_ustats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1855
__ecore_get_vport_ustats_addrlen(p_hwfn, &ustats_addr, &ustats_len,
sys/dev/qlnx/qlnxe/ecore_l2.c
1859
ecore_memcpy_from(p_hwfn, p_ptt, &ustats,
sys/dev/qlnx/qlnxe/ecore_l2.c
1876
static void __ecore_get_vport_mstats_addrlen(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1880
if (IS_PF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
1885
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_l2.c
1893
static void __ecore_get_vport_mstats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1901
__ecore_get_vport_mstats_addrlen(p_hwfn, &mstats_addr, &mstats_len,
sys/dev/qlnx/qlnxe/ecore_l2.c
1905
ecore_memcpy_from(p_hwfn, p_ptt, &mstats,
sys/dev/qlnx/qlnxe/ecore_l2.c
1924
static void __ecore_get_vport_port_stats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1934
ecore_memcpy_from(p_hwfn, p_ptt, &port_stats,
sys/dev/qlnx/qlnxe/ecore_l2.c
1935
p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_l2.c
195
static void ecore_eth_queue_qid_usage_del(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
1978
if (ECORE_IS_BB(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
198
OSAL_MUTEX_ACQUIRE(&p_hwfn->p_l2_info->lock);
sys/dev/qlnx/qlnxe/ecore_l2.c
201
p_hwfn->p_l2_info->pp_qid_usage[p_cid->rel.queue_id]);
sys/dev/qlnx/qlnxe/ecore_l2.c
2010
p_common->link_change_count = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_l2.c
2011
p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_l2.c
2016
void __ecore_get_vport_stats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
2021
__ecore_get_vport_mstats(p_hwfn, p_ptt, stats, statistics_bin);
sys/dev/qlnx/qlnxe/ecore_l2.c
2022
__ecore_get_vport_ustats(p_hwfn, p_ptt, stats, statistics_bin);
sys/dev/qlnx/qlnxe/ecore_l2.c
2023
__ecore_get_vport_tstats(p_hwfn, p_ptt, stats);
sys/dev/qlnx/qlnxe/ecore_l2.c
2024
__ecore_get_vport_pstats(p_hwfn, p_ptt, stats, statistics_bin);
sys/dev/qlnx/qlnxe/ecore_l2.c
2028
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_l2.c
203
OSAL_MUTEX_RELEASE(&p_hwfn->p_l2_info->lock);
sys/dev/qlnx/qlnxe/ecore_l2.c
2032
if (b_get_port_stats && p_hwfn->mcp_info)
sys/dev/qlnx/qlnxe/ecore_l2.c
2033
__ecore_get_vport_port_stats(p_hwfn, p_ptt, stats);
sys/dev/qlnx/qlnxe/ecore_l2.c
2045
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_l2.c
2047
ecore_ptt_acquire(p_hwfn) : OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_l2.c
2052
if (ecore_fw_vport(p_hwfn, 0, &fw_vport)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
2053
DP_ERR(p_hwfn, "No vport available!\n");
sys/dev/qlnx/qlnxe/ecore_l2.c
2059
DP_ERR(p_hwfn, "Failed to acquire ptt\n");
sys/dev/qlnx/qlnxe/ecore_l2.c
206
void ecore_eth_queue_cid_release(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
2063
b_get_port_stats = IS_PF(p_dev) && IS_LEAD_HWFN(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.c
2064
__ecore_get_vport_stats(p_hwfn, p_ptt, stats, fw_vport,
sys/dev/qlnx/qlnxe/ecore_l2.c
2069
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_l2.c
2099
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_l2.c
2104
ecore_ptt_acquire(p_hwfn) : OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_l2.c
2108
DP_ERR(p_hwfn, "Failed to acquire ptt\n");
sys/dev/qlnx/qlnxe/ecore_l2.c
2113
__ecore_get_vport_mstats_addrlen(p_hwfn, &addr, &len, 0);
sys/dev/qlnx/qlnxe/ecore_l2.c
2114
ecore_memcpy_to(p_hwfn, p_ptt, addr, &mstats, len);
sys/dev/qlnx/qlnxe/ecore_l2.c
2117
__ecore_get_vport_ustats_addrlen(p_hwfn, &addr, &len, 0);
sys/dev/qlnx/qlnxe/ecore_l2.c
2118
ecore_memcpy_to(p_hwfn, p_ptt, addr, &ustats, len);
sys/dev/qlnx/qlnxe/ecore_l2.c
2121
__ecore_get_vport_pstats_addrlen(p_hwfn, &addr, &len, 0);
sys/dev/qlnx/qlnxe/ecore_l2.c
2122
ecore_memcpy_to(p_hwfn, p_ptt, addr, &pstats, len);
sys/dev/qlnx/qlnxe/ecore_l2.c
2125
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_l2.c
215
if (IS_PF(p_hwfn->p_dev) && !b_legacy_vf)
sys/dev/qlnx/qlnxe/ecore_l2.c
2150
void ecore_arfs_mode_configure(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
2154
if (OSAL_TEST_BIT(ECORE_MF_DISABLE_ARFS, &p_hwfn->p_dev->mf_bits))
sys/dev/qlnx/qlnxe/ecore_l2.c
2158
ecore_gft_config(p_hwfn, p_ptt, p_hwfn->rel_pf_id,
sys/dev/qlnx/qlnxe/ecore_l2.c
216
_ecore_cxt_release_cid(p_hwfn, p_cid->cid, p_cid->vfid);
sys/dev/qlnx/qlnxe/ecore_l2.c
2164
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_l2.c
2172
DP_VERBOSE(p_hwfn, ECORE_MSG_SP, "Disabled Filtering\n");
sys/dev/qlnx/qlnxe/ecore_l2.c
2173
ecore_gft_disable(p_hwfn, p_ptt, p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_l2.c
2178
ecore_configure_rfs_ntuple_filter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
2189
rc = ecore_fw_vport(p_hwfn, p_params->vport_id, &abs_vport_id);
sys/dev/qlnx/qlnxe/ecore_l2.c
2194
rc = ecore_fw_l2_queue(p_hwfn, p_params->qid, &abs_rx_q_id);
sys/dev/qlnx/qlnxe/ecore_l2.c
220
ecore_eth_queue_qid_usage_del(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_l2.c
2201
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.c
2203
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_l2.c
2212
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
222
OSAL_VFREE(p_hwfn->p_dev, p_cid);
sys/dev/qlnx/qlnxe/ecore_l2.c
2235
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_l2.c
2241
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
2245
ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
2255
rc = ecore_dmae_grc2host(p_hwfn, p_ptt, CAU_REG_SB_VAR_MEMORY +
sys/dev/qlnx/qlnxe/ecore_l2.c
2260
DP_ERR(p_hwfn, "dmae_grc2host failed %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_l2.c
2268
coalesce = ecore_rd(p_hwfn, p_ptt, address);
sys/dev/qlnx/qlnxe/ecore_l2.c
2281
ecore_get_txq_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
229
_ecore_eth_queue_to_cid(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
2291
rc = ecore_dmae_grc2host(p_hwfn, p_ptt, CAU_REG_SB_VAR_MEMORY +
sys/dev/qlnx/qlnxe/ecore_l2.c
2296
DP_ERR(p_hwfn, "dmae_grc2host failed %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_l2.c
2304
coalesce = ecore_rd(p_hwfn, p_ptt, address);
sys/dev/qlnx/qlnxe/ecore_l2.c
2317
ecore_get_queue_coalesce(struct ecore_hwfn *p_hwfn, u16 *p_coal,
sys/dev/qlnx/qlnxe/ecore_l2.c
2325
if (IS_VF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
2326
rc = ecore_vf_pf_get_coalesce(p_hwfn, p_coal, p_cid);
sys/dev/qlnx/qlnxe/ecore_l2.c
2328
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_l2.c
2335
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.c
2340
rc = ecore_get_rxq_coalesce(p_hwfn, p_ptt, p_cid, p_coal);
sys/dev/qlnx/qlnxe/ecore_l2.c
2344
rc = ecore_get_txq_coalesce(p_hwfn, p_ptt, p_cid, p_coal);
sys/dev/qlnx/qlnxe/ecore_l2.c
2350
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_l2.c
238
p_cid = OSAL_VZALLOC(p_hwfn->p_dev, sizeof(*p_cid));
sys/dev/qlnx/qlnxe/ecore_l2.c
244
p_cid->p_owner = p_hwfn;
sys/dev/qlnx/qlnxe/ecore_l2.c
264
if (IS_VF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
274
rc = ecore_fw_vport(p_hwfn, p_cid->rel.vport_id, &p_cid->abs.vport_id);
sys/dev/qlnx/qlnxe/ecore_l2.c
278
rc = ecore_fw_l2_queue(p_hwfn, p_cid->rel.queue_id,
sys/dev/qlnx/qlnxe/ecore_l2.c
287
rc = ecore_fw_vport(p_hwfn, p_cid->rel.stats_id,
sys/dev/qlnx/qlnxe/ecore_l2.c
300
if (!ecore_eth_queue_qid_usage_add(p_hwfn, p_cid))
sys/dev/qlnx/qlnxe/ecore_l2.c
306
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_l2.c
318
OSAL_VFREE(p_hwfn->p_dev, p_cid);
sys/dev/qlnx/qlnxe/ecore_l2.c
323
ecore_eth_queue_to_cid(struct ecore_hwfn *p_hwfn, u16 opaque_fid,
sys/dev/qlnx/qlnxe/ecore_l2.c
351
if (IS_PF(p_hwfn->p_dev) && !b_legacy_vf) {
sys/dev/qlnx/qlnxe/ecore_l2.c
352
if (_ecore_cxt_acquire_cid(p_hwfn, PROTOCOLID_ETH,
sys/dev/qlnx/qlnxe/ecore_l2.c
354
DP_NOTICE(p_hwfn, true, "Failed to acquire cid\n");
sys/dev/qlnx/qlnxe/ecore_l2.c
359
p_cid = _ecore_eth_queue_to_cid(p_hwfn, opaque_fid, cid,
sys/dev/qlnx/qlnxe/ecore_l2.c
361
if ((p_cid == OSAL_NULL) && IS_PF(p_hwfn->p_dev) && !b_legacy_vf)
sys/dev/qlnx/qlnxe/ecore_l2.c
362
_ecore_cxt_release_cid(p_hwfn, cid, vfid);
sys/dev/qlnx/qlnxe/ecore_l2.c
368
ecore_eth_queue_to_cid_pf(struct ecore_hwfn *p_hwfn, u16 opaque_fid,
sys/dev/qlnx/qlnxe/ecore_l2.c
372
return ecore_eth_queue_to_cid(p_hwfn, opaque_fid, p_params, b_is_rx,
sys/dev/qlnx/qlnxe/ecore_l2.c
376
enum _ecore_status_t ecore_sp_eth_vport_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
387
rc = ecore_fw_vport(p_hwfn, p_params->vport_id, &abs_vport_id);
sys/dev/qlnx/qlnxe/ecore_l2.c
393
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.c
397
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
466
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_l2.c
476
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
479
enum _ecore_status_t ecore_sp_vport_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
482
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_l2.c
483
return ecore_vf_pf_vport_start(p_hwfn, p_params->vport_id,
sys/dev/qlnx/qlnxe/ecore_l2.c
491
return ecore_sp_eth_vport_start(p_hwfn, p_params);
sys/dev/qlnx/qlnxe/ecore_l2.c
495
ecore_sp_vport_update_rss(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
513
rc = ecore_fw_rss_eng(p_hwfn, p_rss->rss_eng_id,
sys/dev/qlnx/qlnxe/ecore_l2.c
550
DP_VERBOSE(p_hwfn, ECORE_MSG_IFUP,
sys/dev/qlnx/qlnxe/ecore_l2.c
571
DP_VERBOSE(p_hwfn, ECORE_MSG_IFUP,
sys/dev/qlnx/qlnxe/ecore_l2.c
575
DP_VERBOSE(p_hwfn, ECORE_MSG_IFUP,
sys/dev/qlnx/qlnxe/ecore_l2.c
602
ecore_sp_update_accept_mode(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
615
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
616
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_l2.c
646
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_l2.c
670
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_l2.c
70
enum _ecore_status_t ecore_l2_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_l2.c
731
enum _ecore_status_t ecore_sp_vport_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
744
if (IS_VF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
745
rc = ecore_vf_pf_vport_update(p_hwfn, p_params);
sys/dev/qlnx/qlnxe/ecore_l2.c
749
rc = ecore_fw_vport(p_hwfn, p_params->vport_id, &abs_vport_id);
sys/dev/qlnx/qlnxe/ecore_l2.c
755
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.c
76
if (!ECORE_IS_L2_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_l2.c
760
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
79
p_l2_info = OSAL_VZALLOC(p_hwfn->p_dev, sizeof(*p_l2_info));
sys/dev/qlnx/qlnxe/ecore_l2.c
796
if (CHIP_REV_IS_FPGA(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_l2.c
799
DP_NOTICE(p_hwfn, false, "FPGA - why are we seeing tx-switching? Overriding it\n");
sys/dev/qlnx/qlnxe/ecore_l2.c
810
rc = ecore_sp_vport_update_rss(p_hwfn, p_ramrod, p_rss_params);
sys/dev/qlnx/qlnxe/ecore_l2.c
813
ecore_spq_return_entry(p_hwfn, p_ent);
sys/dev/qlnx/qlnxe/ecore_l2.c
82
p_hwfn->p_l2_info = p_l2_info;
sys/dev/qlnx/qlnxe/ecore_l2.c
820
ecore_sp_update_accept_mode(p_hwfn, p_ramrod, p_params->accept_flags);
sys/dev/qlnx/qlnxe/ecore_l2.c
822
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
825
enum _ecore_status_t ecore_sp_vport_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
835
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_l2.c
836
return ecore_vf_pf_vport_stop(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.c
838
rc = ecore_fw_vport(p_hwfn, vport_id, &abs_vport_id);
sys/dev/qlnx/qlnxe/ecore_l2.c
84
if (IS_PF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_l2.c
844
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.c
848
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
85
p_l2_info->queues = RESC_NUM(p_hwfn, ECORE_L2_QUEUE);
sys/dev/qlnx/qlnxe/ecore_l2.c
857
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
861
ecore_vf_pf_accept_flags(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
870
return ecore_vf_pf_vport_update(p_hwfn, &s_params);
sys/dev/qlnx/qlnxe/ecore_l2.c
89
ecore_vf_get_num_rxqs(p_hwfn, &rx);
sys/dev/qlnx/qlnxe/ecore_l2.c
892
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_l2.c
894
vport_update_params.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_l2.c
897
rc = ecore_vf_pf_accept_flags(p_hwfn, &accept_flags);
sys/dev/qlnx/qlnxe/ecore_l2.c
90
ecore_vf_get_num_txqs(p_hwfn, &tx);
sys/dev/qlnx/qlnxe/ecore_l2.c
903
rc = ecore_sp_vport_update(p_hwfn, &vport_update_params,
sys/dev/qlnx/qlnxe/ecore_l2.c
910
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_l2.c
916
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_l2.c
925
ecore_eth_rxq_start_ramrod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
937
DP_VERBOSE(p_hwfn, ECORE_MSG_SP, "opaque_fid=0x%x, cid=0x%x, rx_qzone=0x%x, vport_id=0x%x, sb_id=0x%x\n",
sys/dev/qlnx/qlnxe/ecore_l2.c
947
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_l2.c
95
pp_qids = OSAL_VZALLOC(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_l2.c
974
DP_VERBOSE(p_hwfn, ECORE_MSG_SP, "Queue%s is meant for VF rxq[%02x]\n",
sys/dev/qlnx/qlnxe/ecore_l2.c
980
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_l2.c
984
ecore_eth_pf_rx_queue_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.c
995
p_hwfn->regview +
sys/dev/qlnx/qlnxe/ecore_l2.h
110
enum _ecore_status_t ecore_l2_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.h
111
void ecore_l2_setup(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.h
112
void ecore_l2_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_l2.h
114
void ecore_eth_queue_cid_release(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.h
118
ecore_eth_queue_to_cid(struct ecore_hwfn *p_hwfn, u16 opaque_fid,
sys/dev/qlnx/qlnxe/ecore_l2.h
124
ecore_sp_eth_vport_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.h
140
ecore_eth_rxq_start_ramrod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.h
159
ecore_eth_txq_start_ramrod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.h
166
enum _ecore_status_t ecore_set_rxq_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.h
171
enum _ecore_status_t ecore_set_txq_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.h
176
enum _ecore_status_t ecore_get_rxq_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2.h
181
enum _ecore_status_t ecore_get_txq_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
252
ecore_eth_rx_queue_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
276
ecore_eth_rx_queue_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
298
ecore_eth_tx_queue_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
314
enum _ecore_status_t ecore_eth_tx_queue_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
362
ecore_sp_vport_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
407
ecore_sp_vport_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
423
enum _ecore_status_t ecore_sp_vport_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
428
ecore_sp_eth_filter_ucast(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
454
ecore_sp_eth_rx_queues_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
478
ecore_sp_eth_rx_queues_set_default(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
483
void __ecore_get_vport_stats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
504
void ecore_arfs_mode_configure(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_l2_api.h
544
ecore_configure_rfs_ntuple_filter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1001
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_ll2.c
101
ecore_ll2_handle_sanity_lock(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1012
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1015
static enum _ecore_status_t ecore_sp_ll2_tx_queue_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1023
ecore_db_recovery_del(p_hwfn->p_dev, p_tx->doorbell_addr,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1029
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_ll2.c
1032
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1038
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_ll2.c
104
return __ecore_ll2_handle_sanity(p_hwfn, connection_handle,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1042
ecore_ll2_acquire_connection_rx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1052
rc = ecore_chain_alloc(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1060
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1066
p_descq = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1070
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1076
rc = ecore_chain_alloc(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1084
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1089
DP_VERBOSE(p_hwfn, ECORE_MSG_LL2,
sys/dev/qlnx/qlnxe/ecore_ll2.c
109
ecore_ll2_handle_sanity_inactive(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1099
ecore_ll2_acquire_connection_tx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1110
rc = ecore_chain_alloc(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_ll2.c
112
return __ecore_ll2_handle_sanity(p_hwfn, connection_handle,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1125
p_descq = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1133
DP_VERBOSE(p_hwfn, ECORE_MSG_LL2,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1140
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1147
ecore_ll2_acquire_connection_ooo(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1175
p_buf = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*p_buf));
sys/dev/qlnx/qlnxe/ecore_ll2.c
1177
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1184
p_virt = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1188
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_ll2.c
119
ecore_ll2_get_fragment_of_tx_packet(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1190
OSAL_FREE(p_hwfn->p_dev, p_buf);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1195
ecore_ooo_put_free_buffer(p_hwfn->p_ooo_info, p_buf);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1198
DP_VERBOSE(p_hwfn, ECORE_MSG_LL2,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1246
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_ll2.c
1252
if (!data->p_connection_handle || !p_hwfn->p_ll2_info) {
sys/dev/qlnx/qlnxe/ecore_ll2.c
1253
DP_NOTICE(p_hwfn, false, "Invalid connection handle, ll2_info not allocated\n");
sys/dev/qlnx/qlnxe/ecore_ll2.c
1259
OSAL_MUTEX_ACQUIRE(&p_hwfn->p_ll2_info[i].mutex);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1260
if (p_hwfn->p_ll2_info[i].b_active) {
sys/dev/qlnx/qlnxe/ecore_ll2.c
1261
OSAL_MUTEX_RELEASE(&p_hwfn->p_ll2_info[i].mutex);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1265
p_hwfn->p_ll2_info[i].b_active = true;
sys/dev/qlnx/qlnxe/ecore_ll2.c
1266
p_ll2_info = &p_hwfn->p_ll2_info[i];
sys/dev/qlnx/qlnxe/ecore_ll2.c
1267
OSAL_MUTEX_RELEASE(&p_hwfn->p_ll2_info[i].mutex);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1271
DP_NOTICE(p_hwfn, false, "No available ll2 connection\n");
sys/dev/qlnx/qlnxe/ecore_ll2.c
128
p_ll2_conn = ecore_ll2_handle_sanity(p_hwfn, connection_handle);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1308
DP_NOTICE(p_hwfn, false, "Invalid callback functions\n");
sys/dev/qlnx/qlnxe/ecore_ll2.c
1312
rc = ecore_ll2_acquire_connection_rx(p_hwfn, p_ll2_info);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1314
DP_NOTICE(p_hwfn, false, "ll2 acquire rx connection failed\n");
sys/dev/qlnx/qlnxe/ecore_ll2.c
1318
rc = ecore_ll2_acquire_connection_tx(p_hwfn, p_ll2_info);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1320
DP_NOTICE(p_hwfn, false, "ll2 acquire tx connection failed\n");
sys/dev/qlnx/qlnxe/ecore_ll2.c
1324
rc = ecore_ll2_acquire_connection_ooo(p_hwfn, p_ll2_info,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1327
DP_NOTICE(p_hwfn, false, "ll2 acquire ooo connection failed\n");
sys/dev/qlnx/qlnxe/ecore_ll2.c
1342
ecore_int_register_cb(p_hwfn, comp_rx_cb,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1343
&p_hwfn->p_ll2_info[i],
sys/dev/qlnx/qlnxe/ecore_ll2.c
1350
ecore_int_register_cb(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1352
&p_hwfn->p_ll2_info[i],
sys/dev/qlnx/qlnxe/ecore_ll2.c
1362
ecore_ll2_release_connection(p_hwfn, i);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1366
static enum _ecore_status_t ecore_ll2_establish_connection_rx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1376
DIRECT_REG_WR(p_hwfn, p_ll2_conn->rx_queue.set_prod_addr, 0x0);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1386
return ecore_sp_ll2_rx_queue_start(p_hwfn, p_ll2_conn, action_on_error);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1390
ecore_ll2_establish_connection_ooo(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1396
ecore_ooo_release_all_isles(p_hwfn->p_ooo_info);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1397
ecore_ooo_submit_rx_buffers(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1403
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_ll2.c
1416
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1420
p_ll2_conn = ecore_ll2_handle_sanity_lock(p_hwfn, connection_handle);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1466
rc = ecore_cxt_acquire_cid(p_hwfn, PROTOCOLID_CORE, &p_ll2_conn->cid);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1470
rc = ecore_cxt_get_cid_info(p_hwfn, &cxt_info);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1472
DP_NOTICE(p_hwfn, true, "Cannot find context info for cid=%d\n",
sys/dev/qlnx/qlnxe/ecore_ll2.c
1482
qid = ecore_ll2_handle_to_queue_id(p_hwfn, connection_handle);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1485
p_rx->set_prod_addr = (u8 OSAL_IOMEM*)p_hwfn->regview +
sys/dev/qlnx/qlnxe/ecore_ll2.c
1488
p_tx->doorbell_addr = (u8 OSAL_IOMEM*)p_hwfn->doorbells +
sys/dev/qlnx/qlnxe/ecore_ll2.c
150
static void ecore_ll2_txq_flush(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1500
rc = ecore_ll2_establish_connection_rx(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1504
rc = ecore_sp_ll2_tx_queue_start(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1508
if (!ECORE_IS_RDMA_PERSONALITY(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_ll2.c
1509
ecore_wr(p_hwfn, p_ptt, PRS_REG_USE_LIGHT_L2, 1);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1511
ecore_ll2_establish_connection_ooo(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1515
&p_hwfn->p_dev->mf_bits))
sys/dev/qlnx/qlnxe/ecore_ll2.c
1516
ecore_llh_add_protocol_filter(p_hwfn->p_dev, 0,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1519
ecore_llh_add_protocol_filter(p_hwfn->p_dev, 0,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1525
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1530
static void ecore_ll2_post_rx_buffer_notify_fw(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1566
DIRECT_REG_WR(p_hwfn, p_rx->set_prod_addr, *((u32 *)&rx_prod));
sys/dev/qlnx/qlnxe/ecore_ll2.c
1576
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_ll2.c
1585
p_ll2_conn = ecore_ll2_handle_sanity(p_hwfn, connection_handle);
sys/dev/qlnx/qlnxe/ecore_ll2.c
160
p_ll2_conn = ecore_ll2_handle_sanity_inactive(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1631
ecore_ll2_post_rx_buffer_notify_fw(p_hwfn, p_rx, p_curp);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1656
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1688
if (ECORE_IS_IWARP_PERSONALITY(p_hwfn) &&
sys/dev/qlnx/qlnxe/ecore_ll2.c
1694
if (OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits) &&
sys/dev/qlnx/qlnxe/ecore_ll2.c
1716
DP_VERBOSE(p_hwfn, (ECORE_MSG_TX_QUEUED | ECORE_MSG_LL2),
sys/dev/qlnx/qlnxe/ecore_ll2.c
1740
static void ecore_ll2_tx_packet_notify(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1782
OSAL_WMB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1785
DIRECT_REG_WR_DB(p_hwfn, p_tx->doorbell_addr, *((u32 *)&p_tx->db_msg));
sys/dev/qlnx/qlnxe/ecore_ll2.c
1787
DP_VERBOSE(p_hwfn, (ECORE_MSG_TX_QUEUED | ECORE_MSG_LL2),
sys/dev/qlnx/qlnxe/ecore_ll2.c
1800
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_ll2.c
1808
p_ll2_conn = ecore_ll2_handle_sanity(p_hwfn, connection_handle);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1839
ecore_ll2_prepare_tx_packet_set_bd(p_hwfn, p_ll2_conn, p_curp,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1842
ecore_ll2_tx_packet_notify(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1855
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_ll2.c
1861
p_ll2_conn = ecore_ll2_handle_sanity(p_hwfn, connection_handle);
sys/dev/qlnx/qlnxe/ecore_ll2.c
188
ecore_ooo_put_free_buffer(p_hwfn->p_ooo_info, p_buffer);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1884
ecore_ll2_tx_packet_notify(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1893
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_ll2.c
1898
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1902
p_ll2_conn = ecore_ll2_handle_sanity_lock(p_hwfn, connection_handle);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1910
rc = ecore_sp_ll2_tx_queue_stop(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1913
ecore_ll2_txq_flush(p_hwfn, connection_handle);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1917
rc = ecore_sp_ll2_rx_queue_stop(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1920
ecore_ll2_rxq_flush(p_hwfn, connection_handle);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1924
ecore_ooo_release_all_isles(p_hwfn->p_ooo_info);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1928
&p_hwfn->p_dev->mf_bits))
sys/dev/qlnx/qlnxe/ecore_ll2.c
1929
ecore_llh_remove_protocol_filter(p_hwfn->p_dev, 0,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1932
ecore_llh_remove_protocol_filter(p_hwfn->p_dev, 0,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1938
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1943
static void ecore_ll2_release_connection_ooo(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1951
ecore_ooo_release_all_isles(p_hwfn->p_ooo_info);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1952
while ((p_buffer = ecore_ooo_get_free_buffer(p_hwfn->p_ooo_info))) {
sys/dev/qlnx/qlnxe/ecore_ll2.c
1953
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1957
OSAL_FREE(p_hwfn->p_dev, p_buffer);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1964
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_ll2.c
1967
p_ll2_conn = ecore_ll2_handle_sanity(p_hwfn, connection_handle);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1973
ecore_int_unregister_cb(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1979
ecore_int_unregister_cb(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
1983
OSAL_FREE(p_hwfn->p_dev, p_ll2_conn->tx_queue.descq_array);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1984
ecore_chain_free(p_hwfn->p_dev, &p_ll2_conn->tx_queue.txq_chain);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1986
OSAL_FREE(p_hwfn->p_dev, p_ll2_conn->rx_queue.descq_array);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1987
ecore_chain_free(p_hwfn->p_dev, &p_ll2_conn->rx_queue.rxq_chain);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1988
ecore_chain_free(p_hwfn->p_dev, &p_ll2_conn->rx_queue.rcq_chain);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1990
ecore_cxt_release_cid(p_hwfn, p_ll2_conn->cid);
sys/dev/qlnx/qlnxe/ecore_ll2.c
1992
ecore_ll2_release_connection_ooo(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2001
enum _ecore_status_t ecore_ll2_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_ll2.c
2007
p_ll2_info = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_ll2.c
2011
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_ll2.c
2016
p_hwfn->p_ll2_info = p_ll2_info;
sys/dev/qlnx/qlnxe/ecore_ll2.c
2020
if (OSAL_MUTEX_ALLOC(p_hwfn, &p_ll2_info[i].mutex))
sys/dev/qlnx/qlnxe/ecore_ll2.c
2022
if (OSAL_SPIN_LOCK_ALLOC(p_hwfn, &p_ll2_info[i].rx_queue.lock))
sys/dev/qlnx/qlnxe/ecore_ll2.c
2024
if (OSAL_SPIN_LOCK_ALLOC(p_hwfn, &p_ll2_info[i].tx_queue.lock))
sys/dev/qlnx/qlnxe/ecore_ll2.c
2033
ecore_ll2_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2038
void ecore_ll2_setup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_ll2.c
2043
OSAL_MUTEX_INIT(&p_hwfn->p_ll2_info[i].mutex);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2046
void ecore_ll2_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_ll2.c
2051
if (!p_hwfn->p_ll2_info)
sys/dev/qlnx/qlnxe/ecore_ll2.c
2056
OSAL_SPIN_LOCK_DEALLOC(&p_hwfn->p_ll2_info[i].rx_queue.lock);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2057
OSAL_SPIN_LOCK_DEALLOC(&p_hwfn->p_ll2_info[i].tx_queue.lock);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2058
OSAL_MUTEX_DEALLOC(&p_hwfn->p_ll2_info[i].mutex);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2061
OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_ll2_info);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2062
p_hwfn->p_ll2_info = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_ll2.c
2065
static void _ecore_ll2_get_port_stats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
2072
ecore_memcpy_from(p_hwfn, p_ptt, &port_stats,
sys/dev/qlnx/qlnxe/ecore_ll2.c
2074
TSTORM_LL2_PORT_STAT_OFFSET(MFW_PORT(p_hwfn)),
sys/dev/qlnx/qlnxe/ecore_ll2.c
2087
static void _ecore_ll2_get_tstats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
209
ecore_ll2_txq_completion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
2099
ecore_memcpy_from(p_hwfn, p_ptt, &tstats,
sys/dev/qlnx/qlnxe/ecore_ll2.c
2109
static void _ecore_ll2_get_ustats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
2121
ecore_memcpy_from(p_hwfn, p_ptt, &ustats,
sys/dev/qlnx/qlnxe/ecore_ll2.c
2133
static void _ecore_ll2_get_pstats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
2145
ecore_memcpy_from(p_hwfn, p_ptt, &pstats,
sys/dev/qlnx/qlnxe/ecore_ll2.c
2161
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)cxt;
sys/dev/qlnx/qlnxe/ecore_ll2.c
2166
!p_hwfn->p_ll2_info) {
sys/dev/qlnx/qlnxe/ecore_ll2.c
2170
p_ll2_conn = &p_hwfn->p_ll2_info[connection_handle];
sys/dev/qlnx/qlnxe/ecore_ll2.c
2172
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2174
DP_ERR(p_hwfn, "Failed to acquire ptt\n");
sys/dev/qlnx/qlnxe/ecore_ll2.c
2179
_ecore_ll2_get_port_stats(p_hwfn, p_ptt, p_stats);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2181
_ecore_ll2_get_tstats(p_hwfn, p_ptt, p_ll2_conn, p_stats);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2183
_ecore_ll2_get_ustats(p_hwfn, p_ptt, p_ll2_conn, p_stats);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2186
_ecore_ll2_get_pstats(p_hwfn, p_ptt, p_ll2_conn, p_stats);
sys/dev/qlnx/qlnxe/ecore_ll2.c
2188
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_ll2.c
253
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ll2.c
331
ecore_ll2_handle_slowpath(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
341
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ll2.c
348
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ll2.c
366
ecore_ll2_rxq_handle_completion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
381
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_ll2.c
396
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_ll2.c
419
static enum _ecore_status_t ecore_ll2_rxq_completion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
439
DP_VERBOSE(p_hwfn, ECORE_MSG_LL2,
sys/dev/qlnx/qlnxe/ecore_ll2.c
445
rc = ecore_ll2_handle_slowpath(p_hwfn, p_ll2_conn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
450
rc = ecore_ll2_rxq_handle_completion(p_hwfn, p_ll2_conn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
463
static void ecore_ll2_rxq_flush(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
471
p_ll2_conn = ecore_ll2_handle_sanity_inactive(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
499
ecore_ooo_put_free_buffer(p_hwfn->p_ooo_info, p_buffer);
sys/dev/qlnx/qlnxe/ecore_ll2.c
516
ecore_ll2_lb_rxq_handler_slowpath(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
531
ecore_ooo_release_connection_isles(p_hwfn->p_ooo_info, cid);
sys/dev/qlnx/qlnxe/ecore_ll2.c
537
ecore_ll2_lb_rxq_handler(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
564
if (ecore_ll2_lb_rxq_handler_slowpath(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
569
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ll2.c
581
ecore_ooo_save_history_entry(p_hwfn->p_ooo_info, iscsi_ooo);
sys/dev/qlnx/qlnxe/ecore_ll2.c
586
ecore_ooo_delete_isles(p_hwfn, p_hwfn->p_ooo_info, cid,
sys/dev/qlnx/qlnxe/ecore_ll2.c
595
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ll2.c
61
__ecore_ll2_handle_sanity(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
610
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ll2.c
628
ecore_ooo_dump_rx_event(p_hwfn, iscsi_ooo, p_buffer);
sys/dev/qlnx/qlnxe/ecore_ll2.c
634
ecore_ooo_add_new_isle(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
635
p_hwfn->p_ooo_info,
sys/dev/qlnx/qlnxe/ecore_ll2.c
641
ecore_ooo_add_new_buffer(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
642
p_hwfn->p_ooo_info,
sys/dev/qlnx/qlnxe/ecore_ll2.c
649
ecore_ooo_add_new_buffer(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
650
p_hwfn->p_ooo_info,
sys/dev/qlnx/qlnxe/ecore_ll2.c
657
ecore_ooo_add_new_buffer(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
658
p_hwfn->p_ooo_info,
sys/dev/qlnx/qlnxe/ecore_ll2.c
664
ecore_ooo_join_isles(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
665
p_hwfn->p_ooo_info,
sys/dev/qlnx/qlnxe/ecore_ll2.c
670
ecore_ooo_put_ready_buffer(p_hwfn->p_ooo_info,
sys/dev/qlnx/qlnxe/ecore_ll2.c
675
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ll2.c
685
ecore_ooo_submit_tx_buffers(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
696
while ((p_buffer = ecore_ooo_get_ready_buffer(p_hwfn->p_ooo_info))) {
sys/dev/qlnx/qlnxe/ecore_ll2.c
70
if (!p_hwfn->p_ll2_info)
sys/dev/qlnx/qlnxe/ecore_ll2.c
715
rc = ecore_ll2_prepare_tx_packet(p_hwfn, p_ll2_conn->my_id,
sys/dev/qlnx/qlnxe/ecore_ll2.c
718
ecore_ooo_put_ready_buffer(p_hwfn->p_ooo_info,
sys/dev/qlnx/qlnxe/ecore_ll2.c
726
ecore_ooo_submit_rx_buffers(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
732
while ((p_buffer = ecore_ooo_get_free_buffer(p_hwfn->p_ooo_info))) {
sys/dev/qlnx/qlnxe/ecore_ll2.c
733
rc = ecore_ll2_post_rx_buffer(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
738
ecore_ooo_put_free_buffer(p_hwfn->p_ooo_info, p_buffer);
sys/dev/qlnx/qlnxe/ecore_ll2.c
745
ecore_ll2_lb_rxq_completion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
751
rc = ecore_ll2_lb_rxq_handler(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
755
ecore_ooo_submit_rx_buffers(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
756
ecore_ooo_submit_tx_buffers(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
76
p_ll2_conn = &p_hwfn->p_ll2_info[connection_handle];
sys/dev/qlnx/qlnxe/ecore_ll2.c
762
ecore_ll2_lb_txq_completion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
790
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ll2.c
808
ecore_ooo_put_free_buffer(p_hwfn->p_ooo_info, p_buffer);
sys/dev/qlnx/qlnxe/ecore_ll2.c
812
rc = ecore_ll2_post_rx_buffer(p_hwfn, p_ll2_conn->my_id,
sys/dev/qlnx/qlnxe/ecore_ll2.c
816
ecore_ooo_put_free_buffer(p_hwfn->p_ooo_info, p_buffer);
sys/dev/qlnx/qlnxe/ecore_ll2.c
821
ecore_ooo_submit_tx_buffers(p_hwfn, p_ll2_conn);
sys/dev/qlnx/qlnxe/ecore_ll2.c
826
static enum _ecore_status_t ecore_sp_ll2_rx_queue_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
841
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_ll2.c
844
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_ll2.c
852
p_ramrod->sb_id = OSAL_CPU_TO_LE16(ecore_int_get_sp_sb_id(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_ll2.c
868
if (OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits) &&
sys/dev/qlnx/qlnxe/ecore_ll2.c
875
&p_hwfn->p_dev->mf_bits) &&
sys/dev/qlnx/qlnxe/ecore_ll2.c
888
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_ll2.c
891
static enum _ecore_status_t ecore_sp_ll2_tx_queue_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
913
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_ll2.c
916
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_ll2.c
924
p_ramrod->sb_id = OSAL_CPU_TO_LE16(ecore_int_get_sp_sb_id(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_ll2.c
93
ecore_ll2_handle_sanity(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
938
pq_id = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_LB);
sys/dev/qlnx/qlnxe/ecore_ll2.c
941
pq_id = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OOO);
sys/dev/qlnx/qlnxe/ecore_ll2.c
944
pq_id = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);
sys/dev/qlnx/qlnxe/ecore_ll2.c
96
return __ecore_ll2_handle_sanity(p_hwfn, connection_handle,
sys/dev/qlnx/qlnxe/ecore_ll2.c
963
if (p_hwfn->hw_info.personality == ECORE_PCI_ISCSI) {
sys/dev/qlnx/qlnxe/ecore_ll2.c
971
DP_NOTICE(p_hwfn, false, "Unknown connection type: %d\n",
sys/dev/qlnx/qlnxe/ecore_ll2.c
977
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_ll2.c
981
rc = ecore_db_recovery_add(p_hwfn->p_dev, p_tx->doorbell_addr,
sys/dev/qlnx/qlnxe/ecore_ll2.c
987
static enum _ecore_status_t ecore_sp_ll2_rx_queue_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.c
998
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_ll2.h
135
enum _ecore_status_t ecore_ll2_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_ll2.h
143
void ecore_ll2_setup(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_ll2.h
151
void ecore_ll2_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_ll2.h
167
ecore_ll2_get_fragment_of_tx_packet(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.h
42
static OSAL_INLINE u8 ecore_ll2_handle_to_queue_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ll2.h
45
return p_hwfn->hw_info.resc_start[ECORE_LL2_QUEUE] + handle;
sys/dev/qlnx/qlnxe/ecore_mcp.c
101
p_hwfn->mcp_info->port_addr = SECTION_ADDR(mfw_mb_offsize,
sys/dev/qlnx/qlnxe/ecore_mcp.c
102
MFW_PORT(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_mcp.c
103
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
105
p_hwfn->mcp_info->port_addr, MFW_PORT(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_mcp.c
1053
enum _ecore_status_t ecore_mcp_load_req(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1063
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
1064
ecore_mcp_mf_workaround(p_hwfn, &p_params->load_code);
sys/dev/qlnx/qlnxe/ecore_mcp.c
108
void ecore_mcp_read_mb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1082
rc = __ecore_mcp_load_req(p_hwfn, p_ptt, &in_params, &out_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1091
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1096
rc = __ecore_mcp_load_req(p_hwfn, p_ptt, &in_params,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1105
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
111
u32 length = MFW_DRV_MSG_MAX_DWORDS(p_hwfn->mcp_info->mfw_mb_length);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1119
rc = __ecore_mcp_load_req(p_hwfn, p_ptt, &in_params,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1124
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1133
ecore_mcp_cancel_load_req(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1153
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1159
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
116
if (CHIP_REV_IS_TEDIBEAR(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
1170
enum _ecore_status_t ecore_mcp_load_done(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1176
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_LOAD_DONE, 0, &resp,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1179
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1185
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1192
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1198
enum _ecore_status_t ecore_mcp_unload_req(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
120
if (!p_hwfn->mcp_info->public_base)
sys/dev/qlnx/qlnxe/ecore_mcp.c
1204
switch (p_hwfn->p_dev->wol_config) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
1212
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1214
p_hwfn->p_dev->wol_config);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1225
return ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1228
enum _ecore_status_t ecore_mcp_unload_done(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1238
if (p_hwfn->p_dev->wol_config == ECORE_OV_WOL_ENABLED) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
1239
u8 *p_mac = p_hwfn->p_dev->wol_mac;
sys/dev/qlnx/qlnxe/ecore_mcp.c
124
tmp = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1246
DP_VERBOSE(p_hwfn, (ECORE_MSG_SP | ECORE_MSG_IFDOWN),
sys/dev/qlnx/qlnxe/ecore_mcp.c
125
p_hwfn->mcp_info->mfw_mb_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
1255
return ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1258
static void ecore_mcp_handle_vf_flr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1261
u32 addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1263
u32 mfw_path_offsize = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1265
ECORE_PATH_ID(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_mcp.c
1269
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1274
disabled_vfs[i] = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1279
DP_VERBOSE(p_hwfn, (ECORE_MSG_SP | ECORE_MSG_IOV),
sys/dev/qlnx/qlnxe/ecore_mcp.c
128
((u32 *)p_hwfn->mcp_info->mfw_mb_cur)[i] =
sys/dev/qlnx/qlnxe/ecore_mcp.c
1284
if (ecore_iov_mark_vf_flr(p_hwfn, disabled_vfs))
sys/dev/qlnx/qlnxe/ecore_mcp.c
1285
OSAL_VF_FLR_UPDATE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1288
enum _ecore_status_t ecore_mcp_ack_vf_flr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1292
u32 addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1294
u32 mfw_func_offsize = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1296
MCP_PF_ID(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_mcp.c
1302
DP_VERBOSE(p_hwfn, (ECORE_MSG_SP | ECORE_MSG_IOV),
sys/dev/qlnx/qlnxe/ecore_mcp.c
1310
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1312
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1319
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1327
static void ecore_mcp_handle_transceiver_change(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1332
transceiver_state = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1333
p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
1337
DP_VERBOSE(p_hwfn, (ECORE_MSG_HW | ECORE_MSG_SP),
sys/dev/qlnx/qlnxe/ecore_mcp.c
1339
transceiver_state, (u32)(p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
1347
DP_NOTICE(p_hwfn, false, "Transceiver is present.\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
1349
DP_NOTICE(p_hwfn, false, "Transceiver is unplugged.\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
1351
OSAL_TRANSCEIVER_UPDATE(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1354
static void ecore_mcp_read_eee_config(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1362
eee_status = ecore_rd(p_hwfn, p_ptt, p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
1377
static u32 ecore_mcp_get_shmem_func(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1382
u32 addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1384
u32 mfw_path_offsize = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1393
((u32 *)p_data)[i] = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1399
static void ecore_read_pf_bandwidth(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1404
p_info = &p_hwfn->mcp_info->func_info;
sys/dev/qlnx/qlnxe/ecore_mcp.c
1416
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
142
ecore_mcp_cmd_add_elem(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1426
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1433
static void ecore_mcp_handle_link_change(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1442
OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->link_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1444
p_link = &p_hwfn->mcp_info->link_output;
sys/dev/qlnx/qlnxe/ecore_mcp.c
1447
status = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1448
p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
1450
DP_VERBOSE(p_hwfn, (ECORE_MSG_LINK | ECORE_MSG_SP),
sys/dev/qlnx/qlnxe/ecore_mcp.c
1452
status, (u32)(p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
1455
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1460
if (p_hwfn->b_drv_link_init) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
1464
if (p_hwfn->mcp_info->capabilities &
sys/dev/qlnx/qlnxe/ecore_mcp.c
1468
ecore_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1469
MCP_PF_ID(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_mcp.c
1472
ecore_read_pf_bandwidth(p_hwfn, &shmem_info);
sys/dev/qlnx/qlnxe/ecore_mcp.c
148
p_cmd_elem = OSAL_ZALLOC(p_hwfn->p_dev, GFP_ATOMIC,
sys/dev/qlnx/qlnxe/ecore_mcp.c
151
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1519
max_bw = p_hwfn->mcp_info->func_info.bandwidth_max;
sys/dev/qlnx/qlnxe/ecore_mcp.c
1520
min_bw = p_hwfn->mcp_info->func_info.bandwidth_min;
sys/dev/qlnx/qlnxe/ecore_mcp.c
1523
__ecore_configure_pf_max_bandwidth(p_hwfn, p_ptt, p_link, max_bw);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1526
__ecore_configure_pf_min_bandwidth(p_hwfn, p_ptt, p_link, min_bw);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1527
ecore_configure_vp_wfq_on_link_change(p_hwfn->p_dev, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
158
OSAL_LIST_PUSH_HEAD(&p_cmd_elem->list, &p_hwfn->mcp_info->cmd_list);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1583
if (p_hwfn->mcp_info->capabilities & FW_MB_PARAM_FEATURE_SUPPORT_EEE)
sys/dev/qlnx/qlnxe/ecore_mcp.c
1584
ecore_mcp_read_eee_config(p_hwfn, p_ptt, p_link);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1586
OSAL_LINK_UPDATE(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1588
OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->link_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1591
enum _ecore_status_t ecore_mcp_set_link(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1595
struct ecore_mcp_link_params *params = &p_hwfn->mcp_info->link_input;
sys/dev/qlnx/qlnxe/ecore_mcp.c
1602
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
1622
if ((p_hwfn->mcp_info->capabilities &
sys/dev/qlnx/qlnxe/ecore_mcp.c
1637
p_hwfn->b_drv_link_init = b_up;
sys/dev/qlnx/qlnxe/ecore_mcp.c
164
static void ecore_mcp_cmd_del_elem(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1640
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1645
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK, "Resetting link\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
1651
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1655
DP_ERR(p_hwfn, "MCP response failure, aborting\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
1665
ecore_mcp_handle_link_change(p_hwfn, p_ptt, !b_up);
sys/dev/qlnx/qlnxe/ecore_mcp.c
167
OSAL_LIST_REMOVE_ENTRY(&p_cmd_elem->list, &p_hwfn->mcp_info->cmd_list);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1670
u32 ecore_get_process_kill_counter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1676
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
1679
path_offsize_addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
sys/dev/qlnx/qlnxe/ecore_mcp.c
168
OSAL_FREE(p_hwfn->p_dev, p_cmd_elem);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1681
path_offsize = ecore_rd(p_hwfn, p_ptt, path_offsize_addr);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1682
path_addr = SECTION_ADDR(path_offsize, ECORE_PATH_ID(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_mcp.c
1684
proc_kill_cnt = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1692
static void ecore_mcp_handle_process_kill(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1695
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_mcp.c
1701
ecore_int_igu_disable_int(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1703
DP_NOTICE(p_hwfn, false, "Received a process kill indication\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
1708
if (p_hwfn != ECORE_LEADING_HWFN(p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
1712
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1719
proc_kill_cnt = ecore_get_process_kill_counter(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1720
DP_NOTICE(p_hwfn, false, "Process kill counter: %d\n", proc_kill_cnt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1722
OSAL_SCHEDULE_RECOVERY_HANDLER(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1725
static void ecore_mcp_send_protocol_stats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
173
ecore_mcp_cmd_get_elem(struct ecore_hwfn *p_hwfn, u16 seq_num)
sys/dev/qlnx/qlnxe/ecore_mcp.c
1753
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1758
OSAL_GET_PROTOCOL_STATS(p_hwfn->p_dev, stats_type, &stats);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1765
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1767
DP_ERR(p_hwfn, "Failed to send protocol stats, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_mcp.c
177
OSAL_LIST_FOR_EACH_ENTRY(p_cmd_elem, &p_hwfn->mcp_info->cmd_list, list,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1771
ecore_mcp_update_bw(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_mcp.c
1777
OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->link_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1779
ecore_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1780
MCP_PF_ID(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_mcp.c
1782
ecore_read_pf_bandwidth(p_hwfn, &shmem_info);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1784
p_info = &p_hwfn->mcp_info->func_info;
sys/dev/qlnx/qlnxe/ecore_mcp.c
1786
ecore_configure_pf_min_bandwidth(p_hwfn->p_dev, p_info->bandwidth_min);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1788
ecore_configure_pf_max_bandwidth(p_hwfn->p_dev, p_info->bandwidth_max);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1790
OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->link_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1793
ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_BW_UPDATE_ACK, 0, &resp,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1797
static void ecore_mcp_update_stag(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1803
ecore_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1804
MCP_PF_ID(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_mcp.c
1806
p_hwfn->mcp_info->func_info.ovlan = (u16)shmem_info.ovlan_stag &
sys/dev/qlnx/qlnxe/ecore_mcp.c
1808
p_hwfn->hw_info.ovlan = p_hwfn->mcp_info->func_info.ovlan;
sys/dev/qlnx/qlnxe/ecore_mcp.c
1809
if ((p_hwfn->hw_info.hw_mode & (1 << MODE_MF_SD)) &&
sys/dev/qlnx/qlnxe/ecore_mcp.c
1810
(p_hwfn->hw_info.ovlan != ECORE_MCP_VLAN_UNSET)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
1811
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1813
p_hwfn->hw_info.ovlan);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1814
ecore_sp_pf_update_stag(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1816
ecore_wr(p_hwfn, p_ptt, DORQ_REG_TAG1_OVRD_MODE, 1);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1817
ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_EXT_VID_BB_K2,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1818
p_hwfn->hw_info.ovlan);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1821
DP_VERBOSE(p_hwfn, ECORE_MSG_SP, "ovlan = %d hw_mode = 0x%x\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
1822
p_hwfn->mcp_info->func_info.ovlan, p_hwfn->hw_info.hw_mode);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1823
OSAL_HW_INFO_CHANGE(p_hwfn, ECORE_HW_INFO_CHANGE_OVLAN);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1826
ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_S_TAG_UPDATE_ACK, 0,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1830
static void ecore_mcp_handle_fan_failure(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_mcp.c
1833
if (p_hwfn != ECORE_LEADING_HWFN(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
1836
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1839
ecore_hw_err_notify(p_hwfn, ECORE_HW_ERR_FAN_FAIL);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1852
ecore_mcp_mdump_cmd(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
186
enum _ecore_status_t ecore_mcp_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_mcp.c
1865
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1872
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1877
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
188
if (p_hwfn->mcp_info) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
1885
static enum _ecore_status_t ecore_mcp_mdump_ack(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1893
return ecore_mcp_mdump_cmd(p_hwfn, p_ptt, &mdump_cmd_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1896
enum _ecore_status_t ecore_mcp_mdump_set_values(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1907
return ecore_mcp_mdump_cmd(p_hwfn, p_ptt, &mdump_cmd_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
191
OSAL_FREE(p_hwfn->p_dev, p_hwfn->mcp_info->mfw_mb_cur);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1910
enum _ecore_status_t ecore_mcp_mdump_trigger(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1918
return ecore_mcp_mdump_cmd(p_hwfn, p_ptt, &mdump_cmd_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
192
OSAL_FREE(p_hwfn->p_dev, p_hwfn->mcp_info->mfw_mb_shadow);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1922
ecore_mcp_mdump_get_config(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1933
rc = ecore_mcp_mdump_cmd(p_hwfn, p_ptt, &mdump_cmd_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1938
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
194
OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1948
ecore_mcp_mdump_get_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1957
addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1959
global_offsize = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_mcp.c
196
&p_hwfn->mcp_info->cmd_list, list,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1961
p_mdump_info->reason = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1967
rc = ecore_mcp_mdump_get_config(p_hwfn, p_ptt, &mdump_config);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1977
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
198
ecore_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
sys/dev/qlnx/qlnxe/ecore_mcp.c
1983
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1990
enum _ecore_status_t ecore_mcp_mdump_clear_logs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
1998
return ecore_mcp_mdump_cmd(p_hwfn, p_ptt, &mdump_cmd_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
200
OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2002
ecore_mcp_mdump_get_retain(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2014
rc = ecore_mcp_mdump_cmd(p_hwfn, p_ptt, &mdump_cmd_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2019
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
203
OSAL_MUTEX_DEALLOC(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2033
enum _ecore_status_t ecore_mcp_mdump_clr_retain(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
204
OSAL_MUTEX_DEALLOC(&p_hwfn->mcp_info->link_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2041
return ecore_mcp_mdump_cmd(p_hwfn, p_ptt, &mdump_cmd_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2044
static void ecore_mcp_handle_critical_error(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2053
if (p_hwfn != ECORE_LEADING_HWFN(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
2056
rc = ecore_mcp_mdump_get_retain(p_hwfn, p_ptt, &mdump_retain);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2058
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2063
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2067
if (p_hwfn->p_dev->allow_mdump) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2068
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2073
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2075
ecore_mcp_mdump_ack(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2076
ecore_hw_err_notify(p_hwfn, ECORE_HW_ERR_HW_ATTN);
sys/dev/qlnx/qlnxe/ecore_mcp.c
208
OSAL_FREE(p_hwfn->p_dev, p_hwfn->mcp_info);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2080
ecore_mcp_read_ufp_config(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_mcp.c
2085
if (!OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits))
sys/dev/qlnx/qlnxe/ecore_mcp.c
2088
OSAL_MEMSET(&p_hwfn->ufp_info, 0, sizeof(p_hwfn->ufp_info));
sys/dev/qlnx/qlnxe/ecore_mcp.c
2089
port_cfg = ecore_rd(p_hwfn, p_ptt, p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
209
p_hwfn->mcp_info = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2093
DP_NOTICE(p_hwfn, false, "Incorrect UFP Channel type %d\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
2098
p_hwfn->ufp_info.mode = ECORE_UFP_MODE_ETS;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2100
p_hwfn->ufp_info.mode = ECORE_UFP_MODE_VNIC_BW;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2102
p_hwfn->ufp_info.mode = ECORE_UFP_MODE_UNKNOWN;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2103
DP_NOTICE(p_hwfn, false, "Unknown UFP scheduling mode %d\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
2107
ecore_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2108
MCP_PF_ID(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_mcp.c
2110
p_hwfn->ufp_info.tc = (u8)val;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2114
p_hwfn->ufp_info.pri_type = ECORE_UFP_PRI_VNIC;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2116
p_hwfn->ufp_info.pri_type = ECORE_UFP_PRI_OS;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2118
p_hwfn->ufp_info.pri_type = ECORE_UFP_PRI_UNKNOWN;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2119
DP_NOTICE(p_hwfn, false, "Unknown Host priority control %d\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
2123
DP_VERBOSE(p_hwfn, ECORE_MSG_DCB,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2125
p_hwfn->ufp_info.mode, p_hwfn->ufp_info.tc,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2126
p_hwfn->ufp_info.pri_type);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2130
ecore_mcp_handle_ufp_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_mcp.c
2132
ecore_mcp_read_ufp_config(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2134
if (p_hwfn->ufp_info.mode == ECORE_UFP_MODE_VNIC_BW) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2135
p_hwfn->qm_info.ooo_tc = p_hwfn->ufp_info.tc;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2136
p_hwfn->hw_info.offload_tc = p_hwfn->ufp_info.tc;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2138
ecore_qm_reconf(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2139
} else if (p_hwfn->ufp_info.mode == ECORE_UFP_MODE_ETS) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2141
ecore_dcbx_mib_update_event(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2144
DP_ERR(p_hwfn, "Invalid sched type, discard the UFP config\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2149
ecore_sp_pf_update_ufp(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2154
enum _ecore_status_t ecore_mcp_handle_events(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2157
struct ecore_mcp_info *info = p_hwfn->mcp_info;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2162
DP_VERBOSE(p_hwfn, ECORE_MSG_SP, "Received message from MFW\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2165
ecore_mcp_read_mb(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2174
DP_VERBOSE(p_hwfn, ECORE_MSG_LINK,
sys/dev/qlnx/qlnxe/ecore_mcp.c
218
enum _ecore_status_t ecore_load_mcp_offsets(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2180
ecore_mcp_handle_link_change(p_hwfn, p_ptt, false);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2183
ecore_mcp_handle_vf_flr(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2186
ecore_dcbx_mib_update_event(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2190
ecore_dcbx_mib_update_event(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2194
ecore_dcbx_mib_update_event(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2197
OSAL_MEMSET(&p_hwfn->p_dcbx_info->set, 0,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2201
ecore_lldp_mib_update_event(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2204
ecore_mcp_handle_ufp_event(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2207
ecore_mcp_handle_transceiver_change(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
221
struct ecore_mcp_info *p_info = p_hwfn->mcp_info;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2210
ecore_mcp_handle_process_kill(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2216
ecore_mcp_send_protocol_stats(p_hwfn, p_ptt, i);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2219
ecore_mcp_update_bw(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2222
ecore_mcp_update_stag(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2225
ecore_mcp_handle_fan_failure(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2228
ecore_mcp_handle_critical_error(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2231
OSAL_MFW_TLV_REQ(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2234
DP_INFO(p_hwfn, "Unimplemented MFW message %d\n", i);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2244
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
225
u32 mcp_pf_id = MCP_PF_ID(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2251
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2262
enum _ecore_status_t ecore_mcp_get_mfw_ver(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2270
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2271
DP_NOTICE(p_hwfn, false, "Emulation - can't get MFW version\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2276
if (IS_VF(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2277
if (p_hwfn->vf_iov_info) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
228
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2280
p_resp = &p_hwfn->vf_iov_info->acquire_resp;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2284
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_mcp.c
229
DP_NOTICE(p_hwfn, false, "Emulation - assume no MFW\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2290
global_offsize = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2291
SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2293
*p_mfw_ver = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2298
*p_running_bundle_id = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2307
enum _ecore_status_t ecore_mcp_get_mbi_ver(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2314
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2315
DP_NOTICE(p_hwfn, false, "Emulation - can't get MBI version\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2320
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
2324
nvm_cfg_addr = ecore_rd(p_hwfn, p_ptt, MISC_REG_GEN_PURP_CR0);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2326
DP_NOTICE(p_hwfn, false, "Shared memory not initialized\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2331
nvm_cfg1_offset = ecore_rd(p_hwfn, p_ptt, nvm_cfg_addr + 4);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2336
*p_mbi_ver = ecore_rd(p_hwfn, p_ptt, mbi_ver_addr) &
sys/dev/qlnx/qlnxe/ecore_mcp.c
2344
enum _ecore_status_t ecore_mcp_get_media_type(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
235
p_info->public_base = ecore_rd(p_hwfn, p_ptt, MISC_REG_SHARED_MEM_ADDR);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2350
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
2353
if (!ecore_mcp_is_init(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2354
DP_NOTICE(p_hwfn, false, "MFW is not initialized!\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2361
*p_media_type = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2362
p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
2370
enum _ecore_status_t ecore_mcp_get_transceiver_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2375
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
2378
if (!ecore_mcp_is_init(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2379
DP_NOTICE(p_hwfn, false, "MFW is not initialized!\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2386
*p_tranceiver_type = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2387
p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
2407
enum _ecore_status_t ecore_mcp_trans_speed_mask(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2413
ecore_mcp_get_transceiver_data(p_hwfn, p_ptt, &transceiver_data);
sys/dev/qlnx/qlnxe/ecore_mcp.c
242
mfw_mb_offsize = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
246
p_info->mfw_mb_length = (u16)ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2519
DP_INFO(p_hwfn, "Unknown transcevier type 0x%x\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
2528
enum _ecore_status_t ecore_mcp_get_board_config(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2535
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
2538
if (!ecore_mcp_is_init(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2539
DP_NOTICE(p_hwfn, false, "MFW is not initialized!\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2546
nvm_cfg_addr = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2548
nvm_cfg1_offset = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2551
offsetof(struct nvm_cfg1, port[MFW_PORT(p_hwfn)]);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2552
*p_board_config = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2563
ecore_mcp_get_shmem_proto_legacy(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2570
&p_hwfn->hw_info.device_capabilities))
sys/dev/qlnx/qlnxe/ecore_mcp.c
2575
DP_VERBOSE(p_hwfn, ECORE_MSG_IFUP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2581
ecore_mcp_get_shmem_proto_mfw(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2588
rc = ecore_mcp_cmd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
259
p_info->mfw_mb_length = (u16)ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2593
DP_VERBOSE(p_hwfn, ECORE_MSG_IFUP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2613
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2619
DP_VERBOSE(p_hwfn, ECORE_MSG_IFUP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2626
ecore_mcp_get_shmem_proto(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2635
if (ecore_mcp_get_shmem_proto_mfw(p_hwfn, p_ptt, p_proto) !=
sys/dev/qlnx/qlnxe/ecore_mcp.c
2637
ecore_mcp_get_shmem_proto_legacy(p_hwfn, p_proto);
sys/dev/qlnx/qlnxe/ecore_mcp.c
264
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2646
DP_NOTICE(p_hwfn, true, "RoCE personality is not a valid value!\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2655
enum _ecore_status_t ecore_mcp_fill_shmem_func_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2661
ecore_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2662
MCP_PF_ID(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_mcp.c
2663
info = &p_hwfn->mcp_info->func_info;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2668
if (ecore_mcp_get_shmem_proto(p_hwfn, &shmem_info, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2670
DP_ERR(p_hwfn, "Unknown personality %08x\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
2675
ecore_read_pf_bandwidth(p_hwfn, &shmem_info);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2686
OSAL_MEMCPY(&p_hwfn->p_dev->wol_mac, info->mac, ETH_ALEN);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2690
DP_NOTICE(p_hwfn, false, "MAC is 0 in shmem\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2703
p_hwfn->hw_info.b_wol_support = ECORE_WOL_SUPPORT_NONE;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2704
p_hwfn->p_dev->wol_config = (u8)ECORE_OV_WOL_DEFAULT;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2705
if (ecore_mcp_is_init(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2709
rc = ecore_mcp_cmd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
271
drv_mb_offsize = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2714
p_hwfn->hw_info.b_wol_support = ECORE_WOL_SUPPORT_PME;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2717
DP_VERBOSE(p_hwfn, (ECORE_MSG_SP | ECORE_MSG_IFUP),
sys/dev/qlnx/qlnxe/ecore_mcp.c
2724
(u8)p_hwfn->hw_info.b_wol_support);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2730
*ecore_mcp_get_link_params(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_mcp.c
2732
if (!p_hwfn || !p_hwfn->mcp_info)
sys/dev/qlnx/qlnxe/ecore_mcp.c
2734
return &p_hwfn->mcp_info->link_input;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2738
*ecore_mcp_get_link_state(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_mcp.c
2740
if (!p_hwfn || !p_hwfn->mcp_info)
sys/dev/qlnx/qlnxe/ecore_mcp.c
2744
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2745
DP_INFO(p_hwfn, "Non-ASIC - always notify that link is up\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2746
p_hwfn->mcp_info->link_output.link_up = true;
sys/dev/qlnx/qlnxe/ecore_mcp.c
275
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2750
return &p_hwfn->mcp_info->link_output;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2754
*ecore_mcp_get_link_capabilities(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_mcp.c
2756
if (!p_hwfn || !p_hwfn->mcp_info)
sys/dev/qlnx/qlnxe/ecore_mcp.c
2758
return &p_hwfn->mcp_info->link_capabilities;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2761
enum _ecore_status_t ecore_mcp_drain(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2767
rc = ecore_mcp_cmd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2779
*ecore_mcp_get_function_info(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_mcp.c
2781
if (!p_hwfn || !p_hwfn->mcp_info)
sys/dev/qlnx/qlnxe/ecore_mcp.c
2783
return &p_hwfn->mcp_info->func_info;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2786
int ecore_mcp_get_personality_cnt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2794
num_pfs = NUM_OF_ENG_PFS(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2797
ecore_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2798
MCP_PF_ID_BY_REL(p_hwfn, i));
sys/dev/qlnx/qlnxe/ecore_mcp.c
2802
if (ecore_mcp_get_shmem_proto(p_hwfn, &shmem_info, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2815
enum _ecore_status_t ecore_mcp_get_flash_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
282
p_info->drv_mb_seq = DRV_MB_RD(p_hwfn, p_ptt, drv_mb_header) &
sys/dev/qlnx/qlnxe/ecore_mcp.c
2822
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
2823
DP_NOTICE(p_hwfn, false, "Emulation - can't get flash size\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2828
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
2831
flash_size = ecore_rd(p_hwfn, p_ptt, MCP_REG_NVM_CFG4);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2841
enum _ecore_status_t ecore_start_recovery_process(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2844
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2847
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2852
DP_NOTICE(p_hwfn, false, "Triggering a recovery process\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2853
ecore_wr(p_hwfn, p_ptt, MISC_REG_AEU_GENERAL_ATTN_35, 0x1);
sys/dev/qlnx/qlnxe/ecore_mcp.c
286
p_info->drv_pulse_seq = DRV_MB_RD(p_hwfn, p_ptt, drv_pulse_mb) &
sys/dev/qlnx/qlnxe/ecore_mcp.c
2862
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2863
struct ecore_ptt *p_ptt = p_hwfn->p_main_ptt;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2870
rc = ecore_pglueb_set_pfid_enable(p_hwfn, p_ptt, false);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2872
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2880
ecore_mcp_config_vf_msix_bb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2888
if (!IS_LEAD_HWFN(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_mcp.c
289
p_info->mcp_hist = ecore_rd(p_hwfn, p_ptt, MISCS_REG_GENERIC_POR_0);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2890
num *= p_hwfn->p_dev->num_hwfns;
sys/dev/qlnx/qlnxe/ecore_mcp.c
2897
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_CFG_VF_MSIX, param,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2901
DP_NOTICE(p_hwfn, true, "VF[%d]: MFW failed to set MSI-X\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
2905
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2914
ecore_mcp_config_vf_msix_ah(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2921
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_CFG_PF_VFS_MSIX,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2925
DP_NOTICE(p_hwfn, true, "MFW failed to set MSI-X for VFs\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2928
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2936
enum _ecore_status_t ecore_mcp_config_vf_msix(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
294
enum _ecore_status_t ecore_mcp_cmd_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2940
if (ECORE_IS_BB(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
2941
return ecore_mcp_config_vf_msix_bb(p_hwfn, p_ptt, vf_id, num);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2943
return ecore_mcp_config_vf_msix_ah(p_hwfn, p_ptt, num);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2947
ecore_mcp_send_drv_version(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2958
if (CHIP_REV_IS_SLOW(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
2976
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
2978
DP_ERR(p_hwfn, "MCP response failure, aborting\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
2987
enum _ecore_status_t ecore_mcp_halt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2993
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MCP_HALT, 0, &resp,
sys/dev/qlnx/qlnxe/ecore_mcp.c
2996
DP_ERR(p_hwfn, "MCP response failure, aborting\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
3002
cpu_state = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3008
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
301
p_hwfn->mcp_info = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3010
ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE), cpu_state);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3014
ecore_mcp_cmd_set_blocking(p_hwfn, true);
sys/dev/qlnx/qlnxe/ecore_mcp.c
302
sizeof(*p_hwfn->mcp_info));
sys/dev/qlnx/qlnxe/ecore_mcp.c
3021
enum _ecore_status_t ecore_mcp_resume(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3026
ecore_wr(p_hwfn, p_ptt, MCP_REG_CPU_STATE, 0xffffffff);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3028
cpu_mode = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE);
sys/dev/qlnx/qlnxe/ecore_mcp.c
303
if (!p_hwfn->mcp_info) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
3030
ecore_wr(p_hwfn, p_ptt, MCP_REG_CPU_MODE, cpu_mode);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3033
cpu_state = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3036
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
304
DP_NOTICE(p_hwfn, false, "Failed to allocate mcp_info\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
3042
ecore_mcp_cmd_set_blocking(p_hwfn, false);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3048
ecore_mcp_ov_update_current_config(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3067
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_mcp.c
307
p_info = p_hwfn->mcp_info;
sys/dev/qlnx/qlnxe/ecore_mcp.c
3072
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_OV_UPDATE_CURR_CFG,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3075
DP_ERR(p_hwfn, "MCP response failure, aborting\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
3081
ecore_mcp_ov_update_driver_state(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3100
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3105
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_OV_UPDATE_DRIVER_STATE,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3108
DP_ERR(p_hwfn, "Failed to send driver state\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
311
if (OSAL_MUTEX_LOCK_ALLOC(p_hwfn, &p_info->cmd_lock)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
3114
ecore_mcp_ov_get_fc_npiv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
312
OSAL_FREE(p_hwfn->p_dev, p_hwfn->mcp_info);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3124
addr = ecore_rd(p_hwfn, p_ptt, p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
3127
DP_VERBOSE(p_hwfn, ECORE_MSG_SP, "NPIV table doesn't exist\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
3131
size = ecore_rd(p_hwfn, p_ptt, p_hwfn->mcp_info->port_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
3134
DP_VERBOSE(p_hwfn, ECORE_MSG_SP, "NPIV table is empty\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
3138
p_buf = OSAL_VZALLOC(p_hwfn->p_dev, size);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3140
DP_ERR(p_hwfn, "Buffer allocation failed\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
3144
rc = ecore_mcp_nvm_read(p_hwfn->p_dev, addr, p_buf, size);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3146
OSAL_VFREE(p_hwfn->p_dev, p_buf);
sys/dev/qlnx/qlnxe/ecore_mcp.c
315
if (OSAL_MUTEX_ALLOC(p_hwfn, &p_info->link_lock)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
3160
OSAL_VFREE(p_hwfn->p_dev, p_buf);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3166
ecore_mcp_ov_update_mtu(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
317
OSAL_FREE(p_hwfn->p_dev, p_hwfn->mcp_info);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3174
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_OV_UPDATE_MTU,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3177
DP_ERR(p_hwfn, "Failed to send mtu value, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3183
ecore_mcp_ov_update_mac(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3194
mb_params.param |= MCP_PF_ID(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3206
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3208
DP_ERR(p_hwfn, "Failed to send mac address, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3211
OSAL_MEMCPY(p_hwfn->p_dev->wol_mac, mac, ETH_ALEN);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3217
ecore_mcp_ov_update_wol(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3224
if (p_hwfn->hw_info.b_wol_support == ECORE_WOL_SUPPORT_NONE) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
3225
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3241
DP_ERR(p_hwfn, "Invalid wol state %d\n", wol);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3245
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_OV_UPDATE_WOL,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3248
DP_ERR(p_hwfn, "Failed to send wol mode, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3251
p_hwfn->p_dev->wol_config = (u8)wol;
sys/dev/qlnx/qlnxe/ecore_mcp.c
3257
ecore_mcp_ov_update_eswitch(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
326
if (ecore_load_mcp_offsets(p_hwfn, p_ptt) != ECORE_SUCCESS) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
327
DP_NOTICE(p_hwfn, false, "MCP is not initialized\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
3275
DP_ERR(p_hwfn, "Invalid eswitch mode %d\n", eswitch);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3279
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_OV_UPDATE_ESWITCH_MODE,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3282
DP_ERR(p_hwfn, "Failed to send eswitch mode, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3287
enum _ecore_status_t ecore_mcp_set_led(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3305
DP_NOTICE(p_hwfn, true, "Invalid LED mode %d\n", mode);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3309
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_SET_LED_MODE,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3312
DP_ERR(p_hwfn, "MCP response failure, aborting\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
3317
enum _ecore_status_t ecore_mcp_mask_parities(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3324
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_MASK_PARITIES,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3328
DP_ERR(p_hwfn, "MCP response failure for mask parities, aborting\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
3330
DP_ERR(p_hwfn, "MCP did not acknowledge mask parity request. Old MFW?\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
3340
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3346
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
335
p_info->mfw_mb_cur = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, size);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3357
rc = ecore_mcp_nvm_rd_cmd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
336
p_info->mfw_mb_shadow = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, size);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3388
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3396
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3401
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3405
rc = ecore_mcp_nvm_rd_cmd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3414
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3421
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3424
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3429
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
343
DP_NOTICE(p_hwfn, false, "Failed to allocate mcp memory\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
3437
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_mcp.c
344
ecore_mcp_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3442
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3445
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_NVM_DEL_FILE, addr,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3448
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3456
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3461
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3464
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_NVM_PUT_FILE_BEGIN, addr,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3467
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3479
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_mcp.c
348
static void ecore_mcp_reread_offsets(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3483
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3501
DP_NOTICE(p_hwfn, true, "Invalid nvm write command 0x%x\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
351
u32 generic_por_0 = ecore_rd(p_hwfn, p_ptt, MISCS_REG_GENERIC_POR_0);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3514
rc = ecore_mcp_nvm_wr_cmd(p_hwfn, p_ptt, nvm_cmd, nvm_offset,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3546
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3554
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3559
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
356
if (p_hwfn->mcp_info->mcp_hist != generic_por_0) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
3565
rc = ecore_mcp_nvm_wr_cmd(p_hwfn, p_ptt, nvm_cmd, addr,
sys/dev/qlnx/qlnxe/ecore_mcp.c
357
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3570
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3578
struct ecore_hwfn *p_hwfn = ECORE_LEADING_HWFN(p_dev);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3583
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3587
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_SET_SECURE_MODE, addr,
sys/dev/qlnx/qlnxe/ecore_mcp.c
359
p_hwfn->mcp_info->mcp_hist, generic_por_0);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3590
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3595
enum _ecore_status_t ecore_mcp_phy_sfp_read(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
361
ecore_load_mcp_offsets(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3618
rc = ecore_mcp_nvm_rd_cmd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
362
ecore_mcp_cmd_port_init(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3623
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3641
enum _ecore_status_t ecore_mcp_phy_sfp_write(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
366
enum _ecore_status_t ecore_mcp_reset(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3661
rc = ecore_mcp_nvm_wr_cmd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3666
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3683
enum _ecore_status_t ecore_mcp_gpio_read(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3692
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_GPIO_READ,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3704
enum _ecore_status_t ecore_mcp_gpio_write(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3714
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_GPIO_WRITE,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3726
enum _ecore_status_t ecore_mcp_gpio_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
373
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
3736
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_GPIO_INFO,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3752
enum _ecore_status_t ecore_mcp_bist_register_test(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3761
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_BIST_TEST,
sys/dev/qlnx/qlnxe/ecore_mcp.c
377
if (p_hwfn->mcp_info->b_block_cmd) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
3774
enum _ecore_status_t ecore_mcp_bist_clock_test(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
378
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3783
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_BIST_TEST,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3797
struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, u32 *num_images)
sys/dev/qlnx/qlnxe/ecore_mcp.c
3805
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_BIST_TEST,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3818
struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3828
rc = ecore_mcp_nvm_rd_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_BIST_TEST,
sys/dev/qlnx/qlnxe/ecore_mcp.c
384
OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3842
ecore_mcp_get_nvm_image_att(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
386
org_mcp_reset_seq = ecore_rd(p_hwfn, p_ptt, MISCS_REG_GENERIC_POR_0);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3863
DP_NOTICE(p_hwfn, false, "Unknown request of image_id %08x\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
3869
rc = ecore_mcp_bist_nvm_test_get_num_images(p_hwfn, p_ptt, &num_images);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3874
rc = ecore_mcp_bist_nvm_test_get_image_att(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3883
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_mcp.c
389
ecore_mcp_reread_offsets(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
3895
enum _ecore_status_t ecore_mcp_get_nvm_image(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
390
seq = ++p_hwfn->mcp_info->drv_mb_seq;
sys/dev/qlnx/qlnxe/ecore_mcp.c
3905
rc = ecore_mcp_get_nvm_image_att(p_hwfn, p_ptt, image_id, &image_att);
sys/dev/qlnx/qlnxe/ecore_mcp.c
391
DRV_MB_WR(p_hwfn, p_ptt, drv_mb_header, (DRV_MSG_CODE_MCP_RESET | seq));
sys/dev/qlnx/qlnxe/ecore_mcp.c
3911
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3921
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3927
return ecore_mcp_nvm_read(p_hwfn->p_dev, image_att.start_addr,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3932
ecore_mcp_get_temperature_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3947
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
397
} while ((org_mcp_reset_seq == ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3971
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3978
rc = ecore_mcp_nvm_rd_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_GET_MBA_VERSION,
sys/dev/qlnx/qlnxe/ecore_mcp.c
3994
enum _ecore_status_t ecore_mcp_mem_ecc_events(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4004
return ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
402
ecore_rd(p_hwfn, p_ptt, MISCS_REG_GENERIC_POR_0)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
403
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
406
DP_ERR(p_hwfn, "Failed to reset MCP\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
4085
ecore_mcp_resc_allocation_msg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4098
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
410
OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4112
DP_ERR(p_hwfn, "Unexpected resource alloc command [0x%08x]\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
4125
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4135
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4147
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
416
static bool ecore_mcp_has_pending_cmd(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_mcp.c
4161
ecore_mcp_set_resc_max_val(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4174
rc = ecore_mcp_resc_allocation_msg(p_hwfn, p_ptt, &in_params,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4185
ecore_mcp_get_resc_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4197
rc = ecore_mcp_resc_allocation_msg(p_hwfn, p_ptt, &in_params,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4212
enum _ecore_status_t ecore_mcp_initiate_pf_flr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4217
return ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_INITIATE_PF_FLR, 0,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4221
enum _ecore_status_t ecore_mcp_get_lldp_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
423
if (!OSAL_LIST_IS_EMPTY(&p_hwfn->mcp_info->cmd_list)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
4233
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4238
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
424
p_cmd_elem = OSAL_LIST_FIRST_ENTRY(&p_hwfn->mcp_info->cmd_list,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4247
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4255
enum _ecore_status_t ecore_mcp_set_lldp_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4263
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4276
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4281
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4290
static enum _ecore_status_t ecore_mcp_resource_cmd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4297
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_RESOURCE_CMD, param,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4303
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4311
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4321
__ecore_mcp_resc_lock(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4347
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
435
ecore_mcp_update_pending_cmd(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_mcp.c
4352
rc = ecore_mcp_resource_cmd(p_hwfn, p_ptt, param, &mcp_resp,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4361
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4373
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4383
ecore_mcp_resc_lock(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4403
rc = __ecore_mcp_resc_lock(p_hwfn, p_ptt, p_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4415
ecore_mcp_resc_unlock(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
442
mcp_resp = DRV_MB_RD(p_hwfn, p_ptt, fw_mb_header);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4427
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4432
rc = ecore_mcp_resource_cmd(p_hwfn, p_ptt, param, &mcp_resp,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4440
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4446
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4457
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
446
if (seq_num != p_hwfn->mcp_info->drv_mb_seq)
sys/dev/qlnx/qlnxe/ecore_mcp.c
449
p_cmd_elem = ecore_mcp_cmd_get_elem(p_hwfn, seq_num);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4497
ecore_mcp_update_fcoe_cvid(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4503
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_OEM_UPDATE_FCOE_CVID,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4507
DP_ERR(p_hwfn, "Failed to update fcoe vlan, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_mcp.c
451
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4513
ecore_mcp_update_fcoe_fabric_name(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4528
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4530
DP_ERR(p_hwfn, "Failed to update fcoe wwn, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4535
void ecore_mcp_wol_wr(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4547
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4549
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4554
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4561
bool ecore_mcp_is_smart_an_supported(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_mcp.c
4563
return !!(p_hwfn->mcp_info->capabilities &
sys/dev/qlnx/qlnxe/ecore_mcp.c
4567
bool ecore_mcp_rlx_odr_supported(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_mcp.c
4569
return !!(p_hwfn->mcp_info->capabilities &
sys/dev/qlnx/qlnxe/ecore_mcp.c
4573
enum _ecore_status_t ecore_mcp_get_capabilities(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4579
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_GET_MFW_FEATURE_SUPPORT,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4580
0, &mcp_resp, &p_hwfn->mcp_info->capabilities);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4582
DP_VERBOSE(p_hwfn, (ECORE_MSG_SP | ECORE_MSG_PROBE),
sys/dev/qlnx/qlnxe/ecore_mcp.c
4584
p_hwfn->mcp_info->capabilities);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4589
enum _ecore_status_t ecore_mcp_set_capabilities(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4598
return ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_FEATURE_SUPPORT,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4603
ecore_mcp_drv_attribute(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4625
DP_NOTICE(p_hwfn, false, "Unknown attribute command %d\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
463
p_mb_params->mcp_param = DRV_MB_RD(p_hwfn, p_ptt, fw_mb_param);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4646
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4651
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4655
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4662
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4675
enum _ecore_status_t ecore_mcp_get_engine_config(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4678
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_mcp.c
468
u32 union_data_addr = p_hwfn->mcp_info->drv_mb_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
4685
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4690
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4709
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
471
ecore_memcpy_from(p_hwfn, p_ptt, p_mb_params->p_data_dst,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4716
enum _ecore_status_t ecore_mcp_get_ppfid_bitmap(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4719
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_mcp.c
4725
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4730
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4738
DP_VERBOSE(p_hwfn, ECORE_MSG_SP, "PPFID bitmap 0x%hhx\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
4745
ecore_mcp_ind_table_lock(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4764
rc = ecore_mcp_resc_lock(p_hwfn, p_ptt, &resc_lock_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
4766
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
4774
ecore_mcp_ind_table_unlock(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_mcp.c
4782
rc = ecore_mcp_resc_unlock(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
481
static void __ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
490
union_data_addr = p_hwfn->mcp_info->drv_mb_addr +
sys/dev/qlnx/qlnxe/ecore_mcp.c
496
ecore_memcpy_to(p_hwfn, p_ptt, union_data_addr, &union_data,
sys/dev/qlnx/qlnxe/ecore_mcp.c
500
DRV_MB_WR(p_hwfn, p_ptt, drv_mb_param, p_mb_params->param);
sys/dev/qlnx/qlnxe/ecore_mcp.c
503
DRV_MB_WR(p_hwfn, p_ptt, drv_mb_header, (p_mb_params->cmd | seq_num));
sys/dev/qlnx/qlnxe/ecore_mcp.c
505
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
510
static void ecore_mcp_cmd_set_blocking(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
513
p_hwfn->mcp_info->b_block_cmd = block_cmd;
sys/dev/qlnx/qlnxe/ecore_mcp.c
515
DP_INFO(p_hwfn, "%s sending of mailbox commands to the MFW\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
519
static void ecore_mcp_print_cpu_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
524
cpu_mode = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_MODE);
sys/dev/qlnx/qlnxe/ecore_mcp.c
525
cpu_state = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_STATE);
sys/dev/qlnx/qlnxe/ecore_mcp.c
526
cpu_pc_0 = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
sys/dev/qlnx/qlnxe/ecore_mcp.c
528
cpu_pc_1 = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
sys/dev/qlnx/qlnxe/ecore_mcp.c
530
cpu_pc_2 = ecore_rd(p_hwfn, p_ptt, MCP_REG_CPU_PROGRAM_COUNTER);
sys/dev/qlnx/qlnxe/ecore_mcp.c
532
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
538
_ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
554
OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
556
if (!ecore_mcp_has_pending_cmd(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_mcp.c
559
rc = ecore_mcp_update_pending_cmd(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
565
OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
571
OSAL_MFW_CMD_PREEMPT(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
575
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
582
ecore_mcp_reread_offsets(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
583
seq_num = ++p_hwfn->mcp_info->drv_mb_seq;
sys/dev/qlnx/qlnxe/ecore_mcp.c
584
p_cmd_elem = ecore_mcp_cmd_add_elem(p_hwfn, p_mb_params, seq_num);
sys/dev/qlnx/qlnxe/ecore_mcp.c
590
__ecore_mcp_cmd_and_union(p_hwfn, p_ptt, p_mb_params, seq_num);
sys/dev/qlnx/qlnxe/ecore_mcp.c
591
OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
605
OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
610
rc = ecore_mcp_update_pending_cmd(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
616
OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
617
OSAL_MFW_CMD_PREEMPT(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.c
621
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
624
ecore_mcp_print_cpu_info(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.c
626
OSAL_MUTEX_ACQUIRE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
627
ecore_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
sys/dev/qlnx/qlnxe/ecore_mcp.c
628
OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
631
ecore_mcp_cmd_set_blocking(p_hwfn, true);
sys/dev/qlnx/qlnxe/ecore_mcp.c
632
ecore_hw_err_notify(p_hwfn, ECORE_HW_ERR_MFW_RESP_FAIL);
sys/dev/qlnx/qlnxe/ecore_mcp.c
636
ecore_mcp_cmd_del_elem(p_hwfn, p_cmd_elem);
sys/dev/qlnx/qlnxe/ecore_mcp.c
637
OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
639
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
64
DRV_INNER_WR(p_hwfn, _p_ptt, drv_mb_addr, \
sys/dev/qlnx/qlnxe/ecore_mcp.c
650
OSAL_MUTEX_RELEASE(&p_hwfn->mcp_info->cmd_lock);
sys/dev/qlnx/qlnxe/ecore_mcp.c
654
static enum _ecore_status_t ecore_mcp_cmd_and_union(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
663
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
666
if (CHIP_REV_IS_FPGA(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
675
if (!ecore_mcp_is_init(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
676
DP_NOTICE(p_hwfn, true, "MFW is not initialized!\n");
sys/dev/qlnx/qlnxe/ecore_mcp.c
682
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
689
if (p_hwfn->mcp_info->b_block_cmd) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
690
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
696
return _ecore_mcp_cmd_and_union(p_hwfn, p_ptt, p_mb_params, max_retries,
sys/dev/qlnx/qlnxe/ecore_mcp.c
700
enum _ecore_status_t ecore_mcp_cmd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
708
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
711
loaded_port[p_hwfn->port_id]--;
sys/dev/qlnx/qlnxe/ecore_mcp.c
712
DP_VERBOSE(p_hwfn, ECORE_MSG_SP, "Unload cnt: 0x%x\n",
sys/dev/qlnx/qlnxe/ecore_mcp.c
722
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
732
enum _ecore_status_t ecore_mcp_nvm_wr_cmd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
749
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
759
enum _ecore_status_t ecore_mcp_nvm_rd_cmd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
780
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
794
static void ecore_mcp_mf_workaround(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
801
} else if (!loaded_port[p_hwfn->port_id]) {
sys/dev/qlnx/qlnxe/ecore_mcp.c
808
if (ECORE_IS_CMT(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_mcp.c
813
loaded_port[p_hwfn->port_id]++;
sys/dev/qlnx/qlnxe/ecore_mcp.c
815
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
817
*p_load_code, loaded, p_hwfn->port_id,
sys/dev/qlnx/qlnxe/ecore_mcp.c
818
loaded_port[p_hwfn->port_id]);
sys/dev/qlnx/qlnxe/ecore_mcp.c
846
enum _ecore_status_t ecore_mcp_cancel_load_req(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
852
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_CANCEL_LOAD_REQ, 0,
sys/dev/qlnx/qlnxe/ecore_mcp.c
855
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
861
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
87
bool ecore_mcp_is_init(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_mcp.c
89
if (!p_hwfn->mcp_info || !p_hwfn->mcp_info->public_base)
sys/dev/qlnx/qlnxe/ecore_mcp.c
930
__ecore_mcp_load_req(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.c
94
void ecore_mcp_cmd_port_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.c
957
mb_params.param = PDA_COMP | hsi_ver | p_hwfn->p_dev->drv_type;
sys/dev/qlnx/qlnxe/ecore_mcp.c
964
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
97
u32 addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
sys/dev/qlnx/qlnxe/ecore_mcp.c
973
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
982
rc = ecore_mcp_cmd_and_union(p_hwfn, p_ptt, &mb_params);
sys/dev/qlnx/qlnxe/ecore_mcp.c
984
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_mcp.c
989
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.c
99
u32 mfw_mb_offsize = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_mcp.c
995
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mcp.h
134
enum _ecore_status_t ecore_mcp_cmd_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
144
void ecore_mcp_cmd_port_init(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
155
enum _ecore_status_t ecore_mcp_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.h
169
enum _ecore_status_t ecore_mcp_handle_events(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
186
enum _ecore_status_t ecore_issue_pulse(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
215
enum _ecore_status_t ecore_mcp_load_req(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
227
enum _ecore_status_t ecore_mcp_load_done(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
238
enum _ecore_status_t ecore_mcp_cancel_load_req(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
249
enum _ecore_status_t ecore_mcp_unload_req(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
260
enum _ecore_status_t ecore_mcp_unload_done(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
269
void ecore_mcp_read_mb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
281
enum _ecore_status_t ecore_mcp_ack_vf_flr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
292
enum _ecore_status_t ecore_mcp_fill_shmem_func_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
303
enum _ecore_status_t ecore_mcp_reset(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
313
bool ecore_mcp_is_init(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp.h
325
enum _ecore_status_t ecore_mcp_config_vf_msix(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
337
enum _ecore_status_t ecore_mcp_halt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
348
enum _ecore_status_t ecore_mcp_resume(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
350
int __ecore_configure_pf_max_bandwidth(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
354
int __ecore_configure_pf_min_bandwidth(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
358
enum _ecore_status_t ecore_mcp_mask_parities(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
362
enum _ecore_status_t ecore_hw_init_first_eth(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
376
enum _ecore_status_t ecore_mcp_mdump_set_values(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
388
enum _ecore_status_t ecore_mcp_mdump_trigger(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
408
ecore_mcp_mdump_get_retain(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.h
423
ecore_mcp_set_resc_max_val(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.h
44
#define MCP_PF_ID_BY_REL(p_hwfn, rel_pfid) (ECORE_IS_BB((p_hwfn)->p_dev) ? \
sys/dev/qlnx/qlnxe/ecore_mcp.h
440
ecore_mcp_get_resc_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.h
452
enum _ecore_status_t ecore_mcp_initiate_pf_flr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
46
((p_hwfn)->abs_pf_id & 1) << 3) : \
sys/dev/qlnx/qlnxe/ecore_mcp.h
465
ecore_mcp_ov_update_eswitch(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.h
48
#define MCP_PF_ID(p_hwfn) MCP_PF_ID_BY_REL(p_hwfn, (p_hwfn)->rel_pf_id)
sys/dev/qlnx/qlnxe/ecore_mcp.h
528
ecore_mcp_resc_lock(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.h
552
ecore_mcp_resc_unlock(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.h
568
void ecore_mcp_wol_wr(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.h
577
enum _ecore_status_t ecore_mcp_get_capabilities(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
587
enum _ecore_status_t ecore_mcp_set_capabilities(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
596
enum _ecore_status_t ecore_load_mcp_offsets(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
631
ecore_mcp_drv_attribute(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp.h
641
ecore_mcp_read_ufp_config(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp.h
649
enum _ecore_status_t ecore_mcp_get_engine_config(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
658
enum _ecore_status_t ecore_mcp_get_ppfid_bitmap(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
670
ecore_mcp_ind_table_lock(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp.h
682
ecore_mcp_ind_table_unlock(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt);
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1031
ecore_mcp_get_nvm_image_att(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1046
enum _ecore_status_t ecore_mcp_get_nvm_image(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1067
enum _ecore_status_t ecore_mcp_nvm_wr_cmd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1092
enum _ecore_status_t ecore_mcp_nvm_rd_cmd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1114
enum _ecore_status_t ecore_mcp_phy_sfp_read(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1132
enum _ecore_status_t ecore_mcp_phy_sfp_write(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1147
enum _ecore_status_t ecore_mcp_gpio_read(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1161
enum _ecore_status_t ecore_mcp_gpio_write(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1177
enum _ecore_status_t ecore_mcp_gpio_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1190
enum _ecore_status_t ecore_mcp_bist_register_test(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1201
enum _ecore_status_t ecore_mcp_bist_clock_test(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1214
enum _ecore_status_t ecore_mcp_bist_nvm_test_get_num_images(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1228
enum _ecore_status_t ecore_mcp_bist_nvm_test_get_image_att(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1245
ecore_mcp_get_temperature_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1259
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1272
enum _ecore_status_t ecore_mcp_mem_ecc_events(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1295
ecore_mcp_mdump_get_info(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1306
enum _ecore_status_t ecore_mcp_mdump_clear_logs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1317
enum _ecore_status_t ecore_mcp_mdump_clr_retain(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1329
enum _ecore_status_t ecore_mcp_get_lldp_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1342
enum _ecore_status_t ecore_mcp_set_lldp_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1355
enum _ecore_status_t ecore_mfw_process_tlv_req(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1368
ecore_mcp_update_fcoe_cvid(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1381
ecore_mcp_update_fcoe_fabric_name(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1391
bool ecore_mcp_is_smart_an_supported(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
1401
bool ecore_mcp_rlx_odr_supported(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
583
*p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
593
*p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
603
*ecore_mcp_get_link_capabilities(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
614
enum _ecore_status_t ecore_mcp_set_link(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
628
enum _ecore_status_t ecore_mcp_get_mfw_ver(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
642
enum _ecore_status_t ecore_mcp_get_mbi_ver(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
657
enum _ecore_status_t ecore_mcp_get_media_type(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
672
enum _ecore_status_t ecore_mcp_get_transceiver_data(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
688
enum _ecore_status_t ecore_mcp_trans_speed_mask(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
703
enum _ecore_status_t ecore_mcp_get_board_config(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
721
enum _ecore_status_t ecore_mcp_cmd(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
732
enum _ecore_status_t ecore_mcp_drain(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
744
*ecore_mcp_get_function_info(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
758
int ecore_mcp_get_personality_cnt(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
772
enum _ecore_status_t ecore_mcp_get_flash_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
787
ecore_mcp_send_drv_version(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
798
u32 ecore_get_process_kill_counter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
809
enum _ecore_status_t ecore_start_recovery_process(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
833
ecore_mcp_ov_update_current_config(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
847
ecore_mcp_ov_update_driver_state(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
863
ecore_mcp_ov_get_fc_npiv(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
875
enum _ecore_status_t ecore_mcp_ov_update_mtu(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
888
ecore_mcp_ov_update_mac(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
901
ecore_mcp_ov_update_wol(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
sys/dev/qlnx/qlnxe/ecore_mcp_api.h
913
enum _ecore_status_t ecore_mcp_set_led(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1238
static enum _ecore_status_t ecore_mfw_update_tlvs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1249
p_tlv_data = OSAL_VZALLOC(p_hwfn->p_dev, sizeof(*p_tlv_data));
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1253
if (OSAL_MFW_FILL_TLV_DATA(p_hwfn,tlv_group, p_tlv_data)) {
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1254
OSAL_VFREE(p_hwfn->p_dev, p_tlv_data);
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1266
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1291
OSAL_VFREE(p_hwfn->p_dev, p_tlv_data);
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1297
ecore_mfw_process_tlv_req(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1305
addr = SECTION_OFFSIZE_ADDR(p_hwfn->mcp_info->public_base,
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1307
global_offsize = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1310
addr = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1311
size = ecore_rd(p_hwfn, p_ptt, global_addr +
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1315
DP_NOTICE(p_hwfn, false, "Invalid TLV req size = %d\n", size);
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1319
p_mfw_buf = (void *)OSAL_VZALLOC(p_hwfn->p_dev, size);
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1321
DP_NOTICE(p_hwfn, false, "Failed allocate memory for p_mfw_buf\n");
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1332
val = ecore_rd(p_hwfn, p_ptt, addr + offset);
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1344
DP_VERBOSE(p_hwfn, ECORE_MSG_DRV,
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1350
p_hwfn->hw_info.personality != ECORE_PCI_FCOE) {
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1351
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1357
p_hwfn->hw_info.personality != ECORE_PCI_ISCSI) {
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1358
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1364
!ECORE_IS_L2_PERSONALITY(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1365
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1373
if (ecore_mfw_update_tlvs(p_hwfn, id, p_mfw_buf, size))
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1385
ecore_wr(p_hwfn, p_ptt, addr + offset, val);
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1389
rc = ecore_mcp_cmd(p_hwfn, p_ptt, DRV_MSG_CODE_GET_TLV_DONE, 0, &resp,
sys/dev/qlnx/qlnxe/ecore_mng_tlv.c
1392
OSAL_VFREE(p_hwfn->p_dev, p_mfw_buf);
sys/dev/qlnx/qlnxe/ecore_ooo.c
100
enum _ecore_status_t ecore_ooo_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_ooo.c
107
switch (p_hwfn->hw_info.personality) {
sys/dev/qlnx/qlnxe/ecore_ooo.c
110
p_hwfn->pf_params.iscsi_pf_params.num_cons;
sys/dev/qlnx/qlnxe/ecore_ooo.c
111
cid_base =(u16)ecore_cxt_get_proto_cid_start(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.c
117
(u16)ecore_cxt_get_proto_cid_count(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.c
120
cid_base = (u16)ecore_cxt_get_proto_cid_start(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.c
124
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
132
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
137
p_ooo_info = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_ooo.c
140
DP_NOTICE(p_hwfn, true, "Failed to allocate ecore_ooo_info\n");
sys/dev/qlnx/qlnxe/ecore_ooo.c
151
OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_ooo.c
155
DP_NOTICE(p_hwfn,true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
167
OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_ooo.c
171
DP_NOTICE(p_hwfn,true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
181
OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL,
sys/dev/qlnx/qlnxe/ecore_ooo.c
185
DP_NOTICE(p_hwfn,true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
192
p_hwfn->p_ooo_info = p_ooo_info;
sys/dev/qlnx/qlnxe/ecore_ooo.c
196
OSAL_FREE(p_hwfn->p_dev, p_ooo_info->p_archipelagos_mem);
sys/dev/qlnx/qlnxe/ecore_ooo.c
198
OSAL_FREE(p_hwfn->p_dev, p_ooo_info->p_isles_mem);
sys/dev/qlnx/qlnxe/ecore_ooo.c
200
OSAL_FREE(p_hwfn->p_dev, p_ooo_info);
sys/dev/qlnx/qlnxe/ecore_ooo.c
301
void ecore_ooo_setup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_ooo.c
303
ecore_ooo_release_all_isles(p_hwfn->p_ooo_info);
sys/dev/qlnx/qlnxe/ecore_ooo.c
304
OSAL_MEM_ZERO(p_hwfn->p_ooo_info->ooo_history.p_cqes,
sys/dev/qlnx/qlnxe/ecore_ooo.c
305
p_hwfn->p_ooo_info->ooo_history.num_of_cqes *
sys/dev/qlnx/qlnxe/ecore_ooo.c
307
p_hwfn->p_ooo_info->ooo_history.head_idx = 0;
sys/dev/qlnx/qlnxe/ecore_ooo.c
310
void ecore_ooo_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_ooo.c
312
struct ecore_ooo_info *p_ooo_info = p_hwfn->p_ooo_info;
sys/dev/qlnx/qlnxe/ecore_ooo.c
331
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_ooo.c
335
OSAL_FREE(p_hwfn->p_dev, p_buffer);
sys/dev/qlnx/qlnxe/ecore_ooo.c
338
OSAL_FREE(p_hwfn->p_dev, p_ooo_info->p_isles_mem);
sys/dev/qlnx/qlnxe/ecore_ooo.c
339
OSAL_FREE(p_hwfn->p_dev, p_ooo_info->p_archipelagos_mem);
sys/dev/qlnx/qlnxe/ecore_ooo.c
340
OSAL_FREE(p_hwfn->p_dev, p_ooo_info->ooo_history.p_cqes);
sys/dev/qlnx/qlnxe/ecore_ooo.c
341
OSAL_FREE(p_hwfn->p_dev, p_ooo_info);
sys/dev/qlnx/qlnxe/ecore_ooo.c
342
p_hwfn->p_ooo_info = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_ooo.c
401
void ecore_ooo_delete_isles(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.c
413
p_isle = ecore_ooo_seek_isle(p_hwfn, p_ooo_info,
sys/dev/qlnx/qlnxe/ecore_ooo.c
416
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
422
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
440
void ecore_ooo_add_new_isle(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.c
450
p_prev_isle = ecore_ooo_seek_isle(p_hwfn, p_ooo_info, cid, ooo_isle - 1);
sys/dev/qlnx/qlnxe/ecore_ooo.c
452
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
460
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
474
DP_NOTICE(p_hwfn, true, "Free isle is not empty\n");
sys/dev/qlnx/qlnxe/ecore_ooo.c
478
DP_NOTICE(p_hwfn, true, "No more free isles\n");
sys/dev/qlnx/qlnxe/ecore_ooo.c
501
void ecore_ooo_add_new_buffer(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.c
509
p_isle = ecore_ooo_seek_isle(p_hwfn, p_ooo_info, cid, ooo_isle);
sys/dev/qlnx/qlnxe/ecore_ooo.c
511
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
525
void ecore_ooo_join_isles(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.c
533
p_right_isle = ecore_ooo_seek_isle(p_hwfn, p_ooo_info, cid,
sys/dev/qlnx/qlnxe/ecore_ooo.c
536
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
546
p_left_isle = ecore_ooo_seek_isle(p_hwfn, p_ooo_info, cid,
sys/dev/qlnx/qlnxe/ecore_ooo.c
549
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ooo.c
564
void ecore_ooo_dump_rx_event(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.c
573
if (p_hwfn->dp_level > ECORE_LEVEL_VERBOSE)
sys/dev/qlnx/qlnxe/ecore_ooo.c
575
if (!(p_hwfn->dp_module & dp_module))
sys/dev/qlnx/qlnxe/ecore_ooo.c
580
DP_VERBOSE(p_hwfn, dp_module,
sys/dev/qlnx/qlnxe/ecore_ooo.c
584
DP_VERBOSE(p_hwfn, dp_module,
sys/dev/qlnx/qlnxe/ecore_ooo.c
589
DP_VERBOSE(p_hwfn, dp_module,
sys/dev/qlnx/qlnxe/ecore_ooo.c
61
static struct ecore_ooo_isle *ecore_ooo_seek_isle(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.c
71
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_ooo.h
120
void ecore_ooo_delete_isles(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.h
126
void ecore_ooo_add_new_isle(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.h
132
void ecore_ooo_add_new_buffer(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.h
139
void ecore_ooo_join_isles(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.h
144
void ecore_ooo_dump_rx_event(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_ooo.h
81
enum _ecore_status_t ecore_ooo_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_ooo.h
83
void ecore_ooo_setup(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_ooo.h
85
void ecore_ooo_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_ooo.h
88
ecore_ooo_alloc(struct ecore_hwfn OSAL_UNUSED *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_ooo.h
94
ecore_ooo_setup(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {}
sys/dev/qlnx/qlnxe/ecore_ooo.h
97
ecore_ooo_free(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {}
sys/dev/qlnx/qlnxe/ecore_rdma.c
1001
ecore_wr(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1006
ll2_ethertype_en = ecore_rd(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1010
ecore_wr(p_hwfn, p_ptt, PRS_REG_LIGHT_L2_ETHERTYPE_EN,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1018
if (ECORE_IS_BB_A0(p_hwfn->p_dev) && ECORE_IS_CMT(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
1019
DP_ERR(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1022
ecore_wr(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1026
ecore_wr(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1033
if (IS_IWARP(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
1034
rc = ecore_iwarp_stop(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1036
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1040
rc = ecore_roce_stop(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1042
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1047
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
105
void ecore_bmap_set_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1051
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1055
rc = ecore_sp_init_request(p_hwfn, &p_ent, RDMA_RAMROD_FUNC_CLOSE,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1056
p_hwfn->p_rdma_info->proto, &init_data);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1062
p_ramrod->num_cnqs = p_hwfn->p_rdma_info->num_cnqs;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1063
p_ramrod->cnq_start_offset = (u8)RESC_START(p_hwfn, ECORE_RDMA_CNQ_RAM);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1065
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1068
ecore_rdma_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1070
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "RDMA stop done, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1077
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1082
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Adding User\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
1085
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1086
rc = ecore_rdma_bmap_alloc_id(p_hwfn, &p_hwfn->p_rdma_info->dpi_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1088
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1091
DP_NOTICE(p_hwfn, false, "Failed in allocating dpi\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
1096
dpi_start_offset = p_hwfn->dpi_start_offset;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1098
out_params->dpi_addr = (u64)(osal_int_ptr_t)((u8 OSAL_IOMEM*)p_hwfn->doorbells +
sys/dev/qlnx/qlnxe/ecore_rdma.c
110
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1100
((out_params->dpi) * p_hwfn->dpi_size));
sys/dev/qlnx/qlnxe/ecore_rdma.c
1102
out_params->dpi_phys_addr = p_hwfn->db_phys_addr + dpi_start_offset +
sys/dev/qlnx/qlnxe/ecore_rdma.c
1103
out_params->dpi * p_hwfn->dpi_size;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1105
out_params->dpi_size = p_hwfn->dpi_size;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1106
out_params->wid_count = p_hwfn->wid_count;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1108
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Adding user - done, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1114
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1115
struct ecore_rdma_port *p_port = p_hwfn->p_rdma_info->port;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1118
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "RDMA Query port\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
1122
&ECORE_LEADING_HWFN(p_hwfn->p_dev)->mcp_info->link_output;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1137
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1139
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Query device\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
1142
return p_hwfn->p_rdma_info->dev;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1148
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1150
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "itid = %08x\n", itid);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1152
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1153
ecore_bmap_release_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1154
&p_hwfn->p_rdma_info->tid_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1156
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1161
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1165
p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1167
if (qz_offset > p_hwfn->p_rdma_info->max_queue_zones) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
1168
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1170
qz_offset, p_hwfn->p_rdma_info->max_queue_zones);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1174
qz_num = p_hwfn->p_rdma_info->queue_zone_base + qz_offset;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1178
REG_WR16(p_hwfn, addr, prod);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1181
OSAL_WMB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1187
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
119
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "%s bitmap: set id %d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
1191
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Alloc PD\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
1194
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1195
rc = ecore_rdma_bmap_alloc_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1196
&p_hwfn->p_rdma_info->pd_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1198
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1200
DP_NOTICE(p_hwfn, false, "Failed in allocating pd id\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
1204
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Alloc PD - done, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1211
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1213
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "pd = %08x\n", pd);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1216
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1217
ecore_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->pd_map, pd);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1218
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1224
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1228
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Alloc XRCD\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
123
void ecore_bmap_release_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1231
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1232
rc = ecore_rdma_bmap_alloc_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1233
&p_hwfn->p_rdma_info->xrcd_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1235
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1237
DP_NOTICE(p_hwfn, false, "Failed in allocating xrcd id\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
1241
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Alloc XRCD - done, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1248
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1250
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "xrcd_id = %08x\n", xrcd_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1253
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1254
ecore_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->xrcd_map, xrcd_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1255
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1259
ecore_rdma_toggle_bit_create_resize_cq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1262
struct ecore_rdma_info *p_info = p_hwfn->p_rdma_info;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1266
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "icid = %08x\n", icid);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1271
bmap_id = icid - ecore_cxt_get_proto_cid_start(p_hwfn, p_info->proto);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1277
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "ECORE_RDMA_TOGGLE_BIT_= %d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
1287
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1288
struct ecore_rdma_info *p_info = p_hwfn->p_rdma_info;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1296
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "cq_handle = %08x%08x\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
1301
rc = ecore_rdma_bmap_alloc_id(p_hwfn, &p_info->cq_map, &returned_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1306
DP_NOTICE(p_hwfn, false, "Can't create CQ, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1312
p_hwfn, p_info->proto));
sys/dev/qlnx/qlnxe/ecore_rdma.c
1315
rc = ecore_cxt_dynamic_ilt_alloc(p_hwfn, ECORE_ELEM_CXT, *icid);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1322
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1326
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1341
p_ramrod->cnq_id = (u8)RESC_START(p_hwfn, ECORE_RDMA_CNQ_RAM)
sys/dev/qlnx/qlnxe/ecore_rdma.c
1348
toggle_bit = ecore_rdma_toggle_bit_create_resize_cq(p_hwfn, *icid);
sys/dev/qlnx/qlnxe/ecore_rdma.c
135
DP_NOTICE(p_hwfn, false, "%s bitmap: id %d already released\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
1352
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1355
ecore_rdma_toggle_bit_create_resize_cq(p_hwfn, *icid);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1359
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Created CQ, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1365
ecore_bmap_release_id(p_hwfn, &p_info->cq_map, returned_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1368
DP_NOTICE(p_hwfn, false, "Create CQ failed, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1377
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1385
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "icid = %08x\n", in_params->icid);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1388
OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev, &ramrod_res_phys,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1392
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
140
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "%s bitmap: released id %d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
1400
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1404
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1406
p_hwfn->p_rdma_info->proto, &init_data);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1413
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1420
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, p_ramrod_res, ramrod_res_phys,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1424
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1426
ecore_bmap_release_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1427
&p_hwfn->p_rdma_info->cq_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1429
p_hwfn, p_hwfn->p_rdma_info->proto)));
sys/dev/qlnx/qlnxe/ecore_rdma.c
1431
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1433
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Destroyed CQ, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1437
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, p_ramrod_res, ramrod_res_phys,
sys/dev/qlnx/qlnxe/ecore_rdma.c
144
int ecore_bmap_test_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1455
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1458
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "icid = %08x\n", qp->icid);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1482
if (IS_IWARP(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_rdma.c
1485
rc = ecore_roce_query_qp(p_hwfn, qp, out_params);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1487
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Query QP, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
149
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1495
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1499
DP_ERR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1505
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "QP(0x%x)\n", qp->icid);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1507
if (IS_IWARP(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_rdma.c
1508
rc = ecore_iwarp_destroy_qp(p_hwfn, qp);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1510
rc = ecore_roce_destroy_qp(p_hwfn, qp, out_params);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1513
OSAL_FREE(p_hwfn->p_dev, qp);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1522
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1527
if (!rdma_cxt || !in_params || !out_params || !p_hwfn->p_rdma_info) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
1528
DP_ERR(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1537
max_stats_queues = p_hwfn->p_rdma_info->dev->max_stats_queues;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1539
DP_ERR(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1545
if (IS_IWARP(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
1548
DP_NOTICE(p_hwfn->p_dev, true, "Sq num pages: %d exceeds maximum\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
155
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "%s bitmap: tested id %d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
1554
DP_NOTICE(p_hwfn->p_dev, true,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1561
qp = OSAL_ZALLOC(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1566
DP_NOTICE(p_hwfn, false, "Failed to allocate ecore_rdma_qp\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
1600
if (IS_IWARP(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
1601
rc = ecore_iwarp_create_qp(p_hwfn, qp, out_params);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1604
rc = ecore_roce_alloc_qp_idx(p_hwfn, &qp->qp_idx);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1610
OSAL_FREE(p_hwfn->p_dev, qp);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1619
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Create QP, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1634
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
168
u32 ecore_rdma_get_sb_id(struct ecore_hwfn *p_hwfn, u32 rel_sb_id)
sys/dev/qlnx/qlnxe/ecore_rdma.c
1683
if (p_hwfn->p_rdma_info->glob_cfg.vlan_pri_en)
sys/dev/qlnx/qlnxe/ecore_rdma.c
1685
p_hwfn->p_rdma_info->glob_cfg.vlan_pri);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1687
if (p_hwfn->p_rdma_info->glob_cfg.ecn_en)
sys/dev/qlnx/qlnxe/ecore_rdma.c
1689
p_hwfn->p_rdma_info->glob_cfg.ecn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1691
if (p_hwfn->p_rdma_info->glob_cfg.dscp_en)
sys/dev/qlnx/qlnxe/ecore_rdma.c
1693
p_hwfn->p_rdma_info->glob_cfg.dscp);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1705
(u8 *)&p_hwfn->hw_info.hw_mac_addr,
sys/dev/qlnx/qlnxe/ecore_rdma.c
171
return FEAT_NUM(p_hwfn, ECORE_PF_L2_QUE) + rel_sb_id;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1755
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "qp->cur_state=%d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
1769
if (IS_IWARP(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
1773
rc = ecore_iwarp_modify_qp(p_hwfn, qp, new_state, 0);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1775
rc = ecore_roce_modify_qp(p_hwfn, qp, prev_state, params);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1778
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Modify QP, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1785
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1793
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "itid = %08x\n", params->itid);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1797
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
180
enum _ecore_status_t ecore_rdma_info_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
1800
rc = ecore_sp_init_request(p_hwfn, &p_ent, RDMA_RAMROD_REGISTER_MR,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1801
p_hwfn->p_rdma_info->proto, &init_data);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1803
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1807
if (p_hwfn->p_rdma_info->last_tid < params->itid) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
1808
p_hwfn->p_rdma_info->last_tid = params->itid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
184
p_rdma_info = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*p_rdma_info));
sys/dev/qlnx/qlnxe/ecore_rdma.c
186
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1881
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
190
p_hwfn->p_rdma_info = p_rdma_info;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1914
rc = ecore_spq_post(p_hwfn, p_ent, &fw_return_code);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1919
DP_NOTICE(p_hwfn, true, "fw_return_code = %d\n", fw_return_code);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1923
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Register TID, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1928
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
193
if (OSAL_SPIN_LOCK_ALLOC(p_hwfn, &p_rdma_info->lock)) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
1939
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
194
ecore_rdma_info_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1942
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_rdma.c
1944
p_hwfn->p_rdma_info->proto, &init_data);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1946
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1953
rc = ecore_spq_post(p_hwfn, p_ent, fw_return_code);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1956
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1971
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
1974
rc = ecore_rdma_send_deregister_tid_ramrod(p_hwfn, itid, &fw_ret_code);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1989
rc = ecore_rdma_send_deregister_tid_ramrod(p_hwfn, itid, &fw_ret_code);
sys/dev/qlnx/qlnxe/ecore_rdma.c
1997
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2001
rc = ecore_mcp_drain(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2003
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2007
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2009
rc = ecore_rdma_send_deregister_tid_ramrod(p_hwfn, itid, &fw_ret_code);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2015
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "De-registered itid=%d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
2025
DP_NOTICE(p_hwfn, false, "itid=%d, fw_ret_code=%d\n", itid,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2029
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_rdma.c
203
void ecore_rdma_info_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
2036
static struct ecore_bmap *ecore_rdma_get_srq_bmap(struct ecore_hwfn *p_hwfn, bool is_xrc)
sys/dev/qlnx/qlnxe/ecore_rdma.c
2039
return &p_hwfn->p_rdma_info->xrc_srq_map;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2041
return &p_hwfn->p_rdma_info->srq_map;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2044
u16 ecore_rdma_get_fw_srq_id(struct ecore_hwfn *p_hwfn, u16 id, bool is_xrc)
sys/dev/qlnx/qlnxe/ecore_rdma.c
2049
return id + p_hwfn->p_rdma_info->srq_id_offset;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2056
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
206
OSAL_SPIN_LOCK_DEALLOC(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2064
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2067
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2069
p_hwfn->p_rdma_info->proto, &init_data);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2075
fw_srq_id = ecore_rdma_get_fw_srq_id(p_hwfn, in_params->srq_id,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2078
opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
208
OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_rdma_info);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2082
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2086
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "modified SRQ id = %x, is_xrc=%u\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
209
p_hwfn->p_rdma_info = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2096
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2104
opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2111
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2113
p_hwfn->p_rdma_info->proto, &init_data);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2119
fw_srq_id = ecore_rdma_get_fw_srq_id(p_hwfn, in_params->srq_id,
sys/dev/qlnx/qlnxe/ecore_rdma.c
212
static enum _ecore_status_t ecore_rdma_inc_ref_cnt(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
2124
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2129
bmap = ecore_rdma_get_srq_bmap(p_hwfn, in_params->is_xrc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2131
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2132
ecore_bmap_release_id(p_hwfn, bmap, in_params->srq_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2133
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2135
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2147
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2158
bmap = ecore_rdma_get_srq_bmap(p_hwfn, in_params->is_xrc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2159
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
216
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2160
rc = ecore_rdma_bmap_alloc_id(p_hwfn, bmap, &returned_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2161
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2164
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
217
if (p_hwfn->p_rdma_info->active) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
2171
rc = ecore_cxt_dynamic_ilt_alloc(p_hwfn, elem_type, returned_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2176
opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
218
p_hwfn->p_rdma_info->ref_cnt++;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2181
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2183
p_hwfn->p_rdma_info->proto, &init_data);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2197
fw_srq_id = ecore_rdma_get_fw_srq_id(p_hwfn, (u16) returned_id,
sys/dev/qlnx/qlnxe/ecore_rdma.c
221
DP_INFO(p_hwfn, "Ref cnt requested for inactive rdma\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
2212
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2219
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "XRC/SRQ created Id = %x (is_xrc=%u)\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
2224
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2225
ecore_bmap_release_id(p_hwfn, bmap, returned_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2226
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
223
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2231
bool ecore_rdma_allocated_qps(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
2236
if (!p_hwfn->p_rdma_info)
sys/dev/qlnx/qlnxe/ecore_rdma.c
2239
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2240
if (!p_hwfn->p_rdma_info->qp_map.bitmap)
sys/dev/qlnx/qlnxe/ecore_rdma.c
2243
result = !ecore_bmap_is_empty(&p_hwfn->p_rdma_info->qp_map);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2244
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2257
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2262
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "icid = %08x\n", in_params->icid);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2267
OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev, &ramrod_res_phys,
sys/dev/qlnx/qlnxe/ecore_rdma.c
227
static void ecore_rdma_dec_ref_cnt(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
2272
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2281
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2284
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2286
p_hwfn->p_rdma_info->proto, &init_data);
sys/dev/qlnx/qlnxe/ecore_rdma.c
229
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2295
toggle_bit = ecore_rdma_toggle_bit_create_resize_cq(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
230
p_hwfn->p_rdma_info->ref_cnt--;
sys/dev/qlnx/qlnxe/ecore_rdma.c
231
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2315
rc = ecore_spq_post(p_hwfn, p_ent, &fw_return_code);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2321
DP_NOTICE(p_hwfn, fw_return_code != RDMA_RETURN_RESIZE_CQ_ERR,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2323
DP_NOTICE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2332
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, p_ramrod_res, ramrod_res_phys,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2335
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
234
static void ecore_rdma_activate(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
2340
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, p_ramrod_res, ramrod_res_phys,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2342
DP_NOTICE(p_hwfn, false, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2350
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2354
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2357
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
236
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2361
rc = ecore_rdma_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2365
rc = ecore_rdma_setup(p_hwfn, p_ptt, params);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2369
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
237
p_hwfn->p_rdma_info->active = true;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2371
ecore_rdma_activate(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2375
ecore_rdma_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2377
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2379
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "RDMA start - error, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
238
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2386
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2396
if (!p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
2399
if (!p_hwfn->p_rdma_info) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
2400
DP_INFO(p_hwfn->p_dev, "ecore rdma query stats failed due to NULL rdma_info\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
2404
info = p_hwfn->p_rdma_info;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2406
rc = ecore_rdma_inc_ref_cnt(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2410
max_stats_queues = p_hwfn->p_rdma_info->dev->max_stats_queues;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2412
DP_ERR(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2420
abs_stats_queue = RESC_START(p_hwfn, ECORE_RDMA_STATS_QUEUE) +
sys/dev/qlnx/qlnxe/ecore_rdma.c
2430
XSTORM_IWARP_RXMIT_STATS_OFFSET(p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2442
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2446
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2450
ecore_memcpy_from(p_hwfn, p_ptt, &info->rdma_sent_pstats,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2453
ecore_memcpy_from(p_hwfn, p_ptt, &info->rdma_rcv_tstats,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2457
TSTORM_ROCE_EVENTS_STAT_OFFSET(p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2458
ecore_memcpy_from(p_hwfn, p_ptt, &info->roce.event_stats, addr,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2462
YSTORM_ROCE_DCQCN_RECEIVED_STATS_OFFSET(p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2463
ecore_memcpy_from(p_hwfn, p_ptt, &info->roce.dcqcn_rx_stats, addr,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2467
PSTORM_ROCE_DCQCN_SENT_STATS_OFFSET(p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2468
ecore_memcpy_from(p_hwfn, p_ptt, &info->roce.dcqcn_tx_stats, addr,
sys/dev/qlnx/qlnxe/ecore_rdma.c
247
static enum _ecore_status_t ecore_rdma_deactivate(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
2472
ecore_memcpy_from(p_hwfn, p_ptt, &info->iwarp.stats,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2476
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
251
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2514
ecore_rdma_dec_ref_cnt(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
252
p_hwfn->p_rdma_info->active = false;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2523
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2527
if (!p_hwfn->p_rdma_info)
sys/dev/qlnx/qlnxe/ecore_rdma.c
253
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2532
bitmap = p_hwfn->p_rdma_info->pd_map.bitmap;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2533
nbits = p_hwfn->p_rdma_info->pd_map.max_count;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2537
bitmap = p_hwfn->p_rdma_info->dpi_map.bitmap;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2538
nbits = p_hwfn->p_rdma_info->dpi_map.max_count;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2542
bitmap = p_hwfn->p_rdma_info->cq_map.bitmap;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2543
nbits = p_hwfn->p_rdma_info->cq_map.max_count;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2547
bitmap = p_hwfn->p_rdma_info->qp_map.bitmap;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2548
nbits = p_hwfn->p_rdma_info->qp_map.max_count;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2552
bitmap = p_hwfn->p_rdma_info->tid_map.bitmap;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2553
nbits = p_hwfn->p_rdma_info->tid_map.max_count;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2557
bitmap = p_hwfn->p_rdma_info->srq_map.bitmap;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2558
nbits = p_hwfn->p_rdma_info->srq_map.max_count;
sys/dev/qlnx/qlnxe/ecore_rdma.c
256
wait_count = p_hwfn->p_rdma_info->ref_cnt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2562
bitmap = p_hwfn->p_rdma_info->xrc_srq_map.bitmap;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2563
nbits = p_hwfn->p_rdma_info->xrc_srq_map.max_count;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2567
bitmap = p_hwfn->p_rdma_info->xrcd_map.bitmap;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2568
nbits = p_hwfn->p_rdma_info->xrcd_map.max_count;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2578
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
258
while (p_hwfn->p_rdma_info->ref_cnt) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
2580
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "cnq_id = %08x\n", params->cnq_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2589
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
2591
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "dpi = %08x\n", dpi);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2593
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2594
ecore_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->dpi_map, dpi);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2595
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2600
ecore_rdma_set_glob_cfg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2607
DP_VERBOSE(p_hwfn->p_dev, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
261
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2614
OSAL_MEMCPY(&glob_cfg, &p_hwfn->p_rdma_info->glob_cfg,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2619
DP_ERR(p_hwfn->p_dev, "invalid glob dscp %d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
2628
DP_ERR(p_hwfn->p_dev, "invalid glob_dscp_en %d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
263
p_hwfn->p_rdma_info->ref_cnt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
2637
DP_ERR(p_hwfn->p_dev, "invalid glob ecn %d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
2646
DP_ERR(p_hwfn->p_dev, "invalid glob ecn en %d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
2655
DP_ERR(p_hwfn->p_dev, "invalid glob vlan pri %d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
2664
DP_ERR(p_hwfn->p_dev, "invalid glob vlan pri en %d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
2672
OSAL_MEMCPY(&p_hwfn->p_rdma_info->glob_cfg, &glob_cfg,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2679
ecore_rdma_get_glob_cfg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
2682
OSAL_MEMCPY(out_params, &p_hwfn->p_rdma_info->glob_cfg,
sys/dev/qlnx/qlnxe/ecore_rdma.c
270
static enum _ecore_status_t ecore_rdma_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
272
struct ecore_rdma_info *p_rdma_info = p_hwfn->p_rdma_info;
sys/dev/qlnx/qlnxe/ecore_rdma.c
276
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Allocating RDMA\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
281
if (p_hwfn->hw_info.personality == ECORE_PCI_ETH_IWARP)
sys/dev/qlnx/qlnxe/ecore_rdma.c
286
num_cons = ecore_cxt_get_proto_cid_count(p_hwfn, p_rdma_info->proto,
sys/dev/qlnx/qlnxe/ecore_rdma.c
289
if (IS_IWARP(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_rdma.c
295
num_tasks = ecore_cxt_get_proto_tid_count(p_hwfn, PROTOCOLID_ROCE);
sys/dev/qlnx/qlnxe/ecore_rdma.c
303
p_rdma_info->queue_zone_base = (u16) RESC_START(p_hwfn, ECORE_L2_QUEUE);
sys/dev/qlnx/qlnxe/ecore_rdma.c
304
p_rdma_info->max_queue_zones = (u16) RESC_NUM(p_hwfn, ECORE_L2_QUEUE);
sys/dev/qlnx/qlnxe/ecore_rdma.c
307
p_rdma_info->dev = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*p_rdma_info->dev));
sys/dev/qlnx/qlnxe/ecore_rdma.c
311
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
318
p_rdma_info->port = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*p_rdma_info->port));
sys/dev/qlnx/qlnxe/ecore_rdma.c
321
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
327
rc = ecore_rdma_bmap_alloc(p_hwfn, &p_rdma_info->pd_map, RDMA_MAX_PDS,
sys/dev/qlnx/qlnxe/ecore_rdma.c
331
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
338
rc = ecore_rdma_bmap_alloc(p_hwfn, &p_rdma_info->xrcd_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
342
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
349
rc = ecore_rdma_bmap_alloc(p_hwfn, &p_rdma_info->dpi_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
350
p_hwfn->dpi_count, "DPI");
sys/dev/qlnx/qlnxe/ecore_rdma.c
353
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
361
rc = ecore_rdma_bmap_alloc(p_hwfn, &p_rdma_info->cq_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
365
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
375
rc = ecore_rdma_bmap_alloc(p_hwfn, &p_rdma_info->toggle_bits,
sys/dev/qlnx/qlnxe/ecore_rdma.c
379
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
385
rc = ecore_rdma_bmap_alloc(p_hwfn, &p_rdma_info->tid_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
389
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
395
rc = ecore_rdma_bmap_alloc(p_hwfn, &p_rdma_info->qp_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
399
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
405
rc = ecore_rdma_bmap_alloc(p_hwfn, &p_rdma_info->cid_map, num_cons,
sys/dev/qlnx/qlnxe/ecore_rdma.c
409
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
417
p_rdma_info->srq_id_offset = (u16)ecore_cxt_get_xrc_srq_count(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
418
rc = ecore_rdma_bmap_alloc(p_hwfn, &p_rdma_info->xrc_srq_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
421
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
427
p_rdma_info->num_srqs = ecore_cxt_get_srq_count(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
428
rc = ecore_rdma_bmap_alloc(p_hwfn, &p_rdma_info->srq_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
432
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_rdma.c
438
if (IS_IWARP(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_rdma.c
439
rc = ecore_iwarp_alloc(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
441
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
446
void ecore_rdma_bmap_free(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
463
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
474
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
499
DP_NOTICE(p_hwfn, false, "%s\n", str_last_line);
sys/dev/qlnx/qlnxe/ecore_rdma.c
503
OSAL_FREE(p_hwfn->p_dev, bmap->bitmap);
sys/dev/qlnx/qlnxe/ecore_rdma.c
507
void ecore_rdma_resc_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
509
if (IS_IWARP(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_rdma.c
510
ecore_iwarp_resc_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
512
ecore_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->cid_map, 1);
sys/dev/qlnx/qlnxe/ecore_rdma.c
513
ecore_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->qp_map, 1);
sys/dev/qlnx/qlnxe/ecore_rdma.c
514
ecore_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->pd_map, 1);
sys/dev/qlnx/qlnxe/ecore_rdma.c
515
ecore_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->xrcd_map, 1);
sys/dev/qlnx/qlnxe/ecore_rdma.c
516
ecore_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->dpi_map, 1);
sys/dev/qlnx/qlnxe/ecore_rdma.c
517
ecore_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->cq_map, 1);
sys/dev/qlnx/qlnxe/ecore_rdma.c
518
ecore_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->toggle_bits, 0);
sys/dev/qlnx/qlnxe/ecore_rdma.c
519
ecore_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->tid_map, 1);
sys/dev/qlnx/qlnxe/ecore_rdma.c
520
ecore_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->srq_map, 1);
sys/dev/qlnx/qlnxe/ecore_rdma.c
521
ecore_rdma_bmap_free(p_hwfn, &p_hwfn->p_rdma_info->xrc_srq_map, 1);
sys/dev/qlnx/qlnxe/ecore_rdma.c
523
OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_rdma_info->port);
sys/dev/qlnx/qlnxe/ecore_rdma.c
524
p_hwfn->p_rdma_info->port = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_rdma.c
526
OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_rdma_info->dev);
sys/dev/qlnx/qlnxe/ecore_rdma.c
527
p_hwfn->p_rdma_info->dev = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_rdma.c
530
static OSAL_INLINE void ecore_rdma_free_reserved_lkey(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
532
ecore_rdma_free_tid(p_hwfn, p_hwfn->p_rdma_info->dev->reserved_lkey);
sys/dev/qlnx/qlnxe/ecore_rdma.c
535
static void ecore_rdma_free_ilt(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
539
p_hwfn, ECORE_ELEM_CXT,
sys/dev/qlnx/qlnxe/ecore_rdma.c
540
ecore_cxt_get_proto_cid_start(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
541
p_hwfn->p_rdma_info->proto),
sys/dev/qlnx/qlnxe/ecore_rdma.c
542
ecore_cxt_get_proto_cid_count(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
543
p_hwfn->p_rdma_info->proto,
sys/dev/qlnx/qlnxe/ecore_rdma.c
549
ecore_cxt_free_ilt_range(p_hwfn, ECORE_ELEM_TASK, 0,
sys/dev/qlnx/qlnxe/ecore_rdma.c
55
enum _ecore_status_t ecore_rdma_bmap_alloc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
551
p_hwfn, PROTOCOLID_ROCE));
sys/dev/qlnx/qlnxe/ecore_rdma.c
554
ecore_cxt_free_ilt_range(p_hwfn, ECORE_ELEM_SRQ, 0,
sys/dev/qlnx/qlnxe/ecore_rdma.c
555
ecore_cxt_get_srq_count(p_hwfn));
sys/dev/qlnx/qlnxe/ecore_rdma.c
558
static void ecore_rdma_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
560
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
562
ecore_rdma_free_reserved_lkey(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
564
ecore_rdma_resc_free(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
566
ecore_rdma_free_ilt(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
569
static void ecore_rdma_get_guid(struct ecore_hwfn *p_hwfn, u8 *guid)
sys/dev/qlnx/qlnxe/ecore_rdma.c
573
OSAL_MEMCPY(&mac_addr[0], &p_hwfn->hw_info.hw_mac_addr[0], ETH_ALEN);
sys/dev/qlnx/qlnxe/ecore_rdma.c
585
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
590
events = &p_hwfn->p_rdma_info->events;
sys/dev/qlnx/qlnxe/ecore_rdma.c
598
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
601
struct ecore_rdma_device *dev = p_hwfn->p_rdma_info->dev;
sys/dev/qlnx/qlnxe/ecore_rdma.c
605
dev->vendor_id = p_hwfn->p_dev->vendor_id;
sys/dev/qlnx/qlnxe/ecore_rdma.c
606
dev->vendor_part_id = p_hwfn->p_dev->device_id;
sys/dev/qlnx/qlnxe/ecore_rdma.c
610
ecore_rdma_get_guid(p_hwfn, (u8 *)(&dev->sys_image_guid));
sys/dev/qlnx/qlnxe/ecore_rdma.c
616
if (p_hwfn->p_dev->rdma_max_sge) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
618
p_hwfn->p_dev->rdma_max_sge,
sys/dev/qlnx/qlnxe/ecore_rdma.c
62
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "max_count = %08x\n", max_count);
sys/dev/qlnx/qlnxe/ecore_rdma.c
628
if (p_hwfn->p_dev->rdma_max_srq_sge) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
630
p_hwfn->p_dev->rdma_max_srq_sge,
sys/dev/qlnx/qlnxe/ecore_rdma.c
635
dev->max_inline = (p_hwfn->p_dev->rdma_max_inline) ?
sys/dev/qlnx/qlnxe/ecore_rdma.c
637
p_hwfn->p_dev->rdma_max_inline,
sys/dev/qlnx/qlnxe/ecore_rdma.c
642
dev->max_cnq = (u8)FEAT_NUM(p_hwfn, ECORE_RDMA_CNQ);
sys/dev/qlnx/qlnxe/ecore_rdma.c
650
p_hwfn->p_rdma_info->num_qps);
sys/dev/qlnx/qlnxe/ecore_rdma.c
658
dev->max_mr = p_hwfn->p_rdma_info->num_mrs - 1;
sys/dev/qlnx/qlnxe/ecore_rdma.c
678
dev->max_srq = p_hwfn->p_rdma_info->num_srqs;
sys/dev/qlnx/qlnxe/ecore_rdma.c
689
dev->max_qp_resp_rd_atomic_resc * p_hwfn->p_rdma_info->num_qps;
sys/dev/qlnx/qlnxe/ecore_rdma.c
694
dev->max_stats_queues = (u8)RESC_NUM(p_hwfn, ECORE_RDMA_STATS_QUEUE);
sys/dev/qlnx/qlnxe/ecore_rdma.c
708
OSAL_PCI_READ_CONFIG_DWORD(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_rdma.c
716
if (IS_IWARP(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_rdma.c
717
ecore_iwarp_init_devinfo(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
721
struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
723
struct ecore_rdma_port *port = p_hwfn->p_rdma_info->port;
sys/dev/qlnx/qlnxe/ecore_rdma.c
724
struct ecore_rdma_device *dev = p_hwfn->p_rdma_info->dev;
sys/dev/qlnx/qlnxe/ecore_rdma.c
726
port->port_state = p_hwfn->mcp_info->link_output.link_up ?
sys/dev/qlnx/qlnxe/ecore_rdma.c
731
p_hwfn->p_dev->rdma_max_sge),
sys/dev/qlnx/qlnxe/ecore_rdma.c
738
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
74
bmap->bitmap = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, size_in_bytes);
sys/dev/qlnx/qlnxe/ecore_rdma.c
743
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Initializing HW\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
744
p_hwfn->b_rdma_enabled_in_prs = false;
sys/dev/qlnx/qlnxe/ecore_rdma.c
746
if (IS_IWARP(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_rdma.c
747
return ecore_iwarp_init_hw(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
749
ecore_wr(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
754
p_hwfn->rdma_prs_search_reg = PRS_REG_SEARCH_ROCE;
sys/dev/qlnx/qlnxe/ecore_rdma.c
760
ll2_ethertype_en = ecore_rd(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
763
ecore_wr(p_hwfn, p_ptt, PRS_REG_LIGHT_L2_ETHERTYPE_EN,
sys/dev/qlnx/qlnxe/ecore_rdma.c
767
if (ECORE_IS_BB_A0(p_hwfn->p_dev) && ECORE_IS_CMT(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
768
ecore_wr(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
77
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
772
ecore_wr(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
779
if (ecore_cxt_get_proto_cid_start(p_hwfn, PROTOCOLID_ROCE) % 2)
sys/dev/qlnx/qlnxe/ecore_rdma.c
781
DP_NOTICE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
787
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Initializing HW - Done\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
792
ecore_rdma_start_fw(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
810
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Starting FW\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
812
p_rdma_info = p_hwfn->p_rdma_info;
sys/dev/qlnx/qlnxe/ecore_rdma.c
819
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_rdma.c
822
rc = ecore_sp_init_request(p_hwfn, &p_ent, RDMA_RAMROD_FUNC_INIT,
sys/dev/qlnx/qlnxe/ecore_rdma.c
827
if (IS_IWARP(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
828
ecore_iwarp_init_fw_ramrod(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
833
rc = ecore_roce_dcqcn_cfg(p_hwfn, ¶ms->roce.dcqcn_params,
sys/dev/qlnx/qlnxe/ecore_rdma.c
836
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_rdma.c
845
p_hwfn, params->roce.ll2_handle);
sys/dev/qlnx/qlnxe/ecore_rdma.c
85
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "ECORE_SUCCESS\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
850
pheader->cnq_start_offset = (u8)RESC_START(p_hwfn, ECORE_RDMA_CNQ_RAM);
sys/dev/qlnx/qlnxe/ecore_rdma.c
859
ecore_cxt_get_ilt_page_size(p_hwfn, ILT_CLI_TSDM);
sys/dev/qlnx/qlnxe/ecore_rdma.c
868
sb_id = (u16)OSAL_GET_RDMA_SB_ID(p_hwfn, cnq_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
869
igu_sb_id = ecore_get_igu_sb_id(p_hwfn, sb_id);
sys/dev/qlnx/qlnxe/ecore_rdma.c
874
p_hwfn->pf_params.rdma_pf_params.gl_pi;
sys/dev/qlnx/qlnxe/ecore_rdma.c
889
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_rdma.c
89
enum _ecore_status_t ecore_rdma_bmap_alloc_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
897
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
900
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Allocate TID\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
902
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
903
rc = ecore_rdma_bmap_alloc_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
904
&p_hwfn->p_rdma_info->tid_map,
sys/dev/qlnx/qlnxe/ecore_rdma.c
906
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_rdma.c
908
DP_NOTICE(p_hwfn, false, "Failed in allocating tid\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
912
rc = ecore_cxt_dynamic_ilt_alloc(p_hwfn, ECORE_ELEM_TASK, *itid);
sys/dev/qlnx/qlnxe/ecore_rdma.c
914
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Allocate TID - done, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_rdma.c
919
struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_rdma.c
921
struct ecore_rdma_device *dev = p_hwfn->p_rdma_info->dev;
sys/dev/qlnx/qlnxe/ecore_rdma.c
927
ecore_rdma_alloc_tid(p_hwfn, &dev->reserved_lkey);
sys/dev/qlnx/qlnxe/ecore_rdma.c
930
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_rdma.c
938
static enum _ecore_status_t ecore_rdma_setup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.c
944
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "RDMA setup\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
946
ecore_rdma_init_devinfo(p_hwfn, params);
sys/dev/qlnx/qlnxe/ecore_rdma.c
947
ecore_rdma_init_port(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
948
ecore_rdma_init_events(p_hwfn, params);
sys/dev/qlnx/qlnxe/ecore_rdma.c
950
rc = ecore_rdma_reserve_lkey(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
954
rc = ecore_rdma_init_hw(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_rdma.c
958
if (IS_IWARP(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_rdma.c
959
rc = ecore_iwarp_setup(p_hwfn, params);
sys/dev/qlnx/qlnxe/ecore_rdma.c
963
rc = ecore_roce_setup(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
968
return ecore_rdma_start_fw(p_hwfn, p_ptt, params);
sys/dev/qlnx/qlnxe/ecore_rdma.c
973
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_rdma.c
981
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "RDMA stop\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
983
rc = ecore_rdma_deactivate(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
987
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
989
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Failed to acquire PTT\n");
sys/dev/qlnx/qlnxe/ecore_rdma.c
99
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "%s bitmap: allocated id %d\n",
sys/dev/qlnx/qlnxe/ecore_rdma.c
994
ecore_roce_stop_rl(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.c
998
ecore_wr(p_hwfn, p_ptt, p_hwfn->rdma_prs_search_reg, 0);
sys/dev/qlnx/qlnxe/ecore_rdma.c
999
p_hwfn->b_rdma_enabled_in_prs = false;
sys/dev/qlnx/qlnxe/ecore_rdma.h
234
enum _ecore_status_t ecore_rdma_info_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.h
235
void ecore_rdma_info_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.h
238
ecore_rdma_bmap_alloc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.h
244
ecore_rdma_bmap_free(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.h
249
ecore_rdma_bmap_alloc_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.h
254
ecore_bmap_set_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.h
259
ecore_bmap_release_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.h
264
ecore_bmap_test_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma.h
272
ecore_rdma_allocated_qps(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_rdma.h
274
u16 ecore_rdma_get_fw_srq_id(struct ecore_hwfn *p_hwfn, u16 id, bool is_xrc);
sys/dev/qlnx/qlnxe/ecore_rdma_api.h
290
ecore_rdma_set_glob_cfg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma_api.h
295
ecore_rdma_get_glob_cfg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma_api.h
767
ecore_rdma_start(void *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_rdma_api.h
781
u32 ecore_rdma_get_sb_id(struct ecore_hwfn *p_hwfn, u32 rel_sb_id);
sys/dev/qlnx/qlnxe/ecore_rdma_api.h
789
void ecore_rdma_resc_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_roce.c
1000
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, p_ramrod_res, ramrod_res_phys,
sys/dev/qlnx/qlnxe/ecore_roce.c
1007
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
1025
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "icid = %08x\n", qp->icid);
sys/dev/qlnx/qlnxe/ecore_roce.c
1033
OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev, &ramrod_res_phys,
sys/dev/qlnx/qlnxe/ecore_roce.c
1037
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
1045
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_roce.c
1048
rc = ecore_sp_init_request(p_hwfn, &p_ent, ROCE_RAMROD_DESTROY_QP,
sys/dev/qlnx/qlnxe/ecore_roce.c
1056
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_roce.c
1065
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_roce.c
1073
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Destroy requester, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_roce.c
1078
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, p_ramrod_res, ramrod_res_phys,
sys/dev/qlnx/qlnxe/ecore_roce.c
1085
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
1106
OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev, &resp_ramrod_res_phys,
sys/dev/qlnx/qlnxe/ecore_roce.c
1110
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
1118
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_roce.c
1120
rc = ecore_sp_init_request(p_hwfn, &p_ent, ROCE_RAMROD_QUERY_QP,
sys/dev/qlnx/qlnxe/ecore_roce.c
1128
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_roce.c
114
return ecore_sp_rl_update(p_hwfn, ¶ms);
sys/dev/qlnx/qlnxe/ecore_roce.c
1140
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, p_resp_ramrod_res,
sys/dev/qlnx/qlnxe/ecore_roce.c
1148
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
117
enum _ecore_status_t ecore_roce_stop_rl(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_roce.c
1174
OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev, &req_ramrod_res_phys,
sys/dev/qlnx/qlnxe/ecore_roce.c
1178
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
1186
rc = ecore_sp_init_request(p_hwfn, &p_ent, ROCE_RAMROD_QUERY_QP,
sys/dev/qlnx/qlnxe/ecore_roce.c
1194
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_roce.c
1209
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, p_req_ramrod_res,
sys/dev/qlnx/qlnxe/ecore_roce.c
121
if (!p_hwfn->p_rdma_info->roce.dcqcn_reaction_point)
sys/dev/qlnx/qlnxe/ecore_roce.c
1216
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
1222
rc = ecore_roce_sp_query_responder(p_hwfn, qp, out_params);
sys/dev/qlnx/qlnxe/ecore_roce.c
1226
rc = ecore_roce_sp_query_requester(p_hwfn, qp, out_params,
sys/dev/qlnx/qlnxe/ecore_roce.c
1236
enum _ecore_status_t ecore_roce_destroy_qp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
125
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "\n");
sys/dev/qlnx/qlnxe/ecore_roce.c
1253
DP_NOTICE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
1260
rc = ecore_roce_sp_destroy_qp_responder(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
1268
rc = ecore_roce_sp_destroy_qp_requester(p_hwfn, qp,
sys/dev/qlnx/qlnxe/ecore_roce.c
127
params.rl_id_first = (u8)RESC_START(p_hwfn, ECORE_RL);
sys/dev/qlnx/qlnxe/ecore_roce.c
1276
DP_NOTICE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
128
params.rl_id_last = RESC_START(p_hwfn, ECORE_RL) +
sys/dev/qlnx/qlnxe/ecore_roce.c
1283
ecore_roce_free_qp(p_hwfn, qp->qp_idx);
sys/dev/qlnx/qlnxe/ecore_roce.c
129
ecore_init_qm_get_num_pf_rls(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_roce.c
1293
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_roce.c
1299
DP_ERR(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_roce.c
1307
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_roce.c
1309
rc = ecore_sp_init_request(p_hwfn, &p_ent, ROCE_RAMROD_DESTROY_UD_QP,
sys/dev/qlnx/qlnxe/ecore_roce.c
1314
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_roce.c
1318
ecore_roce_free_qp(p_hwfn, ECORE_ROCE_ICID_TO_QP(cid));
sys/dev/qlnx/qlnxe/ecore_roce.c
132
return ecore_sp_rl_update(p_hwfn, ¶ms);
sys/dev/qlnx/qlnxe/ecore_roce.c
1320
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "freed a ud qp with cid=%d\n", cid);
sys/dev/qlnx/qlnxe/ecore_roce.c
1325
DP_ERR(p_hwfn, "failed destroying a ud qp with cid=%d\n", cid);
sys/dev/qlnx/qlnxe/ecore_roce.c
1333
struct ecore_hwfn *p_hwfn = (struct ecore_hwfn *)rdma_cxt;
sys/dev/qlnx/qlnxe/ecore_roce.c
1340
DP_ERR(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_roce.c
1346
rc = ecore_roce_alloc_qp_idx(p_hwfn, &qp_idx);
sys/dev/qlnx/qlnxe/ecore_roce.c
1355
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_roce.c
1357
rc = ecore_sp_init_request(p_hwfn, &p_ent, ROCE_RAMROD_CREATE_UD_QP,
sys/dev/qlnx/qlnxe/ecore_roce.c
1362
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_roce.c
1369
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "created a ud qp with icid=%d\n",
sys/dev/qlnx/qlnxe/ecore_roce.c
1375
ecore_roce_free_qp(p_hwfn, qp_idx);
sys/dev/qlnx/qlnxe/ecore_roce.c
1378
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "failed creating a ud qp\n");
sys/dev/qlnx/qlnxe/ecore_roce.c
1384
ecore_roce_modify_qp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
139
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
1402
rc = ecore_roce_wait_free_cids(p_hwfn, qp->qp_idx);
sys/dev/qlnx/qlnxe/ecore_roce.c
1406
rc = ecore_roce_sp_create_responder(p_hwfn, qp);
sys/dev/qlnx/qlnxe/ecore_roce.c
1413
rc = ecore_roce_sp_create_requester(p_hwfn, qp);
sys/dev/qlnx/qlnxe/ecore_roce.c
1418
rc = ecore_roce_sp_modify_responder(p_hwfn, qp, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
1426
rc = ecore_roce_sp_modify_responder(p_hwfn, qp, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
1431
rc = ecore_roce_sp_modify_requester(p_hwfn, qp, false, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
1439
rc = ecore_roce_sp_modify_requester(p_hwfn, qp, true, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
1447
rc = ecore_roce_sp_modify_responder(p_hwfn, qp, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
1452
rc = ecore_roce_sp_modify_requester(p_hwfn, qp, false, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
1460
rc = ecore_roce_sp_modify_responder(p_hwfn, qp, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
1465
rc = ecore_roce_sp_modify_requester(p_hwfn, qp, false, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
147
if (!p_hwfn->pf_params.rdma_pf_params.enable_dcqcn ||
sys/dev/qlnx/qlnxe/ecore_roce.c
1471
rc = ecore_roce_sp_modify_responder(p_hwfn, qp, true,
sys/dev/qlnx/qlnxe/ecore_roce.c
1476
rc = ecore_roce_sp_modify_requester(p_hwfn, qp, false, true,
sys/dev/qlnx/qlnxe/ecore_roce.c
148
p_hwfn->p_rdma_info->proto == PROTOCOLID_IWARP)
sys/dev/qlnx/qlnxe/ecore_roce.c
1484
rc = ecore_roce_sp_destroy_qp_responder(p_hwfn, qp,
sys/dev/qlnx/qlnxe/ecore_roce.c
1491
rc = ecore_roce_sp_destroy_qp_requester(p_hwfn, qp,
sys/dev/qlnx/qlnxe/ecore_roce.c
1499
DP_NOTICE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
1505
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "ECORE_SUCCESS\n");
sys/dev/qlnx/qlnxe/ecore_roce.c
151
p_hwfn->p_rdma_info->roce.dcqcn_enabled = 0;
sys/dev/qlnx/qlnxe/ecore_roce.c
1511
static void ecore_roce_free_icid(struct ecore_hwfn *p_hwfn, u16 icid)
sys/dev/qlnx/qlnxe/ecore_roce.c
1513
struct ecore_rdma_info *p_rdma_info = p_hwfn->p_rdma_info;
sys/dev/qlnx/qlnxe/ecore_roce.c
1516
start_cid = ecore_cxt_get_proto_cid_start(p_hwfn, p_rdma_info->proto);
sys/dev/qlnx/qlnxe/ecore_roce.c
1521
ecore_bmap_release_id(p_hwfn, &p_rdma_info->cid_map, cid);
sys/dev/qlnx/qlnxe/ecore_roce.c
1523
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_roce.c
1526
static void ecore_rdma_dpm_conf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
153
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_roce.c
1531
val = (p_hwfn->dcbx_no_edpm || p_hwfn->db_bar_no_edpm) ? 0 : 1;
sys/dev/qlnx/qlnxe/ecore_roce.c
1533
ecore_wr(p_hwfn, p_ptt, DORQ_REG_PF_DPM_ENABLE, val);
sys/dev/qlnx/qlnxe/ecore_roce.c
1534
DP_VERBOSE(p_hwfn, (ECORE_MSG_DCB | ECORE_MSG_RDMA),
sys/dev/qlnx/qlnxe/ecore_roce.c
1536
val, p_hwfn->dcbx_no_edpm, p_hwfn->db_bar_no_edpm);
sys/dev/qlnx/qlnxe/ecore_roce.c
1540
void ecore_roce_dpm_dcbx(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_roce.c
1548
val = (ecore_rdma_allocated_qps(p_hwfn)) ? true : false;
sys/dev/qlnx/qlnxe/ecore_roce.c
1549
p_hwfn->dcbx_no_edpm = (u8)val;
sys/dev/qlnx/qlnxe/ecore_roce.c
1551
ecore_rdma_dpm_conf(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_roce.c
1555
void ecore_rdma_dpm_bar(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt)
sys/dev/qlnx/qlnxe/ecore_roce.c
1557
p_hwfn->db_bar_no_edpm = true;
sys/dev/qlnx/qlnxe/ecore_roce.c
1559
ecore_rdma_dpm_conf(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_roce.c
1562
enum _ecore_status_t ecore_roce_setup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_roce.c
1564
return ecore_spq_register_async_cb(p_hwfn, PROTOCOLID_ROCE,
sys/dev/qlnx/qlnxe/ecore_roce.c
157
p_hwfn->p_rdma_info->roce.dcqcn_enabled = 1;
sys/dev/qlnx/qlnxe/ecore_roce.c
165
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA,
sys/dev/qlnx/qlnxe/ecore_roce.c
167
p_hwfn->p_rdma_info->roce.dcqcn_enabled = 1;
sys/dev/qlnx/qlnxe/ecore_roce.c
168
p_hwfn->p_rdma_info->roce.dcqcn_reaction_point = 1;
sys/dev/qlnx/qlnxe/ecore_roce.c
175
rc = ecore_roce_start_rl(p_hwfn, params);
sys/dev/qlnx/qlnxe/ecore_roce.c
184
ecore_wr(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
193
enum _ecore_status_t ecore_roce_stop(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_roce.c
195
struct ecore_bmap *cid_map = &p_hwfn->p_rdma_info->cid_map;
sys/dev/qlnx/qlnxe/ecore_roce.c
207
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
213
ecore_spq_unregister_async_cb(p_hwfn, PROTOCOLID_ROCE);
sys/dev/qlnx/qlnxe/ecore_roce.c
263
static void ecore_roce_free_cid_pair(struct ecore_hwfn *p_hwfn, u16 cid)
sys/dev/qlnx/qlnxe/ecore_roce.c
265
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_roce.c
266
ecore_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->qp_map, cid);
sys/dev/qlnx/qlnxe/ecore_roce.c
267
ecore_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->qp_map, cid + 1);
sys/dev/qlnx/qlnxe/ecore_roce.c
268
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_roce.c
272
static void ecore_roce_free_qp(struct ecore_hwfn *p_hwfn, u16 qp_idx)
sys/dev/qlnx/qlnxe/ecore_roce.c
274
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_roce.c
275
ecore_bmap_release_id(p_hwfn, &p_hwfn->p_rdma_info->qp_map, qp_idx);
sys/dev/qlnx/qlnxe/ecore_roce.c
276
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_roce.c
282
static enum _ecore_status_t ecore_roce_wait_free_cids(struct ecore_hwfn *p_hwfn, u32 qp_idx)
sys/dev/qlnx/qlnxe/ecore_roce.c
284
struct ecore_rdma_info *p_rdma_info = p_hwfn->p_rdma_info;
sys/dev/qlnx/qlnxe/ecore_roce.c
302
resp = ecore_bmap_test_id(p_hwfn, &p_rdma_info->cid_map, icid);
sys/dev/qlnx/qlnxe/ecore_roce.c
303
req = ecore_bmap_test_id(p_hwfn, &p_rdma_info->cid_map, icid + 1);
sys/dev/qlnx/qlnxe/ecore_roce.c
316
DP_ERR(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_roce.c
326
struct ecore_hwfn *p_hwfn, u16 *qp_idx16)
sys/dev/qlnx/qlnxe/ecore_roce.c
328
struct ecore_rdma_info *p_rdma_info = p_hwfn->p_rdma_info;
sys/dev/qlnx/qlnxe/ecore_roce.c
333
rc = ecore_rdma_bmap_alloc_id(p_hwfn, &p_rdma_info->qp_map, &qp_idx);
sys/dev/qlnx/qlnxe/ecore_roce.c
335
DP_NOTICE(p_hwfn, false, "failed to allocate qp\n");
sys/dev/qlnx/qlnxe/ecore_roce.c
343
rc = ecore_roce_wait_free_cids(p_hwfn, qp_idx);
sys/dev/qlnx/qlnxe/ecore_roce.c
355
start_cid = ecore_cxt_get_proto_cid_start(p_hwfn, p_rdma_info->proto);
sys/dev/qlnx/qlnxe/ecore_roce.c
358
rc = ecore_cxt_dynamic_ilt_alloc(p_hwfn, ECORE_ELEM_CXT, cid);
sys/dev/qlnx/qlnxe/ecore_roce.c
362
rc = ecore_cxt_dynamic_ilt_alloc(p_hwfn, ECORE_ELEM_CXT, cid + 1);
sys/dev/qlnx/qlnxe/ecore_roce.c
372
ecore_roce_free_qp(p_hwfn, (u16)qp_idx);
sys/dev/qlnx/qlnxe/ecore_roce.c
374
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_roce.c
379
static void ecore_roce_set_cid(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
382
OSAL_SPIN_LOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_roce.c
383
ecore_bmap_set_id(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
384
&p_hwfn->p_rdma_info->cid_map,
sys/dev/qlnx/qlnxe/ecore_roce.c
386
OSAL_SPIN_UNLOCK(&p_hwfn->p_rdma_info->lock);
sys/dev/qlnx/qlnxe/ecore_roce.c
390
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
406
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "qp_idx = %08x\n", qp->qp_idx);
sys/dev/qlnx/qlnxe/ecore_roce.c
410
qp->irq = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_roce.c
415
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
424
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_roce.c
427
rc = ecore_sp_init_request(p_hwfn, &p_ent, ROCE_RAMROD_CREATE_QP,
sys/dev/qlnx/qlnxe/ecore_roce.c
498
p_ramrod->cq_cid = OSAL_CPU_TO_LE32((p_hwfn->hw_info.opaque_fid << 16) | qp->rq_cq_id);
sys/dev/qlnx/qlnxe/ecore_roce.c
503
if (p_hwfn->p_rdma_info->roce.dcqcn_enabled)
sys/dev/qlnx/qlnxe/ecore_roce.c
505
ecore_get_cm_pq_idx_rl(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
510
regular_latency_queue = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);
sys/dev/qlnx/qlnxe/ecore_roce.c
511
low_latency_queue = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_LLT);
sys/dev/qlnx/qlnxe/ecore_roce.c
523
fw_srq_id = ecore_rdma_get_fw_srq_id(p_hwfn, qp->srq_id, is_xrc);
sys/dev/qlnx/qlnxe/ecore_roce.c
525
p_ramrod->srq_id.opaque_fid = OSAL_CPU_TO_LE16(p_hwfn->hw_info.opaque_fid);
sys/dev/qlnx/qlnxe/ecore_roce.c
527
p_ramrod->stats_counter_id = RESC_START(p_hwfn, ECORE_RDMA_STATS_QUEUE) +
sys/dev/qlnx/qlnxe/ecore_roce.c
530
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_roce.c
532
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "rc = %d regular physical queue = 0x%x, low latency physical queue 0x%x\n",
sys/dev/qlnx/qlnxe/ecore_roce.c
541
cid_start = ecore_cxt_get_proto_cid_start(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
542
p_hwfn->p_rdma_info->proto);
sys/dev/qlnx/qlnxe/ecore_roce.c
543
ecore_roce_set_cid(p_hwfn, qp->icid - cid_start);
sys/dev/qlnx/qlnxe/ecore_roce.c
548
DP_NOTICE(p_hwfn, false, "create responder - failed, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_roce.c
549
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_roce.c
559
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
573
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "icid = %08x\n", qp->icid);
sys/dev/qlnx/qlnxe/ecore_roce.c
577
qp->orq = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_roce.c
583
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
592
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_roce.c
595
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_roce.c
60
static void ecore_roce_free_icid(struct ecore_hwfn *p_hwfn, u16 icid);
sys/dev/qlnx/qlnxe/ecore_roce.c
63
ecore_roce_async_event(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
656
p_ramrod->cq_cid = OSAL_CPU_TO_LE32((p_hwfn->hw_info.opaque_fid << 16) |
sys/dev/qlnx/qlnxe/ecore_roce.c
661
if (p_hwfn->p_rdma_info->roce.dcqcn_enabled)
sys/dev/qlnx/qlnxe/ecore_roce.c
663
ecore_get_cm_pq_idx_rl(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
668
regular_latency_queue = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);
sys/dev/qlnx/qlnxe/ecore_roce.c
669
low_latency_queue = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_LLT);
sys/dev/qlnx/qlnxe/ecore_roce.c
680
p_ramrod->stats_counter_id = RESC_START(p_hwfn, ECORE_RDMA_STATS_QUEUE) +
sys/dev/qlnx/qlnxe/ecore_roce.c
683
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_roce.c
685
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_roce.c
693
cid_start = ecore_cxt_get_proto_cid_start(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
694
p_hwfn->p_rdma_info->proto);
sys/dev/qlnx/qlnxe/ecore_roce.c
695
ecore_roce_set_cid(p_hwfn, qp->icid + 1 - cid_start);
sys/dev/qlnx/qlnxe/ecore_roce.c
700
DP_NOTICE(p_hwfn, false, "Create requested - failed, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_roce.c
701
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_roce.c
710
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
723
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "icid = %08x\n", qp->icid);
sys/dev/qlnx/qlnxe/ecore_roce.c
731
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_roce.c
734
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_roce.c
739
DP_NOTICE(p_hwfn, false, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_roce.c
77
ecore_roce_free_icid(p_hwfn, icid);
sys/dev/qlnx/qlnxe/ecore_roce.c
79
p_hwfn->p_rdma_info->events.affiliated_event(
sys/dev/qlnx/qlnxe/ecore_roce.c
80
p_hwfn->p_rdma_info->events.context,
sys/dev/qlnx/qlnxe/ecore_roce.c
808
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_roce.c
810
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Modify responder, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_roce.c
815
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
829
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "icid = %08x\n", qp->icid);
sys/dev/qlnx/qlnxe/ecore_roce.c
837
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_roce.c
840
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_roce.c
844
DP_NOTICE(p_hwfn, false, "rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_roce.c
89
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
915
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_roce.c
917
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Modify requester, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_roce.c
922
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.c
94
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "\n");
sys/dev/qlnx/qlnxe/ecore_roce.c
940
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "icid = %08x\n", qp->icid);
sys/dev/qlnx/qlnxe/ecore_roce.c
952
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_roce.c
955
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_roce.c
963
p_ramrod_res = (struct roce_destroy_qp_resp_output_params *)OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_roce.c
969
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_roce.c
97
params.rl_id_first = (u8)RESC_START(p_hwfn, ECORE_RL);
sys/dev/qlnx/qlnxe/ecore_roce.c
977
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_roce.c
98
params.rl_id_last = RESC_START(p_hwfn, ECORE_RL) +
sys/dev/qlnx/qlnxe/ecore_roce.c
987
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_roce.c
99
ecore_init_qm_get_num_pf_rls(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_roce.c
995
DP_VERBOSE(p_hwfn, ECORE_MSG_RDMA, "Destroy responder, rc = %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_roce.h
41
ecore_roce_dpm_dcbx(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt);
sys/dev/qlnx/qlnxe/ecore_roce.h
44
ecore_rdma_dpm_bar(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt);
sys/dev/qlnx/qlnxe/ecore_roce.h
47
ecore_roce_dcqcn_cfg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.h
53
ecore_roce_setup(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_roce.h
56
ecore_roce_stop_rl(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_roce.h
59
ecore_roce_stop(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_roce.h
62
ecore_roce_query_qp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.h
67
ecore_roce_destroy_qp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.h
72
ecore_roce_alloc_qp_idx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce.h
75
#define IS_ECORE_DCQCN(p_hwfn) \
sys/dev/qlnx/qlnxe/ecore_roce.h
76
(!!(p_hwfn->pf_params.rdma_pf_params.enable_dcqcn))
sys/dev/qlnx/qlnxe/ecore_roce.h
88
ecore_roce_modify_qp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce_api.h
683
ecore_rdma_start(void *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_roce_api.h
697
u32 ecore_rdma_get_sb_id(void *p_hwfn, u32 rel_sb_id);
sys/dev/qlnx/qlnxe/ecore_roce_api.h
699
u32 ecore_rdma_query_cau_timer_res(void *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_roce_api.h
703
void ecore_rdma_resc_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_api.h
61
enum _ecore_status_t ecore_eth_cqe_completion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_api.h
80
ecore_sp_pf_update_tunn_cfg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
100
DP_NOTICE(p_hwfn, true, "Unknown SPQE completion mode %d\n",
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
105
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
213
ecore_tunn_set_pf_update_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
217
struct ecore_tunnel_info *p_tun = &p_hwfn->p_dev->tunnel;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
247
static void ecore_set_hw_tunn_mode(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
251
ecore_set_gre_enable(p_hwfn, p_ptt, p_tun->l2_gre.b_mode_enabled,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
253
ecore_set_vxlan_enable(p_hwfn, p_ptt, p_tun->vxlan.b_mode_enabled);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
255
ecore_set_geneve_enable(p_hwfn, p_ptt, p_tun->l2_geneve.b_mode_enabled,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
259
static void ecore_set_hw_tunn_mode_port(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
263
if (ECORE_IS_BB_A0(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
264
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
270
ecore_set_vxlan_dest_port(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
274
ecore_set_geneve_dest_port(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
277
ecore_set_hw_tunn_mode(p_hwfn, p_ptt, p_tunn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
281
ecore_tunn_set_pf_start_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
285
struct ecore_tunnel_info *p_tun = &p_hwfn->p_dev->tunnel;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
287
if (ECORE_IS_BB_A0(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
288
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
322
enum _ecore_status_t ecore_sp_pf_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
328
u16 sb = ecore_int_get_sp_sb_id(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
329
u8 sb_index = p_hwfn->p_eq->eq_sb_index;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
337
ecore_eq_prod_update(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
338
ecore_chain_get_prod_idx(&p_hwfn->p_eq->chain));
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
342
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
343
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
346
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
357
p_ramrod->path_id = ECORE_PATH_ID(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
363
if (OSAL_TEST_BIT(ECORE_MF_OVLAN_CLSS, &p_hwfn->p_dev->mf_bits))
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
369
OSAL_CPU_TO_LE16(p_hwfn->hw_info.ovlan);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
370
if (OSAL_TEST_BIT(ECORE_MF_8021Q_TAGGING, &p_hwfn->p_dev->mf_bits))
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
373
&p_hwfn->p_dev->mf_bits)) {
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
385
if (OSAL_TEST_BIT(ECORE_MF_UFP_SPECIFIC, &p_hwfn->p_dev->mf_bits)) {
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
386
if ((p_hwfn->ufp_info.pri_type == ECORE_UFP_PRI_OS) ||
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
387
(p_hwfn->p_dcbx_info->results.dcbx_enabled))
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
395
p_hwfn->p_eq->chain.pbl_sp.p_phys_table);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
396
page_cnt = (u8)ecore_chain_get_page_cnt(&p_hwfn->p_eq->chain);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
399
p_hwfn->p_consq->chain.pbl_sp.p_phys_table);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
401
ecore_tunn_set_pf_start_params(p_hwfn, p_tunn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
405
&p_hwfn->p_dev->mf_bits))
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
408
switch (p_hwfn->hw_info.personality) {
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
424
DP_NOTICE(p_hwfn, true, "Unknown personality %d\n",
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
425
p_hwfn->hw_info.personality);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
429
if (p_hwfn->p_dev->p_iov_info) {
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
430
struct ecore_hw_sriov_info *p_iov = p_hwfn->p_dev->p_iov_info;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
441
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
446
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
449
ecore_set_hw_tunn_mode_port(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
450
&p_hwfn->p_dev->tunnel);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
455
enum _ecore_status_t ecore_sp_pf_update_dcbx(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
463
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
464
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
467
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
473
ecore_dcbx_set_pf_update_params(&p_hwfn->p_dcbx_info->results,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
476
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
479
enum _ecore_status_t ecore_sp_pf_update_ufp(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
485
if (p_hwfn->ufp_info.pri_type == ECORE_UFP_PRI_UNKNOWN) {
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
486
DP_INFO(p_hwfn, "Invalid priority type %d\n",
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
487
p_hwfn->ufp_info.pri_type);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
493
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
494
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
497
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
504
if ((p_hwfn->ufp_info.pri_type == ECORE_UFP_PRI_OS) ||
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
505
(p_hwfn->p_dcbx_info->results.dcbx_enabled))
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
510
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
529
enum _ecore_status_t ecore_sp_rl_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
53
enum _ecore_status_t ecore_sp_init_request(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
539
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
540
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
543
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
568
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ, "rl_params: qcn_update_param_flg %x, dcqcn_update_param_flg %x, rl_init_flg %x, rl_start_flg %x, rl_stop_flg %x, rl_id_first %x, rl_id_last %x, rl_dc_qcn_flg %x, rl_bc_rate %x, rl_max_rate %x, rl_r_ai %x, rl_r_hai %x, dcqcn_g %x, dcqcn_k_us %x, dcqcn_timeuot_us %x, qcn_timeuot_us %x\n",
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
578
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
583
ecore_sp_pf_update_tunn_cfg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
593
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
594
return ecore_vf_pf_tunnel_param_update(p_hwfn, p_tunn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
596
if (ECORE_IS_BB_A0(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
597
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
607
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
608
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
612
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
618
ecore_tunn_set_pf_update_params(p_hwfn, p_tunn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
621
rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
625
ecore_set_hw_tunn_mode_port(p_hwfn, p_ptt, &p_hwfn->p_dev->tunnel);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
630
enum _ecore_status_t ecore_sp_pf_stop(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
638
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
639
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
642
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
648
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
651
enum _ecore_status_t ecore_sp_heartbeat_ramrod(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
659
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
660
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
663
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
669
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
67
rc = ecore_spq_get_entry(p_hwfn, pp_ent);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
672
enum _ecore_status_t ecore_sp_pf_update_stag(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
680
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
681
init_data.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
684
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
691
p_ent->ramrod.pf_update.mf_vlan = OSAL_CPU_TO_LE16(p_hwfn->hw_info.ovlan);
sys/dev/qlnx/qlnxe/ecore_sp_commands.c
693
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_sp_commands.h
108
enum _ecore_status_t ecore_sp_pf_update_dcbx(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.h
124
enum _ecore_status_t ecore_sp_pf_stop(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.h
134
enum _ecore_status_t ecore_sp_heartbeat_ramrod(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.h
163
enum _ecore_status_t ecore_sp_rl_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.h
174
enum _ecore_status_t ecore_sp_pf_update_stag(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.h
183
enum _ecore_status_t ecore_sp_pf_update_ufp(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sp_commands.h
64
enum _ecore_status_t ecore_sp_init_request(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sp_commands.h
90
enum _ecore_status_t ecore_sp_pf_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
1010
__ecore_spq_return_entry(p_hwfn, p_ent);
sys/dev/qlnx/qlnxe/ecore_spq.c
1016
enum _ecore_status_t ecore_spq_completion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
1026
if (!p_hwfn) {
sys/dev/qlnx/qlnxe/ecore_spq.c
1030
p_spq = p_hwfn->p_spq;
sys/dev/qlnx/qlnxe/ecore_spq.c
1067
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ,
sys/dev/qlnx/qlnxe/ecore_spq.c
1079
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_spq.c
1085
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ,
sys/dev/qlnx/qlnxe/ecore_spq.c
1090
found->comp_cb.function(p_hwfn, found->comp_cb.cookie, p_data,
sys/dev/qlnx/qlnxe/ecore_spq.c
1093
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ, "Got a completion without a callback function\n");
sys/dev/qlnx/qlnxe/ecore_spq.c
1101
ecore_spq_return_entry(p_hwfn, found);
sys/dev/qlnx/qlnxe/ecore_spq.c
1106
enum _ecore_status_t ecore_consq_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_spq.c
1111
p_consq = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*p_consq));
sys/dev/qlnx/qlnxe/ecore_spq.c
1113
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_spq.c
1119
if (ecore_chain_alloc(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_spq.c
1126
DP_NOTICE(p_hwfn, false, "Failed to allocate consq chain");
sys/dev/qlnx/qlnxe/ecore_spq.c
1130
p_hwfn->p_consq = p_consq;
sys/dev/qlnx/qlnxe/ecore_spq.c
1134
OSAL_FREE(p_hwfn->p_dev, p_consq);
sys/dev/qlnx/qlnxe/ecore_spq.c
1138
void ecore_consq_setup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_spq.c
1140
ecore_chain_reset(&p_hwfn->p_consq->chain);
sys/dev/qlnx/qlnxe/ecore_spq.c
1143
void ecore_consq_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_spq.c
1145
if (!p_hwfn->p_consq)
sys/dev/qlnx/qlnxe/ecore_spq.c
1148
ecore_chain_free(p_hwfn->p_dev, &p_hwfn->p_consq->chain);
sys/dev/qlnx/qlnxe/ecore_spq.c
1150
OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_consq);
sys/dev/qlnx/qlnxe/ecore_spq.c
1151
p_hwfn->p_consq = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_spq.c
122
static void ecore_spq_blocking_cb(struct ecore_hwfn *p_hwfn, void *cookie,
sys/dev/qlnx/qlnxe/ecore_spq.c
134
OSAL_SMP_WMB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_spq.c
137
static enum _ecore_status_t __ecore_spq_block(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
149
if (CHIP_REV_IS_EMUL(p_hwfn->p_dev) && sleep_between_iter)
sys/dev/qlnx/qlnxe/ecore_spq.c
154
OSAL_POLL_MODE_DPC(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_spq.c
155
OSAL_SMP_RMB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_spq.c
172
static enum _ecore_status_t ecore_spq_block(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
184
rc = __ecore_spq_block(p_hwfn, p_ent, p_fw_ret, false);
sys/dev/qlnx/qlnxe/ecore_spq.c
190
rc = __ecore_spq_block(p_hwfn, p_ent, p_fw_ret, true);
sys/dev/qlnx/qlnxe/ecore_spq.c
194
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_spq.c
198
DP_INFO(p_hwfn, "Ramrod is stuck, requesting MCP drain\n");
sys/dev/qlnx/qlnxe/ecore_spq.c
199
rc = ecore_mcp_drain(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_spq.c
200
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_spq.c
202
DP_NOTICE(p_hwfn, true, "MCP drain failed\n");
sys/dev/qlnx/qlnxe/ecore_spq.c
207
rc = __ecore_spq_block(p_hwfn, p_ent, p_fw_ret, true);
sys/dev/qlnx/qlnxe/ecore_spq.c
218
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_spq.c
224
ecore_hw_err_notify(p_hwfn, ECORE_HW_ERR_RAMROD_FAIL);
sys/dev/qlnx/qlnxe/ecore_spq.c
232
static enum _ecore_status_t ecore_spq_fill_entry(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
245
DP_NOTICE(p_hwfn, true, "Unknown SPQE completion mode %d\n",
sys/dev/qlnx/qlnxe/ecore_spq.c
250
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ,
sys/dev/qlnx/qlnxe/ecore_spq.c
265
static void ecore_spq_hw_initialize(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
275
rc = ecore_cxt_get_cid_info(p_hwfn, &cxt_info);
sys/dev/qlnx/qlnxe/ecore_spq.c
278
DP_NOTICE(p_hwfn, true, "Cannot find context info for cid=%d\n",
sys/dev/qlnx/qlnxe/ecore_spq.c
288
if (ECORE_IS_BB(p_hwfn->p_dev) || ECORE_IS_AH(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_spq.c
304
physical_q = ecore_get_cm_pq_idx(p_hwfn, PQ_FLAGS_LB);
sys/dev/qlnx/qlnxe/ecore_spq.c
313
p_hwfn->p_consq->chain.p_phys_addr);
sys/dev/qlnx/qlnxe/ecore_spq.c
316
static enum _ecore_status_t ecore_spq_hw_post(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
320
struct ecore_chain *p_chain = &p_hwfn->p_spq->chain;
sys/dev/qlnx/qlnxe/ecore_spq.c
328
DP_NOTICE(p_hwfn, true, "Failed to produce from SPQ chain\n");
sys/dev/qlnx/qlnxe/ecore_spq.c
338
OSAL_WMB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_spq.c
340
DOORBELL(p_hwfn, p_spq->db_addr_offset, *(u32 *)p_db_data);
sys/dev/qlnx/qlnxe/ecore_spq.c
343
OSAL_WMB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_spq.c
345
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ,
sys/dev/qlnx/qlnxe/ecore_spq.c
358
ecore_async_event_completion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
363
if (!p_hwfn->p_spq || (p_eqe->protocol_id >= MAX_PROTOCOL_TYPE)) {
sys/dev/qlnx/qlnxe/ecore_spq.c
367
cb = p_hwfn->p_spq->async_comp_cb[p_eqe->protocol_id];
sys/dev/qlnx/qlnxe/ecore_spq.c
369
return cb(p_hwfn, p_eqe->opcode, p_eqe->echo,
sys/dev/qlnx/qlnxe/ecore_spq.c
372
DP_NOTICE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
380
ecore_spq_register_async_cb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
384
if (!p_hwfn->p_spq || (protocol_id >= MAX_PROTOCOL_TYPE)) {
sys/dev/qlnx/qlnxe/ecore_spq.c
388
p_hwfn->p_spq->async_comp_cb[protocol_id] = cb;
sys/dev/qlnx/qlnxe/ecore_spq.c
393
ecore_spq_unregister_async_cb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
396
if (!p_hwfn->p_spq || (protocol_id >= MAX_PROTOCOL_TYPE)) {
sys/dev/qlnx/qlnxe/ecore_spq.c
400
p_hwfn->p_spq->async_comp_cb[protocol_id] = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_spq.c
406
void ecore_eq_prod_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
410
USTORM_EQE_CONS_OFFSET(p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_spq.c
412
REG_WR16(p_hwfn, addr, prod);
sys/dev/qlnx/qlnxe/ecore_spq.c
415
OSAL_MMIOWB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_spq.c
418
enum _ecore_status_t ecore_eq_completion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
429
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ, "fw_cons_idx %x\n", fw_cons_idx);
sys/dev/qlnx/qlnxe/ecore_spq.c
447
DP_VERBOSE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
462
ecore_iscsi_eq_dump(p_hwfn, p_eqe);
sys/dev/qlnx/qlnxe/ecore_spq.c
466
if (ecore_async_event_completion(p_hwfn, p_eqe))
sys/dev/qlnx/qlnxe/ecore_spq.c
468
} else if (ecore_spq_completion(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
478
ecore_eq_prod_update(p_hwfn, ecore_chain_get_prod_idx(p_chain));
sys/dev/qlnx/qlnxe/ecore_spq.c
481
OSAL_SPIN_LOCK(&p_hwfn->p_spq->lock);
sys/dev/qlnx/qlnxe/ecore_spq.c
482
rc = ecore_spq_pend_post(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_spq.c
483
OSAL_SPIN_UNLOCK(&p_hwfn->p_spq->lock);
sys/dev/qlnx/qlnxe/ecore_spq.c
488
enum _ecore_status_t ecore_eq_alloc(struct ecore_hwfn *p_hwfn, u16 num_elem)
sys/dev/qlnx/qlnxe/ecore_spq.c
493
p_eq = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*p_eq));
sys/dev/qlnx/qlnxe/ecore_spq.c
495
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_spq.c
501
if (ecore_chain_alloc(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_spq.c
508
DP_NOTICE(p_hwfn, false, "Failed to allocate eq chain\n");
sys/dev/qlnx/qlnxe/ecore_spq.c
513
ecore_int_register_cb(p_hwfn, ecore_eq_completion,
sys/dev/qlnx/qlnxe/ecore_spq.c
516
p_hwfn->p_eq = p_eq;
sys/dev/qlnx/qlnxe/ecore_spq.c
520
OSAL_FREE(p_hwfn->p_dev, p_eq);
sys/dev/qlnx/qlnxe/ecore_spq.c
524
void ecore_eq_setup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_spq.c
526
ecore_chain_reset(&p_hwfn->p_eq->chain);
sys/dev/qlnx/qlnxe/ecore_spq.c
529
void ecore_eq_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_spq.c
531
if (!p_hwfn->p_eq)
sys/dev/qlnx/qlnxe/ecore_spq.c
534
ecore_chain_free(p_hwfn->p_dev, &p_hwfn->p_eq->chain);
sys/dev/qlnx/qlnxe/ecore_spq.c
536
OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_eq);
sys/dev/qlnx/qlnxe/ecore_spq.c
537
p_hwfn->p_eq = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_spq.c
543
static enum _ecore_status_t ecore_cqe_completion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
547
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_spq.c
548
return OSAL_VF_CQE_COMPLETION(p_hwfn, cqe, protocol);
sys/dev/qlnx/qlnxe/ecore_spq.c
554
return ecore_spq_completion(p_hwfn, cqe->echo, 0, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_spq.c
557
enum _ecore_status_t ecore_eth_cqe_completion(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
562
rc = ecore_cqe_completion(p_hwfn, cqe, PROTOCOLID_ETH);
sys/dev/qlnx/qlnxe/ecore_spq.c
564
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_spq.c
575
void ecore_spq_setup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_spq.c
577
struct ecore_spq *p_spq = p_hwfn->p_spq;
sys/dev/qlnx/qlnxe/ecore_spq.c
616
ecore_cxt_acquire_cid(p_hwfn, PROTOCOLID_CORE, &p_spq->cid);
sys/dev/qlnx/qlnxe/ecore_spq.c
617
ecore_spq_hw_initialize(p_hwfn, p_spq);
sys/dev/qlnx/qlnxe/ecore_spq.c
633
db_addr = (void *)((u8 *)p_hwfn->doorbells + p_spq->db_addr_offset);
sys/dev/qlnx/qlnxe/ecore_spq.c
634
rc = ecore_db_recovery_add(p_hwfn->p_dev, db_addr, &p_spq->db_data,
sys/dev/qlnx/qlnxe/ecore_spq.c
637
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
641
enum _ecore_status_t ecore_spq_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_spq.c
650
OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(struct ecore_spq));
sys/dev/qlnx/qlnxe/ecore_spq.c
652
DP_NOTICE(p_hwfn, false, "Failed to allocate `struct ecore_spq'\n");
sys/dev/qlnx/qlnxe/ecore_spq.c
657
if (ecore_chain_alloc(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_spq.c
664
DP_NOTICE(p_hwfn, false, "Failed to allocate spq chain\n");
sys/dev/qlnx/qlnxe/ecore_spq.c
670
p_virt = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev, &p_phys,
sys/dev/qlnx/qlnxe/ecore_spq.c
681
if (OSAL_SPIN_LOCK_ALLOC(p_hwfn, &p_spq->lock))
sys/dev/qlnx/qlnxe/ecore_spq.c
685
p_hwfn->p_spq = p_spq;
sys/dev/qlnx/qlnxe/ecore_spq.c
689
ecore_chain_free(p_hwfn->p_dev, &p_spq->chain);
sys/dev/qlnx/qlnxe/ecore_spq.c
690
OSAL_FREE(p_hwfn->p_dev, p_spq);
sys/dev/qlnx/qlnxe/ecore_spq.c
694
void ecore_spq_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_spq.c
696
struct ecore_spq *p_spq = p_hwfn->p_spq;
sys/dev/qlnx/qlnxe/ecore_spq.c
704
db_addr = (void *)((u8 *)p_hwfn->doorbells + p_spq->db_addr_offset);
sys/dev/qlnx/qlnxe/ecore_spq.c
705
ecore_db_recovery_del(p_hwfn->p_dev, db_addr, &p_spq->db_data);
sys/dev/qlnx/qlnxe/ecore_spq.c
709
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_spq.c
716
ecore_chain_free(p_hwfn->p_dev, &p_spq->chain);
sys/dev/qlnx/qlnxe/ecore_spq.c
721
OSAL_FREE(p_hwfn->p_dev, p_spq);
sys/dev/qlnx/qlnxe/ecore_spq.c
722
p_hwfn->p_spq = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_spq.c
725
enum _ecore_status_t ecore_spq_get_entry(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
728
struct ecore_spq *p_spq = p_hwfn->p_spq;
sys/dev/qlnx/qlnxe/ecore_spq.c
735
p_ent = OSAL_ZALLOC(p_hwfn->p_dev, GFP_ATOMIC, sizeof(*p_ent));
sys/dev/qlnx/qlnxe/ecore_spq.c
737
DP_NOTICE(p_hwfn, false, "Failed to allocate an SPQ entry for a pending ramrod\n");
sys/dev/qlnx/qlnxe/ecore_spq.c
75
static void ecore_iscsi_eq_dump(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
758
static void __ecore_spq_return_entry(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
761
OSAL_LIST_PUSH_TAIL(&p_ent->list, &p_hwfn->p_spq->free_pool);
sys/dev/qlnx/qlnxe/ecore_spq.c
764
void ecore_spq_return_entry(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
767
OSAL_SPIN_LOCK(&p_hwfn->p_spq->lock);
sys/dev/qlnx/qlnxe/ecore_spq.c
768
__ecore_spq_return_entry(p_hwfn, p_ent);
sys/dev/qlnx/qlnxe/ecore_spq.c
769
OSAL_SPIN_UNLOCK(&p_hwfn->p_spq->lock);
sys/dev/qlnx/qlnxe/ecore_spq.c
786
static enum _ecore_status_t ecore_spq_add_entry(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
79
DP_NOTICE(p_hwfn, false, "Unknown iSCSI EQ: %x\n",
sys/dev/qlnx/qlnxe/ecore_spq.c
790
struct ecore_spq *p_spq = p_hwfn->p_spq;
sys/dev/qlnx/qlnxe/ecore_spq.c
818
OSAL_FREE(p_hwfn->p_dev, p_ent);
sys/dev/qlnx/qlnxe/ecore_spq.c
845
u32 ecore_spq_get_cid(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_spq.c
847
if (!p_hwfn->p_spq) {
sys/dev/qlnx/qlnxe/ecore_spq.c
850
return p_hwfn->p_spq->cid;
sys/dev/qlnx/qlnxe/ecore_spq.c
857
static enum _ecore_status_t ecore_spq_post_list(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
861
struct ecore_spq *p_spq = p_hwfn->p_spq;
sys/dev/qlnx/qlnxe/ecore_spq.c
880
rc = ecore_spq_hw_post(p_hwfn, p_spq, p_ent);
sys/dev/qlnx/qlnxe/ecore_spq.c
884
__ecore_spq_return_entry(p_hwfn, p_ent);
sys/dev/qlnx/qlnxe/ecore_spq.c
893
enum _ecore_status_t ecore_spq_pend_post(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_spq.c
895
struct ecore_spq *p_spq = p_hwfn->p_spq;
sys/dev/qlnx/qlnxe/ecore_spq.c
90
DP_VERBOSE(p_hwfn, ECORE_MSG_STORAGE,
sys/dev/qlnx/qlnxe/ecore_spq.c
914
ecore_spq_add_entry(p_hwfn, p_ent, p_ent->priority);
sys/dev/qlnx/qlnxe/ecore_spq.c
917
return ecore_spq_post_list(p_hwfn, &p_spq->pending,
sys/dev/qlnx/qlnxe/ecore_spq.c
92
p_hwfn->port_id, p_eqe->opcode,
sys/dev/qlnx/qlnxe/ecore_spq.c
921
enum _ecore_status_t ecore_spq_post(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_spq.c
926
struct ecore_spq *p_spq = p_hwfn ? p_hwfn->p_spq : OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_spq.c
929
if (!p_hwfn)
sys/dev/qlnx/qlnxe/ecore_spq.c
933
DP_NOTICE(p_hwfn, true, "Got a NULL pointer\n");
sys/dev/qlnx/qlnxe/ecore_spq.c
937
if (p_hwfn->p_dev->recov_in_prog) {
sys/dev/qlnx/qlnxe/ecore_spq.c
938
DP_VERBOSE(p_hwfn, ECORE_MSG_SPQ,
sys/dev/qlnx/qlnxe/ecore_spq.c
950
rc = ecore_spq_fill_entry(p_hwfn, p_ent);
sys/dev/qlnx/qlnxe/ecore_spq.c
957
rc = ecore_spq_add_entry(p_hwfn, p_ent, p_ent->priority);
sys/dev/qlnx/qlnxe/ecore_spq.c
961
rc = ecore_spq_pend_post(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_spq.c
979
rc = ecore_spq_block(p_hwfn, p_ent, fw_return_code,
sys/dev/qlnx/qlnxe/ecore_spq.c
986
OSAL_FREE(p_hwfn->p_dev, p_ent);
sys/dev/qlnx/qlnxe/ecore_spq.c
998
ecore_spq_return_entry(p_hwfn, p_ent);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1003
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1008
ecore_init_cau_sb_entry(p_hwfn, &sb_entry,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1009
p_hwfn->rel_pf_id,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1012
ecore_dmae_host2grc(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1035
static void ecore_iov_free_vf_igu_sbs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
104
static enum _ecore_status_t ecore_sp_vf_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1040
struct ecore_igu_info *p_info = p_hwfn->hw_info.p_igu_info;
sys/dev/qlnx/qlnxe/ecore_sriov.c
1050
val = ecore_rd(p_hwfn, p_ptt, addr);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1052
ecore_wr(p_hwfn, p_ptt, addr, val);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1055
p_hwfn->hw_info.p_igu_info->usage.free_cnt_iov++;
sys/dev/qlnx/qlnxe/ecore_sriov.c
1061
void ecore_iov_set_link(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1067
struct ecore_vf_info *p_vf = ecore_iov_get_vf_info(p_hwfn, vfid, false);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1099
ecore_iov_init_hw_for_vf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1113
vf = ecore_iov_get_vf_info(p_hwfn, p_params->rel_vf_id, false);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1115
DP_ERR(p_hwfn, "ecore_iov_init_hw_for_vf : vf is OSAL_NULL\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
1120
DP_NOTICE(p_hwfn, true, "VF[%d] is already active.\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
1126
if (p_params->vport_id >= RESC_NUM(p_hwfn, ECORE_VPORT)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
1127
DP_NOTICE(p_hwfn, true, "VF[%d] - can't use VPORT %02x\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
1133
(p_params->rss_eng_id >= RESC_NUM(p_hwfn, ECORE_RSS_ENG))) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
1134
DP_NOTICE(p_hwfn, true, "VF[%d] - can't use RSS_ENG %02x\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
1141
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1146
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_sriov.c
115
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1159
if (qid > (u16)RESC_NUM(p_hwfn, ECORE_L2_QUEUE)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
1160
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1163
(u16)RESC_NUM(p_hwfn, ECORE_L2_QUEUE));
sys/dev/qlnx/qlnxe/ecore_sriov.c
1168
if (qid > (u16)RESC_NUM(p_hwfn, ECORE_L2_QUEUE)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
1169
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1172
(u16)RESC_NUM(p_hwfn, ECORE_L2_QUEUE));
sys/dev/qlnx/qlnxe/ecore_sriov.c
1178
ecore_cxt_get_proto_cid_count(p_hwfn, PROTOCOLID_ETH, &cids);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1179
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1184
num_of_vf_avaiable_chains = ecore_iov_alloc_vf_igu_sbs(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1189
DP_ERR(p_hwfn, "no available igu sbs\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
119
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1203
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1211
OSAL_MEMCPY(&link_params, ecore_mcp_get_link_params(p_hwfn),
sys/dev/qlnx/qlnxe/ecore_sriov.c
1213
OSAL_MEMCPY(&link_state, ecore_mcp_get_link_state(p_hwfn),
sys/dev/qlnx/qlnxe/ecore_sriov.c
1215
OSAL_MEMCPY(&link_caps, ecore_mcp_get_link_capabilities(p_hwfn),
sys/dev/qlnx/qlnxe/ecore_sriov.c
1217
ecore_iov_set_link(p_hwfn, p_params->rel_vf_id,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1220
rc = ecore_iov_enable_vf_access(p_hwfn, p_ptt, vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1225
p_hwfn->pf_iov_info->active_vfs[vf->relative_vf_id / 64] |=
sys/dev/qlnx/qlnxe/ecore_sriov.c
1229
if (IS_LEAD_HWFN(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_sriov.c
1230
p_hwfn->p_dev->p_iov_info->num_vfs++;
sys/dev/qlnx/qlnxe/ecore_sriov.c
1236
enum _ecore_status_t ecore_iov_release_hw_for_vf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1245
vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1247
DP_ERR(p_hwfn, "ecore_iov_release_hw_for_vf : vf is NULL\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
1261
OSAL_MEMCPY(¶ms, ecore_mcp_get_link_params(p_hwfn), sizeof(params));
sys/dev/qlnx/qlnxe/ecore_sriov.c
1262
OSAL_MEMCPY(&link, ecore_mcp_get_link_state(p_hwfn), sizeof(link));
sys/dev/qlnx/qlnxe/ecore_sriov.c
1263
OSAL_MEMCPY(&caps, ecore_mcp_get_link_capabilities(p_hwfn),
sys/dev/qlnx/qlnxe/ecore_sriov.c
1265
ecore_iov_set_link(p_hwfn, rel_vf_id, ¶ms, &link, &caps);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1274
ecore_iov_vf_igu_set_int(p_hwfn, p_ptt, vf, 0);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1277
ecore_iov_config_perm_table(p_hwfn, p_ptt, vf, 0);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1281
ecore_iov_free_vf_igu_sbs(p_hwfn, p_ptt, vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1286
p_hwfn->pf_iov_info->active_vfs[vf->relative_vf_id / 64] &=
sys/dev/qlnx/qlnxe/ecore_sriov.c
1290
if (IS_LEAD_HWFN(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_sriov.c
1291
p_hwfn->p_dev->p_iov_info->num_vfs--;
sys/dev/qlnx/qlnxe/ecore_sriov.c
130
switch (p_hwfn->hw_info.personality) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
1302
static void ecore_iov_lock_vf_pf_channel(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1314
DP_VERBOSE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1320
DP_VERBOSE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1326
static void ecore_iov_unlock_vf_pf_channel(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1342
DP_VERBOSE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1348
DP_VERBOSE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1373
void ecore_dp_tlv_list(struct ecore_hwfn *p_hwfn, void *tlvs_list)
sys/dev/qlnx/qlnxe/ecore_sriov.c
1384
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1389
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
139
DP_NOTICE(p_hwfn, true, "Unknown VF personality %d\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
1398
DP_NOTICE(p_hwfn, false, "TLV of length 0 found\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
140
p_hwfn->hw_info.personality);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1405
DP_NOTICE(p_hwfn, false, "TLV ==> Buffer overflow\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
1413
static void ecore_iov_send_response(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1429
ecore_dp_tlv_list(p_hwfn, mbx->reply_virt);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1445
ecore_dmae_host2host(p_hwfn, p_ptt, mbx->reply_phys + sizeof(u64),
sys/dev/qlnx/qlnxe/ecore_sriov.c
1455
REG_WR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1460
ecore_dmae_host2host(p_hwfn, p_ptt, mbx->reply_phys,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1464
OSAL_IOV_PF_RESP_TYPE(p_hwfn, p_vf->relative_vf_id, status);
sys/dev/qlnx/qlnxe/ecore_sriov.c
147
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1491
static u16 ecore_iov_prep_vp_update_resp_tlvs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1520
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1535
static void ecore_iov_prepare_resp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1548
ecore_iov_send_response(p_hwfn, p_ptt, vf_info, length, status);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1551
struct ecore_public_vf_info * ecore_iov_get_public_vf_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1557
vf = ecore_iov_get_vf_info(p_hwfn, relative_vf_id, b_enabled_only);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1564
static void ecore_iov_vf_cleanup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
158
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1586
ecore_eth_queue_cid_release(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1594
OSAL_IOV_VF_CLEANUP(p_hwfn, p_vf->relative_vf_id);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1598
static u32 ecore_iov_vf_db_bar_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1601
u32 val = ecore_rd(p_hwfn, p_ptt, PGLUE_B_REG_VF_BAR1_SIZE);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1609
ecore_iov_vf_mbx_acquire_resc_cids(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1615
u8 num_vf_cons = p_hwfn->pf_params.eth_pf_params.num_vf_cons;
sys/dev/qlnx/qlnxe/ecore_sriov.c
162
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1636
bar_size = ecore_iov_vf_db_bar_size(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1640
if (ECORE_IS_CMT(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_sriov.c
165
static enum _ecore_status_t ecore_sp_vf_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1651
static u8 ecore_iov_vf_mbx_acquire_resc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1676
ecore_fw_l2_queue(p_hwfn, p_vf->vf_queues[i].fw_rx_qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1687
ecore_iov_vf_mbx_acquire_resc_cids(p_hwfn, p_ptt, p_vf, p_req, p_resp);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1702
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1746
static void ecore_iov_vf_mbx_acquire(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
176
init_data.cid = ecore_spq_get_cid(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1773
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1790
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1796
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
180
rc = ecore_sp_init_request(p_hwfn, &p_ent,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1808
if (ECORE_IS_CMT(p_hwfn->p_dev) &&
sys/dev/qlnx/qlnxe/ecore_sriov.c
1810
DP_INFO(p_hwfn, "VF[%d] is running an old driver that doesn't support 100g\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
1816
if (OSAL_IOV_VF_ACQUIRE(p_hwfn, vf->relative_vf_id) != ECORE_SUCCESS) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
1832
pfdev_info->chip_num = p_hwfn->p_dev->chip_num;
sys/dev/qlnx/qlnxe/ecore_sriov.c
1838
if (ECORE_IS_CMT(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_sriov.c
1848
resp->pfdev_info.bar_size = (u8)ecore_iov_vf_db_bar_size(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1853
OSAL_MEMCPY(pfdev_info->port_mac, p_hwfn->hw_info.hw_mac_addr,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1867
ecore_mcp_get_mfw_ver(p_hwfn, p_ptt, &pfdev_info->mfw_ver,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1870
pfdev_info->dev_type = p_hwfn->p_dev->type;
sys/dev/qlnx/qlnxe/ecore_sriov.c
1871
pfdev_info->chip_rev = p_hwfn->p_dev->chip_rev;
sys/dev/qlnx/qlnxe/ecore_sriov.c
1876
vfpf_status = ecore_iov_vf_mbx_acquire_resc(p_hwfn, p_ptt, vf,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1882
rc = ecore_sp_vf_start(p_hwfn, vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1884
DP_NOTICE(p_hwfn, true, "Failed to start VF[%02x]\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
1894
ecore_iov_post_vf_bulletin(p_hwfn, vf->relative_vf_id, p_ptt);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1896
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
190
return ecore_spq_post(p_hwfn, p_ent, OSAL_NULL);
sys/dev/qlnx/qlnxe/ecore_sriov.c
1909
ecore_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_ACQUIRE,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1914
static enum _ecore_status_t __ecore_iov_spoofchk_set(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1921
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
193
bool ecore_iov_is_valid_vfid(struct ecore_hwfn *p_hwfn, int rel_vf_id,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1933
rc = ecore_sp_vport_update(p_hwfn, ¶ms, ECORE_SPQ_MODE_EBLOCK,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1938
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1941
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1949
static enum _ecore_status_t ecore_iov_reconfigure_unicast_vlan(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
196
if (!p_hwfn->pf_iov_info) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
1969
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
197
DP_NOTICE(p_hwfn->p_dev, true, "No iov info\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
1972
rc = ecore_sp_eth_filter_ucast(p_hwfn, p_vf->opaque_fid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1975
DP_NOTICE(p_hwfn, true, "Failed to configure VLAN [%04x] to VF [%04x]\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
1986
ecore_iov_reconfigure_unicast_shadow(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
1996
rc = ecore_iov_reconfigure_unicast_vlan(p_hwfn, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2002
ecore_iov_configure_vport_forced(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
201
if ((rel_vf_id >= p_hwfn->p_dev->p_iov_info->total_vfs) ||
sys/dev/qlnx/qlnxe/ecore_sriov.c
2026
rc = ecore_sp_eth_filter_ucast(p_hwfn, p_vf->opaque_fid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2030
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
205
if ((!p_hwfn->pf_iov_info->vfs_array[rel_vf_id].b_init) &&
sys/dev/qlnx/qlnxe/ecore_sriov.c
2053
rc = ecore_sp_eth_filter_ucast(p_hwfn, p_vf->opaque_fid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2057
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2076
rc = ecore_sp_vport_update(p_hwfn, &vport_update,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2080
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
209
if ((p_hwfn->pf_iov_info->vfs_array[rel_vf_id].b_malicious) &&
sys/dev/qlnx/qlnxe/ecore_sriov.c
2095
rc = ecore_sp_eth_rx_queues_update(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2101
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2118
ecore_iov_reconfigure_unicast_shadow(p_hwfn, p_vf, events);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2123
static void ecore_iov_vf_mbx_start_vport(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2136
vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vf->relative_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2138
DP_NOTICE(p_hwfn->p_dev, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2147
ecore_iov_enable_vf_traffic(p_hwfn, p_ptt, vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2152
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2158
ecore_int_cau_conf_sb(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
216
struct ecore_vf_info *ecore_iov_get_vf_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2185
if (CHIP_REV_IS_FPGA(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
2186
DP_NOTICE(p_hwfn, false, "FPGA: Don't configure VF for Tx-switching [no pVFC]\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
2201
rc = OSAL_IOV_PRE_START_VPORT(p_hwfn, vf->relative_vf_id, ¶ms);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2203
DP_ERR(p_hwfn, "OSAL_IOV_PRE_START_VPORT returned error %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2209
rc = ecore_sp_eth_vport_start(p_hwfn, ¶ms);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2211
DP_ERR(p_hwfn, "ecore_iov_vf_mbx_start_vport returned error %d\n", rc);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2217
ecore_iov_configure_vport_forced(p_hwfn, vf, *p_bitmap);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2218
OSAL_IOV_POST_START_VPORT(p_hwfn, vf->relative_vf_id,
sys/dev/qlnx/qlnxe/ecore_sriov.c
222
if (!p_hwfn->pf_iov_info) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
2220
__ecore_iov_spoofchk_set(p_hwfn, vf, vf->req_spoofchk_val);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2225
ecore_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_VPORT_START,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2229
static void ecore_iov_vf_mbx_stop_vport(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
223
DP_NOTICE(p_hwfn->p_dev, true, "No iov info\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
2236
OSAL_IOV_VF_VPORT_STOP(p_hwfn, vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2243
DP_NOTICE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2250
rc = ecore_sp_vport_stop(p_hwfn, vf->opaque_fid, vf->vport_id);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2252
DP_ERR(p_hwfn, "ecore_iov_vf_mbx_stop_vport returned error %d\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
2262
ecore_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_VPORT_TEARDOWN,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2266
static void ecore_iov_vf_mbx_start_rxq_resp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
227
if (ecore_iov_is_valid_vfid(p_hwfn, relative_vf_id,
sys/dev/qlnx/qlnxe/ecore_sriov.c
229
vf = &p_hwfn->pf_iov_info->vfs_array[relative_vf_id];
sys/dev/qlnx/qlnxe/ecore_sriov.c
2300
ecore_iov_send_response(p_hwfn, p_ptt, vf, length, status);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2303
static u8 ecore_iov_vf_mbx_qid(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
231
DP_ERR(p_hwfn, "ecore_iov_get_vf_info: VF[%d] is not enabled\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
2319
ecore_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2322
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2330
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2339
static void ecore_iov_vf_mbx_start_rxq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2356
if (!ecore_iov_validate_rxq(p_hwfn, vf, req->rx_qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2358
!ecore_iov_validate_sb(p_hwfn, vf, req->hw_sb))
sys/dev/qlnx/qlnxe/ecore_sriov.c
2361
qid_usage_idx = ecore_iov_vf_mbx_qid(p_hwfn, vf, false);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2389
p_cid = ecore_eth_queue_to_cid(p_hwfn, vf->opaque_fid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2398
REG_WR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2403
rc = ecore_eth_rxq_start_ramrod(p_hwfn, p_cid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2410
ecore_eth_queue_cid_release(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2419
ecore_iov_vf_mbx_start_rxq_resp(p_hwfn, p_ptt, vf, status,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2486
static void ecore_iov_vf_mbx_update_tunn_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2490
struct ecore_tunnel_info *p_tun = &p_hwfn->p_dev->tunnel;
sys/dev/qlnx/qlnxe/ecore_sriov.c
2507
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2539
rc = OSAL_PF_VALIDATE_MODIFY_TUNN_CONFIG(p_hwfn, &tunn_feature_mask,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2549
rc = ecore_sp_pf_update_tunn_cfg(p_hwfn, p_ptt, &tunn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2556
ecore_for_each_vf(p_hwfn, i) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
2557
ecore_iov_bulletin_set_udp_ports(p_hwfn, i,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2571
ecore_iov_send_response(p_hwfn, p_ptt, p_vf, sizeof(*p_resp), status);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2574
static void ecore_iov_vf_mbx_start_txq_resp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2608
ecore_iov_send_response(p_hwfn, p_ptt, p_vf, length, status);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2611
static void ecore_iov_vf_mbx_start_txq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2631
if (!ecore_iov_validate_txq(p_hwfn, vf, req->tx_qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2633
!ecore_iov_validate_sb(p_hwfn, vf, req->hw_sb))
sys/dev/qlnx/qlnxe/ecore_sriov.c
2636
qid_usage_idx = ecore_iov_vf_mbx_qid(p_hwfn, vf, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2663
p_cid = ecore_eth_queue_to_cid(p_hwfn, vf->opaque_fid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2668
pq = ecore_get_cm_pq_idx_vf(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2670
rc = ecore_eth_txq_start_ramrod(p_hwfn, p_cid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2674
ecore_eth_queue_cid_release(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2683
ecore_iov_vf_mbx_start_txq_resp(p_hwfn, p_ptt, vf,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2687
static enum _ecore_status_t ecore_iov_vf_stop_rxqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2696
if (!ecore_iov_validate_rxq(p_hwfn, vf, rxq_id,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2698
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2714
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2722
rc = ecore_eth_rx_queue_stop(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2734
static enum _ecore_status_t ecore_iov_vf_stop_txqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2742
if (!ecore_iov_validate_txq(p_hwfn, vf, txq_id,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2751
rc = ecore_eth_tx_queue_stop(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2760
static void ecore_iov_vf_mbx_stop_rxqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2777
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2785
qid_usage_idx = ecore_iov_vf_mbx_qid(p_hwfn, vf, false);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2789
rc = ecore_iov_vf_stop_rxqs(p_hwfn, vf, req->rx_qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2794
ecore_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_STOP_RXQS,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2798
static void ecore_iov_vf_mbx_stop_txqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2815
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2823
qid_usage_idx = ecore_iov_vf_mbx_qid(p_hwfn, vf, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
2827
rc = ecore_iov_vf_stop_txqs(p_hwfn, vf, req->tx_qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2833
ecore_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_STOP_TXQS,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2837
static void ecore_iov_vf_mbx_update_rxqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2856
qid_usage_idx = ecore_iov_vf_mbx_qid(p_hwfn, vf, false);
sys/dev/qlnx/qlnxe/ecore_sriov.c
286
static bool ecore_iov_validate_rxq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2866
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2876
if (!ecore_iov_validate_rxq(p_hwfn, vf, i,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2880
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2894
rc = ecore_sp_eth_rx_queues_update(p_hwfn, (void **)&handlers,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2905
ecore_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_UPDATE_RXQ,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2909
void *ecore_iov_search_list_tlvs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2917
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
292
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2923
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2934
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2944
ecore_iov_vp_update_act_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2952
ecore_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2965
ecore_iov_vp_update_vlan_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2974
ecore_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2991
ecore_iov_vp_update_tx_switch(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
2999
ecore_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3005
if (CHIP_REV_IS_FPGA(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
3006
DP_NOTICE(p_hwfn, false, "FPGA: Ignore tx-switching configuration originating from VFs\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
301
static bool ecore_iov_validate_txq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3017
ecore_iov_vp_update_mcast_bin_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3026
ecore_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3038
ecore_iov_vp_update_accept_flag(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3047
ecore_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3060
ecore_iov_vp_update_accept_any_vlan(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3069
ecore_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
307
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3081
ecore_iov_vp_update_rss_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3095
ecore_iov_search_list_tlvs(p_hwfn, p_mbx->req_virt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3127
if (!ecore_iov_validate_rxq(p_hwfn, vf, q_idx,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3129
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3148
ecore_iov_vp_update_sge_tpa_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3158
ecore_iov_search_list_tlvs(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
316
static bool ecore_iov_validate_sb(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3205
static void ecore_iov_vf_mbx_vport_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3220
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3227
p_rss_params = OSAL_VZALLOC(p_hwfn->p_dev, sizeof(*p_rss_params));
sys/dev/qlnx/qlnxe/ecore_sriov.c
3241
ecore_iov_vp_update_act_param(p_hwfn, ¶ms, mbx, &tlvs_mask);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3242
ecore_iov_vp_update_vlan_param(p_hwfn, ¶ms, vf, mbx, &tlvs_mask);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3243
ecore_iov_vp_update_tx_switch(p_hwfn, ¶ms, mbx, &tlvs_mask);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3244
ecore_iov_vp_update_mcast_bin_param(p_hwfn, ¶ms, mbx, &tlvs_mask);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3245
ecore_iov_vp_update_accept_flag(p_hwfn, ¶ms, mbx, &tlvs_mask);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3246
ecore_iov_vp_update_accept_any_vlan(p_hwfn, ¶ms, mbx, &tlvs_mask);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3247
ecore_iov_vp_update_sge_tpa_param(p_hwfn, ¶ms,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3256
ecore_iov_vp_update_rss_param(p_hwfn, vf, ¶ms, p_rss_params,
sys/dev/qlnx/qlnxe/ecore_sriov.c
326
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3264
if (OSAL_IOV_VF_VPORT_UPDATE(p_hwfn, vf->relative_vf_id,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3274
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3277
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3283
rc = ecore_sp_vport_update(p_hwfn, ¶ms, ECORE_SPQ_MODE_EBLOCK,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3290
OSAL_VFREE(p_hwfn->p_dev, p_rss_params);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3291
length = ecore_iov_prep_vp_update_resp_tlvs(p_hwfn, vf, mbx, status,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3293
ecore_iov_send_response(p_hwfn, p_ptt, vf, length, status);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3296
static enum _ecore_status_t ecore_iov_vf_update_vlan_shadow(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3312
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3341
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3352
static enum _ecore_status_t ecore_iov_vf_update_mac_shadow(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3381
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3401
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3408
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3417
ecore_iov_vf_update_unicast_shadow(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3424
rc = ecore_iov_vf_update_mac_shadow(p_hwfn, p_vf, p_params);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3430
rc = ecore_iov_vf_update_vlan_shadow(p_hwfn, p_vf, p_params);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3435
static void ecore_iov_vf_mbx_ucast_filter(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3460
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3470
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3481
if (ecore_iov_vf_update_unicast_shadow(p_hwfn, vf, ¶ms) !=
sys/dev/qlnx/qlnxe/ecore_sriov.c
3508
rc = OSAL_IOV_CHK_UCAST(p_hwfn, vf->relative_vf_id, ¶ms);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3516
rc = ecore_sp_eth_filter_ucast(p_hwfn, vf->opaque_fid, ¶ms,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3522
ecore_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_UCAST_FILTER,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3526
static void ecore_iov_vf_mbx_int_cleanup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3534
ecore_int_igu_init_pure_rt_single(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3538
ecore_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_INT_CLEANUP,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3543
static void ecore_iov_vf_mbx_close(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3551
ecore_iov_vf_igu_set_int(p_hwfn, p_ptt, vf, 0);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3554
ecore_iov_config_perm_table(p_hwfn, p_ptt, vf, 0);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3556
ecore_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_CLOSE,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3560
static void ecore_iov_vf_mbx_release(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3568
ecore_iov_vf_cleanup(p_hwfn, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3572
rc = ecore_sp_vf_stop(p_hwfn, p_vf->concrete_fid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3576
DP_ERR(p_hwfn, "ecore_sp_vf_stop returned error %d\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
3584
ecore_iov_prepare_resp(p_hwfn, p_ptt, p_vf, CHANNEL_TLV_RELEASE,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3588
static void ecore_iov_vf_pf_get_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
360
enum _ecore_status_t ecore_iov_post_vf_bulletin(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3609
if (!ecore_iov_validate_rxq(p_hwfn, p_vf, qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3611
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3618
rc = ecore_get_rxq_coalesce(p_hwfn, p_ptt, p_cid, &coal);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3622
if (!ecore_iov_validate_txq(p_hwfn, p_vf, qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3624
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3637
rc = ecore_get_txq_coalesce(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3655
ecore_iov_send_response(p_hwfn, p_ptt, p_vf, sizeof(*p_resp), status);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3658
static void ecore_iov_vf_pf_set_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3677
if (!ecore_iov_validate_rxq(p_hwfn, vf, qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3680
DP_ERR(p_hwfn, "VF[%d]: Invalid Rx queue_id = %d\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
3685
if (!ecore_iov_validate_txq(p_hwfn, vf, qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3688
DP_ERR(p_hwfn, "VF[%d]: Invalid Tx queue_id = %d\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
369
p_vf = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3693
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3700
rc = ecore_set_rxq_coalesce(p_hwfn, p_ptt, rx_coal, p_cid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3702
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3723
rc = ecore_set_txq_coalesce(p_hwfn, p_ptt, tx_coal,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3726
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3737
ecore_iov_prepare_resp(p_hwfn, p_ptt, vf, CHANNEL_TLV_COALESCE_UPDATE,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3742
ecore_iov_pf_configure_vf_queue_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3751
if (!ecore_iov_is_valid_vfid(p_hwfn, vf_id, true, true)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
3752
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3758
vf = &p_hwfn->pf_iov_info->vfs_array[vf_id];
sys/dev/qlnx/qlnxe/ecore_sriov.c
3759
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3763
if (!ecore_iov_validate_rxq(p_hwfn, vf, qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3766
DP_ERR(p_hwfn, "VF[%d]: Invalid Rx queue_id = %d\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
3771
if (!ecore_iov_validate_txq(p_hwfn, vf, qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3774
DP_ERR(p_hwfn, "VF[%d]: Invalid Tx queue_id = %d\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
3779
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3786
rc = ecore_set_rxq_coalesce(p_hwfn, p_ptt, rx_coal, p_cid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3788
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3809
rc = ecore_set_txq_coalesce(p_hwfn, p_ptt, tx_coal,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3812
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3822
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3828
ecore_iov_vf_flr_poll_dorq(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3835
ecore_fid_pretend(p_hwfn, p_ptt, (u16)p_vf->concrete_fid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3838
val = ecore_rd(p_hwfn, p_ptt, DORQ_REG_VF_USAGE_CNT);
sys/dev/qlnx/qlnxe/ecore_sriov.c
384
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3843
ecore_fid_pretend(p_hwfn, p_ptt, (u16)p_hwfn->hw_info.concrete_fid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3846
DP_ERR(p_hwfn, "VF[%d] - dorq failed to cleanup [usage 0x%08x]\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
3855
ecore_iov_vf_flr_poll_pbf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3866
cons[i] = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3869
prod = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3881
tmp = ecore_rd(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3895
DP_ERR(p_hwfn, "VF[%d] - pbf polling failed on VOQ %d\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
3903
static enum _ecore_status_t ecore_iov_vf_flr_poll(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3911
rc = ecore_iov_vf_flr_poll_dorq(p_hwfn, p_vf, p_ptt);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3915
rc = ecore_iov_vf_flr_poll_pbf(p_hwfn, p_vf, p_ptt);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3923
ecore_iov_execute_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
393
return ecore_dmae_host2host(p_hwfn, p_ptt, p_vf->bulletin.phys,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3931
p_vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, false);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3935
if (p_hwfn->pf_iov_info->pending_flr[rel_vf_id / 64] &
sys/dev/qlnx/qlnxe/ecore_sriov.c
3941
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3944
ecore_iov_vf_cleanup(p_hwfn, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3951
rc = ecore_iov_vf_flr_poll(p_hwfn, p_vf, p_ptt);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3955
rc = ecore_final_cleanup(p_hwfn, p_ptt, vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3958
DP_ERR(p_hwfn, "Failed handle FLR of VF[%d]\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
3966
REG_WR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
3975
rc = ecore_iov_enable_vf_access(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
3978
DP_ERR(p_hwfn, "Failed to re-enable VF[%d] acces\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
3987
p_hwfn->pf_iov_info->pending_flr[rel_vf_id / 64] &=
sys/dev/qlnx/qlnxe/ecore_sriov.c
3995
enum _ecore_status_t ecore_iov_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4011
for (i = 0; i < p_hwfn->p_dev->p_iov_info->total_vfs; i++)
sys/dev/qlnx/qlnxe/ecore_sriov.c
4012
ecore_iov_execute_vf_flr_cleanup(p_hwfn, p_ptt, i, ack_vfs);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4014
rc = ecore_mcp_ack_vf_flr(p_hwfn, p_ptt, ack_vfs);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4020
ecore_iov_single_vf_flr_cleanup(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4033
ecore_iov_execute_vf_flr_cleanup(p_hwfn, p_ptt, rel_vf_id, ack_vfs);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4035
rc = ecore_mcp_ack_vf_flr(p_hwfn, p_ptt, ack_vfs);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4040
bool ecore_iov_mark_vf_flr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4046
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, "Marking FLR-ed VFs\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
4048
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4052
if (!p_hwfn->p_dev->p_iov_info) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
4053
DP_NOTICE(p_hwfn, true, "VF flr but no IOV\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
4058
for (i = 0; i < p_hwfn->p_dev->p_iov_info->total_vfs; i++) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
4062
p_vf = ecore_iov_get_vf_info(p_hwfn, i, false);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4068
u64 *p_flr = p_hwfn->pf_iov_info->pending_flr;
sys/dev/qlnx/qlnxe/ecore_sriov.c
4071
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4090
void ecore_iov_get_link(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4096
struct ecore_vf_info *p_vf = ecore_iov_get_vf_info(p_hwfn, vfid, false);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4112
void ecore_iov_process_mbx_req(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4119
p_vf = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4128
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4138
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4142
OSAL_IOV_VF_MSG_TYPE(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4149
ecore_iov_lock_vf_pf_channel(p_hwfn, p_vf,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4158
ecore_iov_vf_mbx_acquire(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4161
ecore_iov_vf_mbx_start_vport(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4164
ecore_iov_vf_mbx_stop_vport(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4167
ecore_iov_vf_mbx_start_rxq(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4170
ecore_iov_vf_mbx_start_txq(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4173
ecore_iov_vf_mbx_stop_rxqs(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4176
ecore_iov_vf_mbx_stop_txqs(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4179
ecore_iov_vf_mbx_update_rxqs(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4182
ecore_iov_vf_mbx_vport_update(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4185
ecore_iov_vf_mbx_ucast_filter(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4188
ecore_iov_vf_mbx_close(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4191
ecore_iov_vf_mbx_int_cleanup(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4194
ecore_iov_vf_mbx_release(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4197
ecore_iov_vf_mbx_update_tunn_param(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4200
ecore_iov_vf_pf_set_coalesce(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4203
ecore_iov_vf_pf_get_coalesce(p_hwfn, p_ptt, p_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4214
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4218
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4223
ecore_iov_prepare_resp(p_hwfn, p_ptt, p_vf,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4234
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4248
ecore_iov_prepare_resp(p_hwfn, p_ptt, p_vf,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4253
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4258
ecore_iov_unlock_vf_pf_channel(p_hwfn, p_vf,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4267
void ecore_iov_pf_get_pending_events(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4274
ecore_for_each_vf(p_hwfn, i) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
4277
p_vf = &p_hwfn->pf_iov_info->vfs_array[i];
sys/dev/qlnx/qlnxe/ecore_sriov.c
4284
ecore_sriov_get_vf_from_absid(struct ecore_hwfn *p_hwfn, u16 abs_vfid)
sys/dev/qlnx/qlnxe/ecore_sriov.c
4286
u8 min = (u8)p_hwfn->p_dev->p_iov_info->first_vf_in_pf;
sys/dev/qlnx/qlnxe/ecore_sriov.c
4288
if (!_ecore_iov_pf_sanity_check(p_hwfn, (int)abs_vfid - min, false)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
4289
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4295
return &p_hwfn->pf_iov_info->vfs_array[(u8)abs_vfid - min];
sys/dev/qlnx/qlnxe/ecore_sriov.c
4298
static enum _ecore_status_t ecore_sriov_vfpf_msg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4302
struct ecore_vf_info *p_vf = ecore_sriov_get_vf_from_absid(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4316
return OSAL_PF_VF_MSG(p_hwfn, p_vf->relative_vf_id);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4319
static void ecore_sriov_vfpf_malicious(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4324
p_vf = ecore_sriov_get_vf_from_absid(p_hwfn, p_data->vf_id);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4330
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4336
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4341
OSAL_PF_VF_MALICIOUS(p_hwfn, p_vf->relative_vf_id);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4344
static enum _ecore_status_t ecore_sriov_eqe_event(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4352
return ecore_sriov_vfpf_msg(p_hwfn, OSAL_LE16_TO_CPU(echo),
sys/dev/qlnx/qlnxe/ecore_sriov.c
4355
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4359
ecore_sriov_vfpf_malicious(p_hwfn, &data->malicious_vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4362
DP_INFO(p_hwfn->p_dev, "Unknown sriov eqe event 0x%02x\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
4369
bool ecore_iov_is_vf_pending_flr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4372
return !!(p_hwfn->pf_iov_info->pending_flr[rel_vf_id / 64] &
sys/dev/qlnx/qlnxe/ecore_sriov.c
4377
u16 ecore_iov_get_next_active_vf(struct ecore_hwfn *p_hwfn, u16 rel_vf_id)
sys/dev/qlnx/qlnxe/ecore_sriov.c
4379
struct ecore_hw_sriov_info *p_iov = p_hwfn->p_dev->p_iov_info;
sys/dev/qlnx/qlnxe/ecore_sriov.c
4386
if (ecore_iov_is_valid_vfid(p_hwfn, rel_vf_id, true, false))
sys/dev/qlnx/qlnxe/ecore_sriov.c
4393
enum _ecore_status_t ecore_iov_copy_vf_msg(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4400
vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4409
if (ecore_dmae_host2host(p_hwfn, ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4414
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4424
void ecore_iov_bulletin_set_forced_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4430
vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4432
DP_NOTICE(p_hwfn->p_dev, true, "Can not set forced MAC, invalid vfid [%d]\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
4437
DP_NOTICE(p_hwfn->p_dev, false, "Can't set forced MAC to malicious VF [%d]\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
4451
ecore_iov_configure_vport_forced(p_hwfn, vf_info, feature);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4455
enum _ecore_status_t ecore_iov_bulletin_set_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4461
vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4463
DP_NOTICE(p_hwfn->p_dev, true, "Can not set MAC, invalid vfid [%d]\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
4468
DP_NOTICE(p_hwfn->p_dev, false, "Can't set MAC to malicious VF [%d]\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
4474
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, "Can not set MAC, Forced MAC is configured\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
4488
ecore_iov_bulletin_set_forced_untagged_default(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4495
vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4497
DP_NOTICE(p_hwfn->p_dev, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4503
DP_NOTICE(p_hwfn->p_dev, false,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4513
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4532
void ecore_iov_get_vfs_opaque_fid(struct ecore_hwfn *p_hwfn, int vfid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4537
vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4545
void ecore_iov_bulletin_set_forced_vlan(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4551
vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4553
DP_NOTICE(p_hwfn->p_dev, true, "Can not set forced MAC, invalid vfid [%d]\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
4558
DP_NOTICE(p_hwfn->p_dev, false,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4571
ecore_iov_configure_vport_forced(p_hwfn, vf_info, feature);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4574
void ecore_iov_bulletin_set_udp_ports(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4579
vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4581
DP_NOTICE(p_hwfn->p_dev, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4587
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4597
bool ecore_iov_vf_has_vport_instance(struct ecore_hwfn *p_hwfn, int vfid)
sys/dev/qlnx/qlnxe/ecore_sriov.c
4601
p_vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4608
bool ecore_iov_is_vf_stopped(struct ecore_hwfn *p_hwfn, int vfid)
sys/dev/qlnx/qlnxe/ecore_sriov.c
4612
p_vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4619
bool ecore_iov_spoofchk_get(struct ecore_hwfn *p_hwfn, int vfid)
sys/dev/qlnx/qlnxe/ecore_sriov.c
4623
vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4630
enum _ecore_status_t ecore_iov_spoofchk_set(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4636
if (!ecore_iov_pf_sanity_check(p_hwfn, vfid)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
4637
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4642
vf = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4646
if (!ecore_iov_vf_has_vport_instance(p_hwfn, vfid)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
4653
rc = __ecore_iov_spoofchk_set(p_hwfn, vf, val);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4660
u8 ecore_iov_vf_chains_per_pf(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sriov.c
4662
u8 max_chains_per_vf = p_hwfn->hw_info.max_chains_per_vf;
sys/dev/qlnx/qlnxe/ecore_sriov.c
4670
void ecore_iov_get_vf_req_virt_mbx_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4676
ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4688
void ecore_iov_get_vf_reply_virt_mbx_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4694
ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4708
ecore_iov_get_vf_sw_mbx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4712
ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4733
u8 *ecore_iov_bulletin_get_forced_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4738
p_vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
474
static void ecore_iov_setup_vfdb(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sriov.c
4748
u16 ecore_iov_bulletin_get_forced_vlan(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4753
p_vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
476
struct ecore_hw_sriov_info *p_iov = p_hwfn->p_dev->p_iov_info;
sys/dev/qlnx/qlnxe/ecore_sriov.c
4763
enum _ecore_status_t ecore_iov_configure_tx_rate(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
477
struct ecore_pf_iov *p_iov_info = p_hwfn->pf_iov_info;
sys/dev/qlnx/qlnxe/ecore_sriov.c
4772
vf = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4777
rc = ecore_fw_vport(p_hwfn, vf->vport_id, &abs_vp_id);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4781
p_link = &ECORE_LEADING_HWFN(p_hwfn->p_dev)->mcp_info->link_output;
sys/dev/qlnx/qlnxe/ecore_sriov.c
4783
return ecore_init_vport_rl(p_hwfn, p_ptt, abs_vp_id, (u32)val,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4795
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_sriov.c
4797
if (!ecore_iov_pf_sanity_check(p_hwfn, vfid)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
4798
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4811
enum _ecore_status_t ecore_iov_get_vf_stats(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4818
vf = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4825
__ecore_get_vport_stats(p_hwfn, p_ptt, p_stats,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4831
u8 ecore_iov_get_vf_num_rxqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4836
p_vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4843
u8 ecore_iov_get_vf_num_active_rxqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4848
p_vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4855
void *ecore_iov_get_vf_ctx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4860
p_vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4867
u8 ecore_iov_get_vf_num_sbs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4872
p_vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4879
bool ecore_iov_is_vf_wait_for_acquire(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4884
p_vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4891
bool ecore_iov_is_vf_acquired_not_initialized(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4896
p_vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4903
bool ecore_iov_is_vf_initialized(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4908
p_vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4915
bool ecore_iov_is_vf_started(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4920
p_vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4929
ecore_iov_get_vf_min_rate(struct ecore_hwfn *p_hwfn, int vfid)
sys/dev/qlnx/qlnxe/ecore_sriov.c
493
DP_ERR(p_hwfn, "ecore_iov_setup_vfdb called without allocating mem first\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
4934
vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
4938
vf_vp_wfq = &p_hwfn->qm_info.wfq_data[vf_info->vport_id];
sys/dev/qlnx/qlnxe/ecore_sriov.c
4947
void ecore_iov_set_vf_hw_channel(struct ecore_hwfn *p_hwfn, int vfid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
4952
vf_info = ecore_iov_get_vf_info(p_hwfn, (u16)vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
51
static enum _ecore_status_t ecore_sriov_eqe_event(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
521
concrete = ecore_vfid_to_concrete(p_hwfn, vf->abs_vf_id);
sys/dev/qlnx/qlnxe/ecore_sriov.c
524
vf->opaque_fid = (p_hwfn->hw_info.opaque_fid & 0xff) |
sys/dev/qlnx/qlnxe/ecore_sriov.c
532
static enum _ecore_status_t ecore_iov_allocate_vfdb(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sriov.c
534
struct ecore_pf_iov *p_iov_info = p_hwfn->pf_iov_info;
sys/dev/qlnx/qlnxe/ecore_sriov.c
538
num_vfs = p_hwfn->p_dev->p_iov_info->total_vfs;
sys/dev/qlnx/qlnxe/ecore_sriov.c
540
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
546
*p_v_addr = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_sriov.c
555
*p_v_addr = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_sriov.c
564
*p_v_addr = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_sriov.c
570
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
582
static void ecore_iov_free_vfdb(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sriov.c
584
struct ecore_pf_iov *p_iov_info = p_hwfn->pf_iov_info;
sys/dev/qlnx/qlnxe/ecore_sriov.c
586
if (p_hwfn->pf_iov_info->mbx_msg_virt_addr)
sys/dev/qlnx/qlnxe/ecore_sriov.c
587
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_sriov.c
592
if (p_hwfn->pf_iov_info->mbx_reply_virt_addr)
sys/dev/qlnx/qlnxe/ecore_sriov.c
593
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_sriov.c
599
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_sriov.c
605
enum _ecore_status_t ecore_iov_alloc(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sriov.c
609
if (!IS_PF_SRIOV(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
610
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
615
p_sriov = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*p_sriov));
sys/dev/qlnx/qlnxe/ecore_sriov.c
617
DP_NOTICE(p_hwfn, false, "Failed to allocate `struct ecore_sriov'\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
621
p_hwfn->pf_iov_info = p_sriov;
sys/dev/qlnx/qlnxe/ecore_sriov.c
623
ecore_spq_register_async_cb(p_hwfn, PROTOCOLID_COMMON,
sys/dev/qlnx/qlnxe/ecore_sriov.c
626
return ecore_iov_allocate_vfdb(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sriov.c
629
void ecore_iov_setup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sriov.c
631
if (!IS_PF_SRIOV(p_hwfn) || !IS_PF_SRIOV_ALLOC(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_sriov.c
634
ecore_iov_setup_vfdb(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sriov.c
637
void ecore_iov_free(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sriov.c
639
ecore_spq_unregister_async_cb(p_hwfn, PROTOCOLID_COMMON);
sys/dev/qlnx/qlnxe/ecore_sriov.c
641
if (IS_PF_SRIOV_ALLOC(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
642
ecore_iov_free_vfdb(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sriov.c
643
OSAL_FREE(p_hwfn->p_dev, p_hwfn->pf_iov_info);
sys/dev/qlnx/qlnxe/ecore_sriov.c
644
p_hwfn->pf_iov_info = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_sriov.c
654
enum _ecore_status_t ecore_iov_hw_info(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_sriov.c
656
struct ecore_dev *p_dev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/ecore_sriov.c
660
if (IS_VF(p_hwfn->p_dev))
sys/dev/qlnx/qlnxe/ecore_sriov.c
664
pos = OSAL_PCI_FIND_EXT_CAPABILITY(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_sriov.c
667
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, "No PCIe IOV support\n");
sys/dev/qlnx/qlnxe/ecore_sriov.c
676
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_sriov.c
691
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
708
if (p_hwfn->p_dev->p_iov_info->offset < (256 - p_hwfn->abs_pf_id)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
709
u32 first = p_hwfn->p_dev->p_iov_info->offset +
sys/dev/qlnx/qlnxe/ecore_sriov.c
710
p_hwfn->abs_pf_id - 16;
sys/dev/qlnx/qlnxe/ecore_sriov.c
714
if (ECORE_PATH_ID(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_sriov.c
717
u32 first = p_hwfn->p_dev->p_iov_info->offset +
sys/dev/qlnx/qlnxe/ecore_sriov.c
718
p_hwfn->abs_pf_id - 256;
sys/dev/qlnx/qlnxe/ecore_sriov.c
723
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_sriov.c
730
static bool _ecore_iov_pf_sanity_check(struct ecore_hwfn *p_hwfn, int vfid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
734
if (IS_VF(p_hwfn->p_dev) || !IS_ECORE_SRIOV(p_hwfn->p_dev) ||
sys/dev/qlnx/qlnxe/ecore_sriov.c
735
!IS_PF_SRIOV_ALLOC(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_sriov.c
739
if (!ecore_iov_is_valid_vfid(p_hwfn, vfid, true, b_fail_malicious))
sys/dev/qlnx/qlnxe/ecore_sriov.c
745
bool ecore_iov_pf_sanity_check(struct ecore_hwfn *p_hwfn, int vfid)
sys/dev/qlnx/qlnxe/ecore_sriov.c
747
return _ecore_iov_pf_sanity_check(p_hwfn, vfid, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
758
struct ecore_hwfn *p_hwfn = &p_dev->hwfns[i];
sys/dev/qlnx/qlnxe/ecore_sriov.c
760
vf = ecore_iov_get_vf_info(p_hwfn, rel_vf_id, false);
sys/dev/qlnx/qlnxe/ecore_sriov.c
782
enum _ecore_status_t ecore_iov_set_vf_ctx(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
787
struct ecore_vf_info *vf = ecore_iov_get_vf_info(p_hwfn, vf_id, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
801
static void ecore_iov_vf_pglue_clear_err(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
805
ecore_wr(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
810
static void ecore_iov_vf_igu_reset(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
817
ecore_fid_pretend(p_hwfn, p_ptt, (u16)vf->concrete_fid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
819
ecore_wr(p_hwfn, p_ptt, IGU_REG_STATISTIC_NUM_VF_MSG_SENT, 0);
sys/dev/qlnx/qlnxe/ecore_sriov.c
822
ecore_fid_pretend(p_hwfn, p_ptt, (u16)p_hwfn->hw_info.concrete_fid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
826
ecore_int_igu_init_pure_rt_single(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
831
static void ecore_iov_vf_igu_set_int(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
838
ecore_fid_pretend(p_hwfn, p_ptt, (u16)vf->concrete_fid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
840
igu_vf_conf = ecore_rd(p_hwfn, p_ptt, IGU_REG_VF_CONFIGURATION);
sys/dev/qlnx/qlnxe/ecore_sriov.c
848
ecore_wr(p_hwfn, p_ptt, IGU_REG_VF_CONFIGURATION, igu_vf_conf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
851
ecore_fid_pretend(p_hwfn, p_ptt, (u16)p_hwfn->hw_info.concrete_fid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
855
ecore_iov_enable_vf_access_msix(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
864
if (p_hwfn->p_dev->b_dont_override_vf_msix)
sys/dev/qlnx/qlnxe/ecore_sriov.c
870
if (!ECORE_IS_BB(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
871
ecore_for_each_vf(p_hwfn, i) {
sys/dev/qlnx/qlnxe/ecore_sriov.c
874
p_vf = ecore_iov_get_vf_info(p_hwfn, (u16)i, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
884
return ecore_mcp_config_vf_msix(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
890
static enum _ecore_status_t ecore_iov_enable_vf_access(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
905
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, "Enable internal access for vf %x [abs %x]\n",
sys/dev/qlnx/qlnxe/ecore_sriov.c
906
vf->abs_vf_id, ECORE_VF_ABS_ID(p_hwfn, vf));
sys/dev/qlnx/qlnxe/ecore_sriov.c
908
ecore_iov_vf_pglue_clear_err(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
909
ECORE_VF_ABS_ID(p_hwfn, vf));
sys/dev/qlnx/qlnxe/ecore_sriov.c
911
ecore_iov_vf_igu_reset(p_hwfn, p_ptt, vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
913
rc = ecore_iov_enable_vf_access_msix(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/ecore_sriov.c
918
ecore_fid_pretend(p_hwfn, p_ptt, (u16)vf->concrete_fid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
920
SET_FIELD(igu_vf_conf, IGU_VF_CONF_PARENT, p_hwfn->rel_pf_id);
sys/dev/qlnx/qlnxe/ecore_sriov.c
921
STORE_RT_REG(p_hwfn, IGU_REG_VF_CONFIGURATION_RT_OFFSET, igu_vf_conf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
923
ecore_init_run(p_hwfn, p_ptt, PHASE_VF, vf->abs_vf_id,
sys/dev/qlnx/qlnxe/ecore_sriov.c
924
p_hwfn->hw_info.hw_mode);
sys/dev/qlnx/qlnxe/ecore_sriov.c
927
ecore_fid_pretend(p_hwfn, p_ptt, (u16)p_hwfn->hw_info.concrete_fid);
sys/dev/qlnx/qlnxe/ecore_sriov.c
946
static void ecore_iov_config_perm_table(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
956
ecore_fw_l2_queue(p_hwfn, vf->vf_queues[qid].fw_rx_qid,
sys/dev/qlnx/qlnxe/ecore_sriov.c
961
ecore_wr(p_hwfn, p_ptt, reg_addr, val);
sys/dev/qlnx/qlnxe/ecore_sriov.c
965
static void ecore_iov_enable_vf_traffic(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
970
ecore_iov_vf_igu_reset(p_hwfn, p_ptt, vf);
sys/dev/qlnx/qlnxe/ecore_sriov.c
972
ecore_iov_vf_igu_set_int(p_hwfn, p_ptt, vf, 1);
sys/dev/qlnx/qlnxe/ecore_sriov.c
975
ecore_iov_config_perm_table(p_hwfn, p_ptt, vf, true);
sys/dev/qlnx/qlnxe/ecore_sriov.c
978
static u8 ecore_iov_alloc_vf_igu_sbs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.c
988
if (num_rx_queues > p_hwfn->hw_info.p_igu_info->usage.free_cnt_iov)
sys/dev/qlnx/qlnxe/ecore_sriov.c
990
(u16)p_hwfn->hw_info.p_igu_info->usage.free_cnt_iov;
sys/dev/qlnx/qlnxe/ecore_sriov.c
991
p_hwfn->hw_info.p_igu_info->usage.free_cnt_iov -= num_rx_queues;
sys/dev/qlnx/qlnxe/ecore_sriov.c
998
p_block = ecore_get_igu_free_sb(p_hwfn, false);
sys/dev/qlnx/qlnxe/ecore_sriov.h
156
#define ECORE_VF_ABS_ID(p_hwfn, p_vf) (ECORE_PATH_ID(p_hwfn) ? \
sys/dev/qlnx/qlnxe/ecore_sriov.h
229
enum _ecore_status_t ecore_iov_hw_info(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sriov.h
248
void ecore_dp_tlv_list(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.h
258
enum _ecore_status_t ecore_iov_alloc(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sriov.h
265
void ecore_iov_setup(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sriov.h
272
void ecore_iov_free(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_sriov.h
289
bool ecore_iov_mark_vf_flr(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.h
301
void *ecore_iov_search_list_tlvs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.h
315
struct ecore_vf_info *ecore_iov_get_vf_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_sriov.h
319
static OSAL_INLINE enum _ecore_status_t ecore_iov_hw_info(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_SUCCESS;}
sys/dev/qlnx/qlnxe/ecore_sriov.h
321
static OSAL_INLINE void ecore_dp_tlv_list(struct ecore_hwfn OSAL_UNUSED *p_hwfn, void OSAL_UNUSED *tlvs_list) {}
sys/dev/qlnx/qlnxe/ecore_sriov.h
322
static OSAL_INLINE enum _ecore_status_t ecore_iov_alloc(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_SUCCESS;}
sys/dev/qlnx/qlnxe/ecore_sriov.h
323
static OSAL_INLINE void ecore_iov_setup(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {}
sys/dev/qlnx/qlnxe/ecore_sriov.h
324
static OSAL_INLINE void ecore_iov_free(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {}
sys/dev/qlnx/qlnxe/ecore_sriov.h
327
static OSAL_INLINE bool ecore_iov_mark_vf_flr(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u32 OSAL_UNUSED *disabled_vfs) {return false;}
sys/dev/qlnx/qlnxe/ecore_sriov.h
328
static OSAL_INLINE void *ecore_iov_search_list_tlvs(struct ecore_hwfn OSAL_UNUSED *p_hwfn, void OSAL_UNUSED *p_tlvs_list, u16 OSAL_UNUSED req_type) {return OSAL_NULL;}
sys/dev/qlnx/qlnxe/ecore_sriov.h
329
static OSAL_INLINE struct ecore_vf_info *ecore_iov_get_vf_info(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED relative_vf_id, bool OSAL_UNUSED b_enabled_only) {return OSAL_NULL;}
sys/dev/qlnx/qlnxe/ecore_vf.c
1000
*pp_doorbell = (u8 OSAL_IOMEM*)p_hwfn->doorbells +
sys/dev/qlnx/qlnxe/ecore_vf.c
1004
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
1008
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
1013
enum _ecore_status_t ecore_vf_pf_txq_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1016
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1022
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_STOP_TXQS, sizeof(*req));
sys/dev/qlnx/qlnxe/ecore_vf.c
1027
ecore_vf_pf_add_qid(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_vf.c
1035
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
1045
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
1051
enum _ecore_status_t ecore_vf_pf_rxqs_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1057
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
106
ecore_send_msg2pf(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1068
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_vf.c
1074
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_UPDATE_RXQ, sizeof(*req));
sys/dev/qlnx/qlnxe/ecore_vf.c
1084
ecore_vf_pf_add_qid(p_hwfn, *pp_cid);
sys/dev/qlnx/qlnxe/ecore_vf.c
109
union vfpf_tlvs *p_req = p_hwfn->vf_iov_info->vf2pf_request;
sys/dev/qlnx/qlnxe/ecore_vf.c
1091
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
1101
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
1106
enum _ecore_status_t ecore_vf_pf_vport_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1115
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1122
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_VPORT_START, sizeof(*req));
sys/dev/qlnx/qlnxe/ecore_vf.c
1133
for (i = 0; i < p_hwfn->vf_iov_info->acquire_resp.resc.num_sbs; i++) {
sys/dev/qlnx/qlnxe/ecore_vf.c
1134
struct ecore_sb_info *p_sb = p_hwfn->vf_iov_info->sbs_info[i];
sys/dev/qlnx/qlnxe/ecore_vf.c
1146
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
1156
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
1161
enum _ecore_status_t ecore_vf_pf_vport_stop(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_vf.c
1163
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1168
ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_VPORT_TEARDOWN,
sys/dev/qlnx/qlnxe/ecore_vf.c
1176
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
118
ecore_dp_tlv_list(p_hwfn, p_req);
sys/dev/qlnx/qlnxe/ecore_vf.c
1186
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
1192
ecore_vf_handle_vp_update_is_needed(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1204
!CHIP_REV_IS_FPGA(p_hwfn->p_dev));
sys/dev/qlnx/qlnxe/ecore_vf.c
1222
DP_INFO(p_hwfn, "Unexpected vport-update TLV[%d] %s\n",
sys/dev/qlnx/qlnxe/ecore_vf.c
1229
ecore_vf_handle_vp_update_tlvs_resp(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1232
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1239
if (!ecore_vf_handle_vp_update_is_needed(p_hwfn, p_data, tlv))
sys/dev/qlnx/qlnxe/ecore_vf.c
124
if (!p_hwfn->vf_iov_info->b_hw_channel) {
sys/dev/qlnx/qlnxe/ecore_vf.c
1243
ecore_iov_search_list_tlvs(p_hwfn, p_iov->pf2vf_reply,
sys/dev/qlnx/qlnxe/ecore_vf.c
1246
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
125
rc = OSAL_VF_SEND_MSG2PF(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_vf.c
1254
enum _ecore_status_t ecore_vf_pf_vport_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1257
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1272
ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_VPORT_UPDATE, sizeof(*req));
sys/dev/qlnx/qlnxe/ecore_vf.c
128
p_hwfn->vf_iov_info->pf2vf_reply,
sys/dev/qlnx/qlnxe/ecore_vf.c
140
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
142
GET_FIELD(p_hwfn->hw_info.concrete_fid,
sys/dev/qlnx/qlnxe/ecore_vf.c
144
U64_HI(p_hwfn->vf_iov_info->vf2pf_request_phys),
sys/dev/qlnx/qlnxe/ecore_vf.c
145
U64_LO(p_hwfn->vf_iov_info->vf2pf_request_phys),
sys/dev/qlnx/qlnxe/ecore_vf.c
1464
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, resp_size);
sys/dev/qlnx/qlnxe/ecore_vf.c
1473
ecore_vf_handle_vp_update_tlvs_resp(p_hwfn, p_params);
sys/dev/qlnx/qlnxe/ecore_vf.c
1476
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
1481
enum _ecore_status_t ecore_vf_pf_reset(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_vf.c
1483
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1489
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_CLOSE, sizeof(*req));
sys/dev/qlnx/qlnxe/ecore_vf.c
1497
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
150
REG_WR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1506
p_hwfn->b_int_enabled = 0;
sys/dev/qlnx/qlnxe/ecore_vf.c
1509
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
1514
void ecore_vf_pf_filter_mcast(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
152
U64_LO(p_hwfn->vf_iov_info->vf2pf_request_phys));
sys/dev/qlnx/qlnxe/ecore_vf.c
1527
ecore_vf_pf_vport_update(p_hwfn, &sp_params);
sys/dev/qlnx/qlnxe/ecore_vf.c
1530
enum _ecore_status_t ecore_vf_pf_filter_ucast(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1533
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
154
REG_WR(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1541
DP_NOTICE(p_hwfn, true, "VFs don't support Moving of filters\n");
sys/dev/qlnx/qlnxe/ecore_vf.c
1547
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_UCAST_FILTER, sizeof(*req));
sys/dev/qlnx/qlnxe/ecore_vf.c
1559
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
156
U64_HI(p_hwfn->vf_iov_info->vf2pf_request_phys));
sys/dev/qlnx/qlnxe/ecore_vf.c
1569
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
1574
enum _ecore_status_t ecore_vf_pf_int_cleanup(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_vf.c
1576
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1581
ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_INT_CLEANUP,
sys/dev/qlnx/qlnxe/ecore_vf.c
1589
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
1599
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
1604
enum _ecore_status_t ecore_vf_pf_get_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1608
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
161
OSAL_WMB(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_vf.c
1614
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_COALESCE_READ,
sys/dev/qlnx/qlnxe/ecore_vf.c
1623
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
163
REG_WR(p_hwfn, (osal_uintptr_t)&zone_data->trigger, *((u32 *)&trigger));
sys/dev/qlnx/qlnxe/ecore_vf.c
1632
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
1638
ecore_vf_pf_set_coalesce(struct ecore_hwfn *p_hwfn, u16 rx_coal, u16 tx_coal,
sys/dev/qlnx/qlnxe/ecore_vf.c
1641
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1647
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_COALESCE_UPDATE,
sys/dev/qlnx/qlnxe/ecore_vf.c
1654
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
1663
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
1671
p_hwfn->p_dev->rx_coalesce_usecs = rx_coal;
sys/dev/qlnx/qlnxe/ecore_vf.c
1672
p_hwfn->p_dev->tx_coalesce_usecs = tx_coal;
sys/dev/qlnx/qlnxe/ecore_vf.c
1675
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
1679
u16 ecore_vf_get_igu_sb_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1682
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1685
DP_NOTICE(p_hwfn, true, "vf_sriov_info isn't initialized\n");
sys/dev/qlnx/qlnxe/ecore_vf.c
1692
void ecore_vf_set_sb_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1695
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1698
DP_NOTICE(p_hwfn, true, "vf_sriov_info isn't initialized\n");
sys/dev/qlnx/qlnxe/ecore_vf.c
1703
DP_NOTICE(p_hwfn, true, "Can't configure SB %04x\n", sb_id);
sys/dev/qlnx/qlnxe/ecore_vf.c
1710
enum _ecore_status_t ecore_vf_read_bulletin(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1713
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1736
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
174
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_vf.c
1758
void ecore_vf_get_link_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1762
&(p_hwfn->vf_iov_info->bulletin_shadow));
sys/dev/qlnx/qlnxe/ecore_vf.c
1784
void ecore_vf_get_link_state(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1788
&(p_hwfn->vf_iov_info->bulletin_shadow));
sys/dev/qlnx/qlnxe/ecore_vf.c
1798
void ecore_vf_get_link_caps(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1802
&(p_hwfn->vf_iov_info->bulletin_shadow));
sys/dev/qlnx/qlnxe/ecore_vf.c
1805
void ecore_vf_get_num_rxqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1808
*num_rxqs = p_hwfn->vf_iov_info->acquire_resp.resc.num_rxqs;
sys/dev/qlnx/qlnxe/ecore_vf.c
181
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_vf.c
1811
void ecore_vf_get_num_txqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1814
*num_txqs = p_hwfn->vf_iov_info->acquire_resp.resc.num_txqs;
sys/dev/qlnx/qlnxe/ecore_vf.c
1817
void ecore_vf_get_num_cids(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1820
*num_cids = p_hwfn->vf_iov_info->acquire_resp.resc.num_cids;
sys/dev/qlnx/qlnxe/ecore_vf.c
1823
void ecore_vf_get_port_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1827
p_hwfn->vf_iov_info->acquire_resp.pfdev_info.port_mac,
sys/dev/qlnx/qlnxe/ecore_vf.c
1831
void ecore_vf_get_num_vlan_filters(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1836
p_vf = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1840
void ecore_vf_get_num_mac_filters(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1843
struct ecore_vf_iov *p_vf = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
1848
bool ecore_vf_check_mac(struct ecore_hwfn *p_hwfn, u8 *mac)
sys/dev/qlnx/qlnxe/ecore_vf.c
185
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
1852
bulletin = &p_hwfn->vf_iov_info->bulletin_shadow;
sys/dev/qlnx/qlnxe/ecore_vf.c
1885
void ecore_vf_bulletin_get_udp_ports(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1891
p_bulletin = &p_hwfn->vf_iov_info->bulletin_shadow;
sys/dev/qlnx/qlnxe/ecore_vf.c
1913
bool ecore_vf_get_pre_fp_hsi(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_vf.c
1915
return p_hwfn->vf_iov_info->b_pre_fp_hsi;
sys/dev/qlnx/qlnxe/ecore_vf.c
1919
void ecore_vf_get_fw_version(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1925
info = &p_hwfn->vf_iov_info->acquire_resp.pfdev_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
193
static void ecore_vf_pf_add_qid(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
1934
void ecore_vf_set_hw_channel(struct ecore_hwfn *p_hwfn, bool b_is_hw)
sys/dev/qlnx/qlnxe/ecore_vf.c
1936
p_hwfn->vf_iov_info->b_hw_channel = b_is_hw;
sys/dev/qlnx/qlnxe/ecore_vf.c
196
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
209
static enum _ecore_status_t _ecore_vf_pf_release(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
212
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
219
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_RELEASE, sizeof(*req));
sys/dev/qlnx/qlnxe/ecore_vf.c
227
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
232
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
236
p_hwfn->b_int_enabled = 0;
sys/dev/qlnx/qlnxe/ecore_vf.c
239
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_vf.c
244
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_vf.c
251
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_vf.c
261
OSAL_FREE(p_hwfn->p_dev, p_hwfn->vf_iov_info);
sys/dev/qlnx/qlnxe/ecore_vf.c
262
p_hwfn->vf_iov_info = OSAL_NULL;
sys/dev/qlnx/qlnxe/ecore_vf.c
267
enum _ecore_status_t ecore_vf_pf_release(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_vf.c
269
return _ecore_vf_pf_release(p_hwfn, true);
sys/dev/qlnx/qlnxe/ecore_vf.c
273
static void ecore_vf_pf_acquire_reduce_resc(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
277
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
297
static enum _ecore_status_t ecore_vf_pf_acquire(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_vf.c
299
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
311
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_ACQUIRE, sizeof(*req));
sys/dev/qlnx/qlnxe/ecore_vf.c
315
req->vfdev_info.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/ecore_vf.c
325
OSAL_VF_FILL_ACQUIRE_RESC_REQ(p_hwfn, &req->resc_request, &vf_sw_info);
sys/dev/qlnx/qlnxe/ecore_vf.c
356
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, "attempting to acquire resources\n");
sys/dev/qlnx/qlnxe/ecore_vf.c
363
rc = ecore_send_msg2pf(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
387
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, "resources acquired\n");
sys/dev/qlnx/qlnxe/ecore_vf.c
392
ecore_vf_pf_acquire_reduce_resc(p_hwfn, p_resc,
sys/dev/qlnx/qlnxe/ecore_vf.c
398
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_vf.c
411
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_vf.c
416
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
427
DP_NOTICE(p_hwfn, false,
sys/dev/qlnx/qlnxe/ecore_vf.c
432
DP_ERR(p_hwfn, "PF returned error %d to VF acquisition request\n",
sys/dev/qlnx/qlnxe/ecore_vf.c
454
rc = OSAL_VF_UPDATE_ACQUIRE_RESC_RESP(p_hwfn, &resp->resc);
sys/dev/qlnx/qlnxe/ecore_vf.c
456
DP_NOTICE(p_hwfn, true,
sys/dev/qlnx/qlnxe/ecore_vf.c
468
p_hwfn->p_dev->type = resp->pfdev_info.dev_type;
sys/dev/qlnx/qlnxe/ecore_vf.c
469
p_hwfn->p_dev->chip_rev = (u8) resp->pfdev_info.chip_rev;
sys/dev/qlnx/qlnxe/ecore_vf.c
471
DP_INFO(p_hwfn, "Chip details - %s%d\n",
sys/dev/qlnx/qlnxe/ecore_vf.c
472
ECORE_IS_BB(p_hwfn->p_dev) ? "BB" : "AH",
sys/dev/qlnx/qlnxe/ecore_vf.c
473
CHIP_REV_IS_A0(p_hwfn->p_dev) ? 0 : 1);
sys/dev/qlnx/qlnxe/ecore_vf.c
475
p_hwfn->p_dev->chip_num = pfdev_info->chip_num & 0xffff;
sys/dev/qlnx/qlnxe/ecore_vf.c
478
if (IS_LEAD_HWFN(p_hwfn)) {
sys/dev/qlnx/qlnxe/ecore_vf.c
480
DP_NOTICE(p_hwfn, false, "100g VF\n");
sys/dev/qlnx/qlnxe/ecore_vf.c
481
p_hwfn->p_dev->num_hwfns = 2;
sys/dev/qlnx/qlnxe/ecore_vf.c
490
DP_INFO(p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
497
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
50
static void *ecore_vf_pf_prep(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
502
u32 ecore_vf_hw_bar_size(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
512
bar_size = p_hwfn->vf_iov_info->acquire_resp.pfdev_info.bar_size;
sys/dev/qlnx/qlnxe/ecore_vf.c
518
enum _ecore_status_t ecore_vf_hw_prepare(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/ecore_vf.c
520
struct ecore_hwfn *p_lead = ECORE_LEADING_HWFN(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/ecore_vf.c
528
if (IS_LEAD_HWFN(p_hwfn))
sys/dev/qlnx/qlnxe/ecore_vf.c
529
p_hwfn->p_dev->num_hwfns = 1;
sys/dev/qlnx/qlnxe/ecore_vf.c
53
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
532
p_hwfn->hw_info.opaque_fid = (u16)REG_RD(p_hwfn, reg);
sys/dev/qlnx/qlnxe/ecore_vf.c
535
p_hwfn->hw_info.concrete_fid = REG_RD(p_hwfn, reg);
sys/dev/qlnx/qlnxe/ecore_vf.c
538
p_iov = OSAL_ZALLOC(p_hwfn->p_dev, GFP_KERNEL, sizeof(*p_iov));
sys/dev/qlnx/qlnxe/ecore_vf.c
540
DP_NOTICE(p_hwfn, true, "Failed to allocate `struct ecore_sriov'\n");
sys/dev/qlnx/qlnxe/ecore_vf.c
548
if (p_hwfn->doorbells == OSAL_NULL) {
sys/dev/qlnx/qlnxe/ecore_vf.c
549
p_hwfn->doorbells = (u8 OSAL_IOMEM*)p_hwfn->regview +
sys/dev/qlnx/qlnxe/ecore_vf.c
552
p_hwfn->db_offset = (u8 *)p_hwfn->doorbells -
sys/dev/qlnx/qlnxe/ecore_vf.c
553
(u8 *)p_hwfn->p_dev->doorbells;
sys/dev/qlnx/qlnxe/ecore_vf.c
556
} else if (p_hwfn == p_lead) {
sys/dev/qlnx/qlnxe/ecore_vf.c
570
p_hwfn->doorbells = (u8 OSAL_IOMEM*)
sys/dev/qlnx/qlnxe/ecore_vf.c
571
p_hwfn->regview +
sys/dev/qlnx/qlnxe/ecore_vf.c
575
p_hwfn->doorbells = (u8 OSAL_IOMEM*)p_hwfn->regview +
sys/dev/qlnx/qlnxe/ecore_vf.c
577
p_hwfn->db_offset = (u8 *)p_hwfn->doorbells -
sys/dev/qlnx/qlnxe/ecore_vf.c
578
(u8 *)p_hwfn->p_dev->doorbells;
sys/dev/qlnx/qlnxe/ecore_vf.c
584
p_iov->vf2pf_request = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_vf.c
588
DP_NOTICE(p_hwfn, true, "Failed to allocate `vf2pf_request' DMA memory\n");
sys/dev/qlnx/qlnxe/ecore_vf.c
592
p_iov->pf2vf_reply = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_vf.c
596
DP_NOTICE(p_hwfn, true, "Failed to allocate `pf2vf_reply' DMA memory\n");
sys/dev/qlnx/qlnxe/ecore_vf.c
600
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
609
p_iov->bulletin.p_virt = OSAL_DMA_ALLOC_COHERENT(p_hwfn->p_dev,
sys/dev/qlnx/qlnxe/ecore_vf.c
612
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
619
OSAL_MUTEX_ALLOC(p_hwfn, &p_iov->mutex);
sys/dev/qlnx/qlnxe/ecore_vf.c
623
p_hwfn->vf_iov_info = p_iov;
sys/dev/qlnx/qlnxe/ecore_vf.c
625
p_hwfn->hw_info.personality = ECORE_PCI_ETH;
sys/dev/qlnx/qlnxe/ecore_vf.c
627
rc = ecore_vf_pf_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_vf.c
63
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV, "preparing to send %s tlv over vf pf channel\n",
sys/dev/qlnx/qlnxe/ecore_vf.c
638
!ecore_vf_hw_bar_size(p_hwfn, BAR_ID_1) &&
sys/dev/qlnx/qlnxe/ecore_vf.c
639
ECORE_IS_CMT(p_hwfn->p_dev)) {
sys/dev/qlnx/qlnxe/ecore_vf.c
640
rc = _ecore_vf_pf_release(p_hwfn, false);
sys/dev/qlnx/qlnxe/ecore_vf.c
645
p_hwfn->doorbells = (u8 OSAL_IOMEM*)p_hwfn->regview +
sys/dev/qlnx/qlnxe/ecore_vf.c
648
p_hwfn->db_offset = (u8 *)p_hwfn->doorbells -
sys/dev/qlnx/qlnxe/ecore_vf.c
649
(u8 *)p_hwfn->p_dev->doorbells;
sys/dev/qlnx/qlnxe/ecore_vf.c
651
rc = ecore_vf_pf_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/ecore_vf.c
654
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
656
p_hwfn->regview, p_hwfn->doorbells,
sys/dev/qlnx/qlnxe/ecore_vf.c
657
p_hwfn->p_dev->doorbells);
sys/dev/qlnx/qlnxe/ecore_vf.c
662
OSAL_DMA_FREE_COHERENT(p_hwfn->p_dev, p_iov->vf2pf_request,
sys/dev/qlnx/qlnxe/ecore_vf.c
666
OSAL_FREE(p_hwfn->p_dev, p_iov);
sys/dev/qlnx/qlnxe/ecore_vf.c
736
ecore_vf_update_tunn_param(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
763
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
772
ecore_vf_pf_tunnel_param_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
775
struct ecore_tunnel_info *p_tun = &p_hwfn->p_dev->tunnel;
sys/dev/qlnx/qlnxe/ecore_vf.c
776
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
781
p_req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_UPDATE_TUNN_PARAM,
sys/dev/qlnx/qlnxe/ecore_vf.c
810
rc = ecore_send_msg2pf(p_hwfn, &p_resp->hdr.status, sizeof(*p_resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
816
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
821
ecore_vf_update_tunn_param(p_hwfn, p_tun, p_resp);
sys/dev/qlnx/qlnxe/ecore_vf.c
823
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
828
ecore_vf_pf_rxq_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
836
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
843
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_START_RXQ, sizeof(*req));
sys/dev/qlnx/qlnxe/ecore_vf.c
85
static void ecore_vf_pf_req_end(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
862
p_hwfn->regview +
sys/dev/qlnx/qlnxe/ecore_vf.c
863
MSTORM_QZONE_START(p_hwfn->p_dev) +
sys/dev/qlnx/qlnxe/ecore_vf.c
867
__internal_ram_wr(p_hwfn, *pp_prod, sizeof(u32),
sys/dev/qlnx/qlnxe/ecore_vf.c
871
ecore_vf_pf_add_qid(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_vf.c
879
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
88
union pfvf_tlvs *resp = p_hwfn->vf_iov_info->pf2vf_reply;
sys/dev/qlnx/qlnxe/ecore_vf.c
892
*pp_prod = (u8 OSAL_IOMEM *)p_hwfn->regview + resp->offset;
sys/dev/qlnx/qlnxe/ecore_vf.c
893
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
90
DP_VERBOSE(p_hwfn, ECORE_MSG_IOV,
sys/dev/qlnx/qlnxe/ecore_vf.c
902
__internal_ram_wr(p_hwfn, *pp_prod, sizeof(u32),
sys/dev/qlnx/qlnxe/ecore_vf.c
907
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
912
enum _ecore_status_t ecore_vf_pf_rxq_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
916
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
922
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_STOP_RXQS, sizeof(*req));
sys/dev/qlnx/qlnxe/ecore_vf.c
928
ecore_vf_pf_add_qid(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_vf.c
936
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
94
OSAL_MUTEX_RELEASE(&(p_hwfn->vf_iov_info->mutex));
sys/dev/qlnx/qlnxe/ecore_vf.c
946
ecore_vf_pf_req_end(p_hwfn, rc);
sys/dev/qlnx/qlnxe/ecore_vf.c
952
ecore_vf_pf_txq_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.c
957
struct ecore_vf_iov *p_iov = p_hwfn->vf_iov_info;
sys/dev/qlnx/qlnxe/ecore_vf.c
964
req = ecore_vf_pf_prep(p_hwfn, CHANNEL_TLV_START_TXQ, sizeof(*req));
sys/dev/qlnx/qlnxe/ecore_vf.c
974
ecore_vf_pf_add_qid(p_hwfn, p_cid);
sys/dev/qlnx/qlnxe/ecore_vf.c
982
rc = ecore_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
sys/dev/qlnx/qlnxe/ecore_vf.c
995
*pp_doorbell = (u8 OSAL_IOMEM*)p_hwfn->doorbells +
sys/dev/qlnx/qlnxe/ecore_vf.h
108
enum _ecore_status_t ecore_vf_pf_set_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
121
enum _ecore_status_t ecore_vf_hw_prepare(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_vf.h
137
enum _ecore_status_t ecore_vf_pf_rxq_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
158
ecore_vf_pf_txq_start(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
172
enum _ecore_status_t ecore_vf_pf_rxq_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
184
enum _ecore_status_t ecore_vf_pf_txq_stop(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
202
enum _ecore_status_t ecore_vf_pf_rxqs_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
217
enum _ecore_status_t ecore_vf_pf_vport_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
227
enum _ecore_status_t ecore_vf_pf_reset(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_vf.h
236
enum _ecore_status_t ecore_vf_pf_release(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_vf.h
247
u16 ecore_vf_get_igu_sb_id(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
257
void ecore_vf_set_sb_info(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
275
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
291
enum _ecore_status_t ecore_vf_pf_vport_stop(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_vf.h
294
struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
297
void ecore_vf_pf_filter_mcast(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
307
enum _ecore_status_t ecore_vf_pf_int_cleanup(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_vf.h
336
ecore_vf_pf_tunnel_param_update(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
340
u32 ecore_vf_hw_bar_size(struct ecore_hwfn *p_hwfn, enum BAR_ID bar_id);
sys/dev/qlnx/qlnxe/ecore_vf.h
342
static OSAL_INLINE enum _ecore_status_t ecore_vf_hw_prepare(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
343
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_rxq_start(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_queue_cid OSAL_UNUSED *p_cid, u16 OSAL_UNUSED bd_max_bytes, dma_addr_t OSAL_UNUSED bd_chain_phys_addr, dma_addr_t OSAL_UNUSED cqe_pbl_addr, u16 OSAL_UNUSED cqe_pbl_size, void OSAL_IOMEM OSAL_UNUSED **pp_prod) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
344
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_txq_start(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_queue_cid OSAL_UNUSED *p_cid, dma_addr_t OSAL_UNUSED pbl_addr, u16 OSAL_UNUSED pbl_size, void OSAL_IOMEM OSAL_UNUSED **pp_doorbell) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
345
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_rxq_stop(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_queue_cid OSAL_UNUSED *p_cid, bool OSAL_UNUSED cqe_completion) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
346
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_txq_stop(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_queue_cid OSAL_UNUSED *p_cid) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
348
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_rxqs_update(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_queue_cid OSAL_UNUSED **pp_cid, u8 OSAL_UNUSED num_rxqs, u8 OSAL_UNUSED comp_cqe_flg, u8 OSAL_UNUSED comp_event_flg) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
350
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_vport_update(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_sp_vport_update_params OSAL_UNUSED *p_params) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
351
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_reset(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
352
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_release(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
353
static OSAL_INLINE u16 ecore_vf_get_igu_sb_id(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED sb_id) {return 0;}
sys/dev/qlnx/qlnxe/ecore_vf.h
354
static OSAL_INLINE void ecore_vf_set_sb_info(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED sb_id, struct ecore_sb_info OSAL_UNUSED *p_sb) {}
sys/dev/qlnx/qlnxe/ecore_vf.h
355
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_vport_start(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED vport_id, u16 OSAL_UNUSED mtu, u8 OSAL_UNUSED inner_vlan_removal, enum ecore_tpa_mode OSAL_UNUSED tpa_mode, u8 OSAL_UNUSED max_buffers_per_cqe, u8 OSAL_UNUSED only_untagged, u8 OSAL_UNUSED zero_placement_offset) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
356
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_vport_stop(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
357
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_filter_ucast(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_filter_ucast OSAL_UNUSED *p_param) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
358
static OSAL_INLINE void ecore_vf_pf_filter_mcast(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_filter_mcast OSAL_UNUSED *p_filter_cmd) {}
sys/dev/qlnx/qlnxe/ecore_vf.h
359
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_int_cleanup(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf.h
363
static OSAL_INLINE enum _ecore_status_t ecore_vf_pf_tunnel_param_update(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_tunnel_info OSAL_UNUSED *p_tunn) { return ECORE_INVAL; }
sys/dev/qlnx/qlnxe/ecore_vf.h
367
ecore_vf_hw_bar_size(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf.h
95
enum _ecore_status_t ecore_vf_pf_get_coalesce(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
106
void ecore_vf_get_port_mac(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
115
void ecore_vf_get_num_vlan_filters(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
124
void ecore_vf_get_num_mac_filters(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
135
bool ecore_vf_check_mac(struct ecore_hwfn *p_hwfn, u8 *mac);
sys/dev/qlnx/qlnxe/ecore_vf_api.h
170
bool ecore_vf_get_pre_fp_hsi(struct ecore_hwfn *p_hwfn);
sys/dev/qlnx/qlnxe/ecore_vf_api.h
183
void ecore_vf_get_fw_version(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
188
void ecore_vf_bulletin_get_udp_ports(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
201
void ecore_vf_set_hw_channel(struct ecore_hwfn *p_hwfn, bool b_is_hw);
sys/dev/qlnx/qlnxe/ecore_vf_api.h
204
static OSAL_INLINE enum _ecore_status_t ecore_vf_read_bulletin(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED *p_change) {return ECORE_INVAL;}
sys/dev/qlnx/qlnxe/ecore_vf_api.h
205
static OSAL_INLINE void ecore_vf_get_link_params(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_mcp_link_params OSAL_UNUSED *params) {}
sys/dev/qlnx/qlnxe/ecore_vf_api.h
206
static OSAL_INLINE void ecore_vf_get_link_state(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_mcp_link_state OSAL_UNUSED *link) {}
sys/dev/qlnx/qlnxe/ecore_vf_api.h
207
static OSAL_INLINE void ecore_vf_get_link_caps(struct ecore_hwfn OSAL_UNUSED *p_hwfn, struct ecore_mcp_link_capabilities OSAL_UNUSED *p_link_caps) {}
sys/dev/qlnx/qlnxe/ecore_vf_api.h
208
static OSAL_INLINE void ecore_vf_get_num_rxqs(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED *num_rxqs) {}
sys/dev/qlnx/qlnxe/ecore_vf_api.h
209
static OSAL_INLINE void ecore_vf_get_num_txqs(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED *num_txqs) {}
sys/dev/qlnx/qlnxe/ecore_vf_api.h
212
ecore_vf_get_num_cids(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
216
static OSAL_INLINE void ecore_vf_get_port_mac(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED *port_mac) {}
sys/dev/qlnx/qlnxe/ecore_vf_api.h
217
static OSAL_INLINE void ecore_vf_get_num_vlan_filters(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED *num_vlan_filters) {}
sys/dev/qlnx/qlnxe/ecore_vf_api.h
218
static OSAL_INLINE void ecore_vf_get_num_mac_filters(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED *num_mac_filters) {}
sys/dev/qlnx/qlnxe/ecore_vf_api.h
219
static OSAL_INLINE bool ecore_vf_check_mac(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u8 OSAL_UNUSED *mac) {return false;}
sys/dev/qlnx/qlnxe/ecore_vf_api.h
222
static OSAL_INLINE bool ecore_vf_get_pre_fp_hsi(struct ecore_hwfn OSAL_UNUSED *p_hwfn) {return false; }
sys/dev/qlnx/qlnxe/ecore_vf_api.h
224
static OSAL_INLINE void ecore_vf_get_fw_version(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED *fw_major, u16 OSAL_UNUSED *fw_minor, u16 OSAL_UNUSED *fw_rev, u16 OSAL_UNUSED *fw_eng) {}
sys/dev/qlnx/qlnxe/ecore_vf_api.h
225
static OSAL_INLINE void ecore_vf_bulletin_get_udp_ports(struct ecore_hwfn OSAL_UNUSED *p_hwfn, u16 OSAL_UNUSED *p_vxlan_port, u16 OSAL_UNUSED *p_geneve_port) { return; }
sys/dev/qlnx/qlnxe/ecore_vf_api.h
229
ecore_vf_set_hw_channel(struct ecore_hwfn OSAL_UNUSED *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
44
enum _ecore_status_t ecore_vf_read_bulletin(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
53
void ecore_vf_get_link_params(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
62
void ecore_vf_get_link_state(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
71
void ecore_vf_get_link_caps(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
80
void ecore_vf_get_num_rxqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
89
void ecore_vf_get_num_txqs(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/ecore_vf_api.h
98
void ecore_vf_get_num_cids(struct ecore_hwfn *p_hwfn, u8 *num_cids);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
106
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
117
p_hwfn = &ha->cdev.hwfns[hwfn_index];
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
118
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
125
if ((rval = ecore_dbg_grc_dump(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
135
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
194
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
205
p_hwfn = &ha->cdev.hwfns[hwfn_index];
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
206
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
213
if ((rval = ecore_dbg_idle_chk_dump(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
223
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
283
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
287
p_hwfn = &ha->cdev.hwfns[hwfn_index];
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
288
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
298
rval = ecore_dbg_mcp_trace_get_dump_buf_size(p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
303
rval = ecore_dbg_reg_fifo_get_dump_buf_size(p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
308
rval = ecore_dbg_igu_fifo_get_dump_buf_size(p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
313
rval = ecore_dbg_protection_override_get_dump_buf_size(p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
318
rval = ecore_dbg_fw_asserts_get_dump_buf_size(p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
328
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
351
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
364
p_hwfn = &ha->cdev.hwfns[hwfn_index];
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
365
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
375
rval = ecore_dbg_mcp_trace_dump(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
381
rval = ecore_dbg_reg_fifo_dump(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
387
rval = ecore_dbg_igu_fifo_dump(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
393
rval = ecore_dbg_protection_override_dump(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
399
rval = ecore_dbg_fw_asserts_dump(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
410
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
426
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
432
p_hwfn = &ha->cdev.hwfns[reg_rd_wr->hwfn_index];
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
437
reg_rd_wr->val = qlnx_reg_rd32(p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
444
qlnx_reg_wr32(p_hwfn, reg_rd_wr->addr,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
562
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
565
p_hwfn = &ha->cdev.hwfns[0];
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
567
qlnx_fill_link(ha, p_hwfn, &if_link);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
762
qlnx_lldp_configure(qlnx_host_t *ha, struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
770
ret = ecore_mcp_get_lldp_mac(p_hwfn, p_ptt, lldp_mac);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
810
ret = ecore_lldp_set_params(p_hwfn, p_ptt, &lldp_params);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
822
ret = ecore_lldp_set_system_tlvs(p_hwfn, p_ptt, &tlv_params);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
834
qlnx_register_default_lldp_tlvs(qlnx_host_t *ha, struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
839
ret = ecore_lldp_register_tlv(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
848
ret = ecore_lldp_register_tlv(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
857
ret = ecore_lldp_register_tlv(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
866
ret = ecore_lldp_register_tlv(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
875
ret = ecore_lldp_register_tlv(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
884
ret = ecore_lldp_register_tlv(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
893
ret = ecore_lldp_register_tlv(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
902
ret = ecore_lldp_register_tlv(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
911
ret = ecore_lldp_register_tlv(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
926
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
930
p_hwfn = &ha->cdev.hwfns[0];
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
931
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
939
ret = qlnx_lldp_configure(ha, p_hwfn, p_ptt, 0);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
947
ret = qlnx_register_default_lldp_tlvs(ha, p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
956
ret = qlnx_lldp_configure(ha, p_hwfn, p_ptt, 1);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
972
ret = ecore_lldp_set_system_tlvs(p_hwfn, p_ptt, &tlv_params);
sys/dev/qlnx/qlnxe/qlnx_ioctl.c
982
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/qlnx_os.c
1044
struct ecore_hwfn *p_hwfn = &ha->cdev.hwfns[0];
sys/dev/qlnx/qlnxe/qlnx_os.c
1045
ecore_mcp_get_mfw_ver(p_hwfn, NULL, &mfw_ver, NULL);
sys/dev/qlnx/qlnxe/qlnx_os.c
135
static void qlnx_update_rx_prod(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_os.c
1410
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
1424
p_hwfn = &ha->cdev.hwfns[(i % ha->cdev.num_hwfns)];
sys/dev/qlnx/qlnxe/qlnx_os.c
1429
ret = ecore_set_queue_coalesce(p_hwfn, 0,
sys/dev/qlnx/qlnxe/qlnx_os.c
1445
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
1459
p_hwfn = &ha->cdev.hwfns[(i % ha->cdev.num_hwfns)];
sys/dev/qlnx/qlnxe/qlnx_os.c
1464
ret = ecore_set_queue_coalesce(p_hwfn, (uint16_t)usecs,
sys/dev/qlnx/qlnxe/qlnx_os.c
179
static void qlnx_inform_vf_link_state(struct ecore_hwfn *p_hwfn, qlnx_host_t *ha);
sys/dev/qlnx/qlnxe/qlnx_os.c
2635
struct ecore_hwfn *p_hwfn = &ha->cdev.hwfns[0];
sys/dev/qlnx/qlnxe/qlnx_os.c
2649
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
2657
ret = ecore_mcp_phy_sfp_read(p_hwfn, p_ptt,
sys/dev/qlnx/qlnxe/qlnx_os.c
2661
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/qlnx_os.c
3653
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
3657
p_hwfn = &ha->cdev.hwfns[0];
sys/dev/qlnx/qlnxe/qlnx_os.c
3660
memcpy(ha->primary_mac, p_hwfn->hw_info.hw_mac_addr, ETH_ALEN);
sys/dev/qlnx/qlnxe/qlnx_os.c
3664
ecore_vf_read_bulletin(p_hwfn, &p_is_forced);
sys/dev/qlnx/qlnxe/qlnx_os.c
3665
if (ecore_vf_bulletin_get_forced_mac(p_hwfn, mac, &p_is_forced) ==
sys/dev/qlnx/qlnxe/qlnx_os.c
4397
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
4408
p_hwfn = &ha->cdev.hwfns[(fp->rss_id % cdev->num_hwfns)];
sys/dev/qlnx/qlnxe/qlnx_os.c
4435
ecore_eth_cqe_completion(p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_os.c
451
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
455
p_hwfn = arg;
sys/dev/qlnx/qlnxe/qlnx_os.c
457
if (p_hwfn == NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
462
ha = (qlnx_host_t *)p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
4639
qlnx_update_rx_prod(p_hwfn, rxq);
sys/dev/qlnx/qlnxe/qlnx_os.c
467
if (&ha->cdev.hwfns[i] == p_hwfn) {
sys/dev/qlnx/qlnxe/qlnx_os.c
4771
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
4774
p_hwfn = arg;
sys/dev/qlnx/qlnxe/qlnx_os.c
4776
ha = (qlnx_host_t *)p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
4782
ecore_int_sp_dpc(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
480
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
482
p_hwfn = context;
sys/dev/qlnx/qlnxe/qlnx_os.c
484
if (p_hwfn != NULL) {
sys/dev/qlnx/qlnxe/qlnx_os.c
485
qlnx_sp_isr(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
497
struct ecore_hwfn *p_hwfn = &ha->cdev.hwfns[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
502
TASK_INIT(&ha->sp_task[i], 0, qlnx_sp_taskqueue, p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
5146
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
5148
p_hwfn = hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
5150
data32 = bus_read_4(((qlnx_host_t *)p_hwfn->p_dev)->pci_reg, \
sys/dev/qlnx/qlnxe/qlnx_os.c
5151
(bus_size_t)(p_hwfn->reg_offset + reg_addr));
sys/dev/qlnx/qlnxe/qlnx_os.c
5159
struct ecore_hwfn *p_hwfn = hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
5161
bus_write_4(((qlnx_host_t *)p_hwfn->p_dev)->pci_reg, \
sys/dev/qlnx/qlnxe/qlnx_os.c
5162
(bus_size_t)(p_hwfn->reg_offset + reg_addr), value);
sys/dev/qlnx/qlnxe/qlnx_os.c
5170
struct ecore_hwfn *p_hwfn = hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
5172
bus_write_2(((qlnx_host_t *)p_hwfn->p_dev)->pci_reg, \
sys/dev/qlnx/qlnxe/qlnx_os.c
5173
(bus_size_t)(p_hwfn->reg_offset + reg_addr), value);
sys/dev/qlnx/qlnxe/qlnx_os.c
5181
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
5184
p_hwfn = hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
5186
cdev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
5188
offset = (uint32_t)((uint8_t *)reg_addr - (uint8_t *)(p_hwfn->doorbells));
sys/dev/qlnx/qlnxe/qlnx_os.c
5197
struct ecore_hwfn *p_hwfn = hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
5199
bus_write_4(((qlnx_host_t *)p_hwfn->p_dev)->pci_dbells, \
sys/dev/qlnx/qlnxe/qlnx_os.c
5200
(bus_size_t)(p_hwfn->db_offset + reg_addr), value);
sys/dev/qlnx/qlnxe/qlnx_os.c
5206
qlnx_direct_reg_rd32(void *p_hwfn, uint32_t *reg_addr)
sys/dev/qlnx/qlnxe/qlnx_os.c
5212
cdev = ((struct ecore_hwfn *)p_hwfn)->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
5221
qlnx_direct_reg_wr32(void *p_hwfn, void *reg_addr, uint32_t value)
sys/dev/qlnx/qlnxe/qlnx_os.c
5226
cdev = ((struct ecore_hwfn *)p_hwfn)->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
5235
qlnx_direct_reg_wr64(void *p_hwfn, void *reg_addr, uint64_t value)
sys/dev/qlnx/qlnxe/qlnx_os.c
5240
cdev = ((struct ecore_hwfn *)p_hwfn)->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
5267
qlnx_link_update(void *p_hwfn)
sys/dev/qlnx/qlnxe/qlnx_os.c
5272
ha = (qlnx_host_t *)((struct ecore_hwfn *)p_hwfn)->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
5274
qlnx_fill_link(ha, p_hwfn, &ha->if_link);
sys/dev/qlnx/qlnxe/qlnx_os.c
5291
qlnx_inform_vf_link_state(p_hwfn, ha);
sys/dev/qlnx/qlnxe/qlnx_os.c
5301
__qlnx_osal_vf_fill_acquire_resc_req(struct ecore_hwfn *p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_os.c
5313
qlnx_osal_vf_fill_acquire_resc_req(void *p_hwfn, void *p_resc_req,
sys/dev/qlnx/qlnxe/qlnx_os.c
5316
__qlnx_osal_vf_fill_acquire_resc_req(p_hwfn, p_sw_info);
sys/dev/qlnx/qlnxe/qlnx_os.c
5448
qlnx_schedule_recovery(void *p_hwfn)
sys/dev/qlnx/qlnxe/qlnx_os.c
5452
ha = (qlnx_host_t *)((struct ecore_hwfn *)p_hwfn)->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
5467
struct ecore_hwfn *p_hwfn = &cdev->hwfns[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
5468
p_hwfn->pf_params = *func_params;
sys/dev/qlnx/qlnxe/qlnx_os.c
5472
p_hwfn->using_ll2 = true;
sys/dev/qlnx/qlnxe/qlnx_os.c
5649
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
5652
p_hwfn = &ha->cdev.hwfns[0];
sys/dev/qlnx/qlnxe/qlnx_os.c
5653
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
5659
ecore_mcp_get_mfw_ver(p_hwfn, p_ptt, mfw_ver, NULL);
sys/dev/qlnx/qlnxe/qlnx_os.c
5661
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/qlnx_os.c
5669
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
5672
p_hwfn = &ha->cdev.hwfns[0];
sys/dev/qlnx/qlnxe/qlnx_os.c
5673
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
5679
ecore_mcp_get_flash_size(p_hwfn, p_ptt, flash_size);
sys/dev/qlnx/qlnxe/qlnx_os.c
5681
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/qlnx_os.c
5774
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
5779
p_hwfn = &cdev->hwfns[hwfn_index];
sys/dev/qlnx/qlnxe/qlnx_os.c
5785
hwfn_index, p_hwfn, sb_id, rel_sb_id, sb_info,
sys/dev/qlnx/qlnxe/qlnx_os.c
5788
rc = ecore_int_sb_init(p_hwfn, p_hwfn->p_main_ptt, sb_info,
sys/dev/qlnx/qlnxe/qlnx_os.c
6310
struct ecore_hwfn *p_hwfn = &cdev->hwfns[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
6312
vport_start_params.concrete_fid = p_hwfn->hw_info.concrete_fid;
sys/dev/qlnx/qlnxe/qlnx_os.c
6313
vport_start_params.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/qlnx_os.c
6315
rc = ecore_sp_vport_start(p_hwfn, &vport_start_params);
sys/dev/qlnx/qlnxe/qlnx_os.c
6323
ecore_hw_start_fastpath(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
6337
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
6369
p_hwfn = &cdev->hwfns[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
6398
sp_params.opaque_fid = p_hwfn->hw_info.opaque_fid;
sys/dev/qlnx/qlnxe/qlnx_os.c
6402
rc = ecore_sp_vport_update(p_hwfn, &sp_params,
sys/dev/qlnx/qlnxe/qlnx_os.c
6442
qlnx_update_rx_prod(struct ecore_hwfn *p_hwfn, struct qlnx_rx_queue *rxq)
sys/dev/qlnx/qlnxe/qlnx_os.c
6466
internal_ram_wr(p_hwfn, rxq->hw_rxq_prod_addr,
sys/dev/qlnx/qlnxe/qlnx_os.c
6506
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
6542
p_hwfn = &cdev->hwfns[(fp->rss_id % cdev->num_hwfns)];
sys/dev/qlnx/qlnxe/qlnx_os.c
6555
rc = ecore_eth_rx_queue_start(p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_os.c
6556
p_hwfn->hw_info.opaque_fid,
sys/dev/qlnx/qlnxe/qlnx_os.c
6577
qlnx_update_rx_prod(p_hwfn, fp->rxq);
sys/dev/qlnx/qlnxe/qlnx_os.c
6593
rc = ecore_eth_tx_queue_start(p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_os.c
6594
p_hwfn->hw_info.opaque_fid,
sys/dev/qlnx/qlnxe/qlnx_os.c
6765
struct ecore_hwfn *p_hwfn = &cdev->hwfns[(i % cdev->num_hwfns)];
sys/dev/qlnx/qlnxe/qlnx_os.c
6774
rc = ecore_eth_tx_queue_stop(p_hwfn,
sys/dev/qlnx/qlnxe/qlnx_os.c
6785
rc = ecore_eth_rx_queue_stop(p_hwfn, fp->rxq->handle, false,
sys/dev/qlnx/qlnxe/qlnx_os.c
6795
struct ecore_hwfn *p_hwfn = &cdev->hwfns[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
6797
rc = ecore_sp_vport_stop(p_hwfn, p_hwfn->hw_info.opaque_fid, 0);
sys/dev/qlnx/qlnxe/qlnx_os.c
7210
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
7215
p_hwfn = &ha->cdev.hwfns[hwfn_index];
sys/dev/qlnx/qlnxe/qlnx_os.c
7216
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
7223
rval = ecore_dbg_grc_get_dump_buf_size(p_hwfn, p_ptt, num_dwords);
sys/dev/qlnx/qlnxe/qlnx_os.c
7232
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/qlnx_os.c
7241
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
7246
p_hwfn = &ha->cdev.hwfns[hwfn_index];
sys/dev/qlnx/qlnxe/qlnx_os.c
7247
p_ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
7254
rval = ecore_dbg_idle_chk_get_dump_buf_size(p_hwfn, p_ptt, num_dwords);
sys/dev/qlnx/qlnxe/qlnx_os.c
7263
ecore_ptt_release(p_hwfn, p_ptt);
sys/dev/qlnx/qlnxe/qlnx_os.c
7534
__qlnx_osal_iov_vf_cleanup(struct ecore_hwfn *p_hwfn, uint8_t rel_vf_id)
sys/dev/qlnx/qlnxe/qlnx_os.c
7538
vf_info = ecore_iov_get_public_vf_info(p_hwfn, rel_vf_id, false);
sys/dev/qlnx/qlnxe/qlnx_os.c
7552
qlnx_osal_iov_vf_cleanup(void *p_hwfn, uint8_t relative_vf_id)
sys/dev/qlnx/qlnxe/qlnx_os.c
7554
__qlnx_osal_iov_vf_cleanup(p_hwfn, relative_vf_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
7559
__qlnx_iov_chk_ucast(struct ecore_hwfn *p_hwfn, int vfid,
sys/dev/qlnx/qlnxe/qlnx_os.c
7564
if (!ecore_iov_vf_has_vport_instance(p_hwfn, vfid)) {
sys/dev/qlnx/qlnxe/qlnx_os.c
7565
QL_DPRINT1(((qlnx_host_t *)p_hwfn->p_dev),
sys/dev/qlnx/qlnxe/qlnx_os.c
7570
vf = ecore_iov_get_public_vf_info(p_hwfn, vfid, true);
sys/dev/qlnx/qlnxe/qlnx_os.c
7583
qlnx_iov_chk_ucast(void *p_hwfn, int vfid, void *params)
sys/dev/qlnx/qlnxe/qlnx_os.c
7585
return (__qlnx_iov_chk_ucast(p_hwfn, vfid, params));
sys/dev/qlnx/qlnxe/qlnx_os.c
7615
qlnx_find_hwfn_index(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/qlnx_os.c
7620
cdev = p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
7623
if (&cdev->hwfns[i] == p_hwfn)
sys/dev/qlnx/qlnxe/qlnx_os.c
7634
__qlnx_pf_vf_msg(struct ecore_hwfn *p_hwfn, uint16_t rel_vf_id)
sys/dev/qlnx/qlnxe/qlnx_os.c
7636
qlnx_host_t *ha = (qlnx_host_t *)p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
7640
ha, p_hwfn->p_dev, p_hwfn, rel_vf_id);
sys/dev/qlnx/qlnxe/qlnx_os.c
7642
if ((i = qlnx_find_hwfn_index(p_hwfn)) == -1)
sys/dev/qlnx/qlnxe/qlnx_os.c
7657
qlnx_pf_vf_msg(void *p_hwfn, uint16_t relative_vf_id)
sys/dev/qlnx/qlnxe/qlnx_os.c
7659
return (__qlnx_pf_vf_msg(p_hwfn, relative_vf_id));
sys/dev/qlnx/qlnxe/qlnx_os.c
7663
__qlnx_vf_flr_update(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/qlnx_os.c
7665
qlnx_host_t *ha = (qlnx_host_t *)p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
7672
ha, p_hwfn->p_dev, p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
7674
if ((i = qlnx_find_hwfn_index(p_hwfn)) == -1)
sys/dev/qlnx/qlnxe/qlnx_os.c
7689
qlnx_vf_flr_update(void *p_hwfn)
sys/dev/qlnx/qlnxe/qlnx_os.c
7691
__qlnx_vf_flr_update(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
7699
qlnx_vf_bulleting_update(struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/qlnx_os.c
7701
qlnx_host_t *ha = (qlnx_host_t *)p_hwfn->p_dev;
sys/dev/qlnx/qlnxe/qlnx_os.c
7705
ha, p_hwfn->p_dev, p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
7707
if ((i = qlnx_find_hwfn_index(p_hwfn)) == -1)
sys/dev/qlnx/qlnxe/qlnx_os.c
7711
ha, p_hwfn->p_dev, p_hwfn, i);
sys/dev/qlnx/qlnxe/qlnx_os.c
7953
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
7978
p_hwfn = &ha->cdev.hwfns[0];
sys/dev/qlnx/qlnxe/qlnx_os.c
7979
ecore_iov_bulletin_set_mac(p_hwfn, vf_attr->mac_addr,
sys/dev/qlnx/qlnxe/qlnx_os.c
7988
qlnx_handle_vf_msg(qlnx_host_t *ha, struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/qlnx_os.c
7994
ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
7997
__qlnx_pf_vf_msg(p_hwfn, 0);
sys/dev/qlnx/qlnxe/qlnx_os.c
8001
ecore_iov_pf_get_pending_events(p_hwfn, events);
sys/dev/qlnx/qlnxe/qlnx_os.c
8007
ecore_for_each_vf(p_hwfn, i) {
sys/dev/qlnx/qlnxe/qlnx_os.c
8014
i, p_hwfn->p_dev->p_iov_info->first_vf_in_pf + i);
sys/dev/qlnx/qlnxe/qlnx_os.c
8017
if (ecore_iov_copy_vf_msg(p_hwfn, ptt, i))
sys/dev/qlnx/qlnxe/qlnx_os.c
8020
ecore_iov_process_mbx_req(p_hwfn, ptt, i);
sys/dev/qlnx/qlnxe/qlnx_os.c
8023
ecore_ptt_release(p_hwfn, ptt);
sys/dev/qlnx/qlnxe/qlnx_os.c
8029
qlnx_handle_vf_flr_update(qlnx_host_t *ha, struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/qlnx_os.c
8034
ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
8038
__qlnx_vf_flr_update(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
8042
ret = ecore_iov_vf_flr_cleanup(p_hwfn, ptt);
sys/dev/qlnx/qlnxe/qlnx_os.c
8048
ecore_ptt_release(p_hwfn, ptt);
sys/dev/qlnx/qlnxe/qlnx_os.c
8054
qlnx_handle_bulletin_update(qlnx_host_t *ha, struct ecore_hwfn *p_hwfn)
sys/dev/qlnx/qlnxe/qlnx_os.c
8059
ptt = ecore_ptt_acquire(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
8063
qlnx_vf_bulleting_update(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
8067
ecore_for_each_vf(p_hwfn, i) {
sys/dev/qlnx/qlnxe/qlnx_os.c
8069
p_hwfn, i);
sys/dev/qlnx/qlnxe/qlnx_os.c
8070
ecore_iov_post_vf_bulletin(p_hwfn, i, ptt);
sys/dev/qlnx/qlnxe/qlnx_os.c
8073
ecore_ptt_release(p_hwfn, ptt);
sys/dev/qlnx/qlnxe/qlnx_os.c
8081
struct ecore_hwfn *p_hwfn;
sys/dev/qlnx/qlnxe/qlnx_os.c
8085
p_hwfn = context;
sys/dev/qlnx/qlnxe/qlnx_os.c
8087
if (p_hwfn == NULL)
sys/dev/qlnx/qlnxe/qlnx_os.c
8090
ha = (qlnx_host_t *)(p_hwfn->p_dev);
sys/dev/qlnx/qlnxe/qlnx_os.c
8092
if ((i = qlnx_find_hwfn_index(p_hwfn)) == -1)
sys/dev/qlnx/qlnxe/qlnx_os.c
8097
qlnx_handle_vf_msg(ha, p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
8101
qlnx_handle_vf_flr_update(ha, p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
8105
qlnx_handle_bulletin_update(ha, p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
8117
struct ecore_hwfn *p_hwfn = &ha->cdev.hwfns[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
8122
TASK_INIT(&ha->sriov_task[i].pf_task, 0, qlnx_pf_taskqueue, p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
8157
qlnx_inform_vf_link_state(struct ecore_hwfn *p_hwfn, qlnx_host_t *ha)
sys/dev/qlnx/qlnxe/qlnx_os.c
8164
if (!p_hwfn->pf_iov_info)
sys/dev/qlnx/qlnxe/qlnx_os.c
8171
memcpy(&caps, ecore_mcp_get_link_capabilities(p_hwfn), sizeof(caps));
sys/dev/qlnx/qlnxe/qlnx_os.c
8172
memcpy(&link, ecore_mcp_get_link_state(p_hwfn), sizeof(link));
sys/dev/qlnx/qlnxe/qlnx_os.c
8173
memcpy(¶ms, ecore_mcp_get_link_params(p_hwfn), sizeof(params));
sys/dev/qlnx/qlnxe/qlnx_os.c
8178
for (i = 0; i < p_hwfn->p_dev->p_iov_info->total_vfs; i++) {
sys/dev/qlnx/qlnxe/qlnx_os.c
8189
link.speed = (p_hwfn->p_dev->num_hwfns > 1) ?
sys/dev/qlnx/qlnxe/qlnx_os.c
8193
ecore_iov_set_link(p_hwfn, i, ¶ms, &link, &caps);
sys/dev/qlnx/qlnxe/qlnx_os.c
8196
qlnx_vf_bulleting_update(p_hwfn);
sys/dev/qlnx/qlnxe/qlnx_os.c
929
struct ecore_hwfn *p_hwfn = &ha->cdev.hwfns[i];
sys/dev/qlnx/qlnxe/qlnx_os.c
943
qlnx_sp_intr, p_hwfn, &ha->sp_handle[i])) {
sys/dev/qlnx/qlnxe/qlnx_os.c
950
" sp_irq %p sp_handle %p\n", p_hwfn,
sys/dev/qlnx/qlnxr/qlnxr_os.c
1200
struct ecore_hwfn *p_hwfn = rdma_ctx;
sys/dev/qlnx/qlnxr/qlnxr_os.c
1204
ha = (struct qlnx_host *)(p_hwfn->p_dev);
sys/dev/qlnx/qlnxr/qlnxr_os.c
1208
ecore_llh_remove_mac_filter(p_hwfn->p_dev, 0, old_mac_address);
sys/dev/qlnx/qlnxr/qlnxr_os.c
1211
ret = ecore_llh_add_mac_filter(p_hwfn->p_dev, 0, new_mac_address);