Lines Matching refs:dmae
156 struct dmae_command *dmae = &bp->stats_dmae; in bnx2x_hw_stats_post() local
175 memset(dmae, 0, sizeof(struct dmae_command)); in bnx2x_hw_stats_post()
176 dmae->opcode = opcode; in bnx2x_hw_stats_post()
177 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, dmae[0])); in bnx2x_hw_stats_post()
178 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, dmae[0])); in bnx2x_hw_stats_post()
179 dmae->dst_addr_lo = (DMAE_REG_CMD_MEM + in bnx2x_hw_stats_post()
182 dmae->dst_addr_hi = 0; in bnx2x_hw_stats_post()
183 dmae->len = sizeof(struct dmae_command) >> 2; in bnx2x_hw_stats_post()
185 dmae->len--; in bnx2x_hw_stats_post()
186 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx + 1] >> 2; in bnx2x_hw_stats_post()
187 dmae->comp_addr_hi = 0; in bnx2x_hw_stats_post()
188 dmae->comp_val = 1; in bnx2x_hw_stats_post()
191 bnx2x_post_dmae(bp, dmae, loader_idx); in bnx2x_hw_stats_post()
195 bnx2x_issue_dmae_with_comp(bp, dmae, stats_comp); in bnx2x_hw_stats_post()
222 struct dmae_command *dmae; in bnx2x_stats_pmf_update() local
237 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_stats_pmf_update()
238 dmae->opcode = bnx2x_dmae_opcode_add_comp(opcode, DMAE_COMP_GRC); in bnx2x_stats_pmf_update()
239 dmae->src_addr_lo = bp->port.port_stx >> 2; in bnx2x_stats_pmf_update()
240 dmae->src_addr_hi = 0; in bnx2x_stats_pmf_update()
241 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_stats_pmf_update()
242 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_stats_pmf_update()
243 dmae->len = DMAE_LEN32_RD_MAX; in bnx2x_stats_pmf_update()
244 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_stats_pmf_update()
245 dmae->comp_addr_hi = 0; in bnx2x_stats_pmf_update()
246 dmae->comp_val = 1; in bnx2x_stats_pmf_update()
248 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_stats_pmf_update()
249 dmae->opcode = bnx2x_dmae_opcode_add_comp(opcode, DMAE_COMP_PCI); in bnx2x_stats_pmf_update()
250 dmae->src_addr_lo = (bp->port.port_stx >> 2) + DMAE_LEN32_RD_MAX; in bnx2x_stats_pmf_update()
251 dmae->src_addr_hi = 0; in bnx2x_stats_pmf_update()
252 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats) + in bnx2x_stats_pmf_update()
254 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats) + in bnx2x_stats_pmf_update()
256 dmae->len = bnx2x_get_port_stats_dma_len(bp) - DMAE_LEN32_RD_MAX; in bnx2x_stats_pmf_update()
258 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_stats_pmf_update()
259 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_stats_pmf_update()
260 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_stats_pmf_update()
269 struct dmae_command *dmae; in bnx2x_port_stats_init() local
290 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
291 dmae->opcode = opcode; in bnx2x_port_stats_init()
292 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_init()
293 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_init()
294 dmae->dst_addr_lo = bp->port.port_stx >> 2; in bnx2x_port_stats_init()
295 dmae->dst_addr_hi = 0; in bnx2x_port_stats_init()
296 dmae->len = bnx2x_get_port_stats_dma_len(bp); in bnx2x_port_stats_init()
297 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
298 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
299 dmae->comp_val = 1; in bnx2x_port_stats_init()
304 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
305 dmae->opcode = opcode; in bnx2x_port_stats_init()
306 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_port_stats_init()
307 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_port_stats_init()
308 dmae->dst_addr_lo = bp->func_stx >> 2; in bnx2x_port_stats_init()
309 dmae->dst_addr_hi = 0; in bnx2x_port_stats_init()
310 dmae->len = sizeof(struct host_func_stats) >> 2; in bnx2x_port_stats_init()
311 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
312 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
313 dmae->comp_val = 1; in bnx2x_port_stats_init()
325 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
326 dmae->opcode = opcode; in bnx2x_port_stats_init()
327 dmae->src_addr_lo = (mac_addr + in bnx2x_port_stats_init()
329 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
330 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats)); in bnx2x_port_stats_init()
331 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats)); in bnx2x_port_stats_init()
332 dmae->len = EMAC_REG_EMAC_RX_STAT_AC_COUNT; in bnx2x_port_stats_init()
333 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
334 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
335 dmae->comp_val = 1; in bnx2x_port_stats_init()
338 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
339 dmae->opcode = opcode; in bnx2x_port_stats_init()
340 dmae->src_addr_lo = (mac_addr + in bnx2x_port_stats_init()
342 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
343 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats) + in bnx2x_port_stats_init()
345 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats) + in bnx2x_port_stats_init()
347 dmae->len = 1; in bnx2x_port_stats_init()
348 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
349 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
350 dmae->comp_val = 1; in bnx2x_port_stats_init()
353 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
354 dmae->opcode = opcode; in bnx2x_port_stats_init()
355 dmae->src_addr_lo = (mac_addr + in bnx2x_port_stats_init()
357 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
358 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats) + in bnx2x_port_stats_init()
360 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats) + in bnx2x_port_stats_init()
362 dmae->len = EMAC_REG_EMAC_TX_STAT_AC_COUNT; in bnx2x_port_stats_init()
363 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
364 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
365 dmae->comp_val = 1; in bnx2x_port_stats_init()
415 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
416 dmae->opcode = opcode; in bnx2x_port_stats_init()
417 dmae->src_addr_lo = tx_src_addr_lo; in bnx2x_port_stats_init()
418 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
419 dmae->len = tx_len; in bnx2x_port_stats_init()
420 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats)); in bnx2x_port_stats_init()
421 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats)); in bnx2x_port_stats_init()
422 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
423 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
424 dmae->comp_val = 1; in bnx2x_port_stats_init()
427 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
428 dmae->opcode = opcode; in bnx2x_port_stats_init()
429 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
430 dmae->src_addr_lo = rx_src_addr_lo; in bnx2x_port_stats_init()
431 dmae->dst_addr_lo = in bnx2x_port_stats_init()
433 dmae->dst_addr_hi = in bnx2x_port_stats_init()
435 dmae->len = rx_len; in bnx2x_port_stats_init()
436 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
437 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
438 dmae->comp_val = 1; in bnx2x_port_stats_init()
443 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
444 dmae->opcode = opcode; in bnx2x_port_stats_init()
445 dmae->src_addr_lo = (port ? NIG_REG_STAT1_EGRESS_MAC_PKT0 : in bnx2x_port_stats_init()
447 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
448 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, nig_stats) + in bnx2x_port_stats_init()
450 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, nig_stats) + in bnx2x_port_stats_init()
452 dmae->len = (2*sizeof(u32)) >> 2; in bnx2x_port_stats_init()
453 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
454 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
455 dmae->comp_val = 1; in bnx2x_port_stats_init()
457 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
458 dmae->opcode = opcode; in bnx2x_port_stats_init()
459 dmae->src_addr_lo = (port ? NIG_REG_STAT1_EGRESS_MAC_PKT1 : in bnx2x_port_stats_init()
461 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
462 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, nig_stats) + in bnx2x_port_stats_init()
464 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, nig_stats) + in bnx2x_port_stats_init()
466 dmae->len = (2*sizeof(u32)) >> 2; in bnx2x_port_stats_init()
467 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
468 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
469 dmae->comp_val = 1; in bnx2x_port_stats_init()
472 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
473 dmae->opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_GRC, DMAE_DST_PCI, in bnx2x_port_stats_init()
475 dmae->src_addr_lo = (port ? NIG_REG_STAT1_BRB_DISCARD : in bnx2x_port_stats_init()
477 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
478 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, nig_stats)); in bnx2x_port_stats_init()
479 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, nig_stats)); in bnx2x_port_stats_init()
480 dmae->len = (sizeof(struct nig_stats) - 4*sizeof(u32)) >> 2; in bnx2x_port_stats_init()
482 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_init()
483 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_init()
484 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_port_stats_init()
491 struct dmae_command *dmae = &bp->stats_dmae; in bnx2x_func_stats_init() local
501 memset(dmae, 0, sizeof(struct dmae_command)); in bnx2x_func_stats_init()
503 dmae->opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_PCI, DMAE_DST_GRC, in bnx2x_func_stats_init()
505 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_func_stats_init()
506 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_func_stats_init()
507 dmae->dst_addr_lo = bp->func_stx >> 2; in bnx2x_func_stats_init()
508 dmae->dst_addr_hi = 0; in bnx2x_func_stats_init()
509 dmae->len = sizeof(struct host_func_stats) >> 2; in bnx2x_func_stats_init()
510 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_func_stats_init()
511 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_func_stats_init()
512 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_func_stats_init()
1266 struct dmae_command *dmae; in bnx2x_port_stats_stop() local
1277 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_stop()
1279 dmae->opcode = bnx2x_dmae_opcode_add_comp( in bnx2x_port_stats_stop()
1282 dmae->opcode = bnx2x_dmae_opcode_add_comp( in bnx2x_port_stats_stop()
1285 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_stop()
1286 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_stop()
1287 dmae->dst_addr_lo = bp->port.port_stx >> 2; in bnx2x_port_stats_stop()
1288 dmae->dst_addr_hi = 0; in bnx2x_port_stats_stop()
1289 dmae->len = bnx2x_get_port_stats_dma_len(bp); in bnx2x_port_stats_stop()
1291 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_stop()
1292 dmae->comp_addr_hi = 0; in bnx2x_port_stats_stop()
1293 dmae->comp_val = 1; in bnx2x_port_stats_stop()
1295 dmae->comp_addr_lo = in bnx2x_port_stats_stop()
1297 dmae->comp_addr_hi = in bnx2x_port_stats_stop()
1299 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_port_stats_stop()
1307 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_stop()
1308 dmae->opcode = in bnx2x_port_stats_stop()
1310 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_port_stats_stop()
1311 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_port_stats_stop()
1312 dmae->dst_addr_lo = bp->func_stx >> 2; in bnx2x_port_stats_stop()
1313 dmae->dst_addr_hi = 0; in bnx2x_port_stats_stop()
1314 dmae->len = sizeof(struct host_func_stats) >> 2; in bnx2x_port_stats_stop()
1315 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_stop()
1316 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_stop()
1317 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_port_stats_stop()
1404 struct dmae_command *dmae; in bnx2x_port_stats_base_init() local
1415 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_base_init()
1416 dmae->opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_PCI, DMAE_DST_GRC, in bnx2x_port_stats_base_init()
1418 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_base_init()
1419 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_base_init()
1420 dmae->dst_addr_lo = bp->port.port_stx >> 2; in bnx2x_port_stats_base_init()
1421 dmae->dst_addr_hi = 0; in bnx2x_port_stats_base_init()
1422 dmae->len = bnx2x_get_port_stats_dma_len(bp); in bnx2x_port_stats_base_init()
1423 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_base_init()
1424 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_base_init()
1425 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_port_stats_base_init()