Lines Matching refs:dmae

183 	struct dmae_command *dmae = &bp->stats_dmae;  in bnx2x_hw_stats_post()  local
197 memset(dmae, 0, sizeof(struct dmae_command)); in bnx2x_hw_stats_post()
198 dmae->opcode = opcode; in bnx2x_hw_stats_post()
199 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, dmae[0])); in bnx2x_hw_stats_post()
200 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, dmae[0])); in bnx2x_hw_stats_post()
201 dmae->dst_addr_lo = (DMAE_REG_CMD_MEM + in bnx2x_hw_stats_post()
204 dmae->dst_addr_hi = 0; in bnx2x_hw_stats_post()
205 dmae->len = sizeof(struct dmae_command) >> 2; in bnx2x_hw_stats_post()
207 dmae->len--; in bnx2x_hw_stats_post()
208 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx + 1] >> 2; in bnx2x_hw_stats_post()
209 dmae->comp_addr_hi = 0; in bnx2x_hw_stats_post()
210 dmae->comp_val = 1; in bnx2x_hw_stats_post()
213 bnx2x_post_dmae(bp, dmae, loader_idx); in bnx2x_hw_stats_post()
217 bnx2x_post_dmae(bp, dmae, INIT_DMAE_C(bp)); in bnx2x_hw_stats_post()
244 struct dmae_command *dmae; in bnx2x_stats_pmf_update() local
259 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_stats_pmf_update()
260 dmae->opcode = bnx2x_dmae_opcode_add_comp(opcode, DMAE_COMP_GRC); in bnx2x_stats_pmf_update()
261 dmae->src_addr_lo = bp->port.port_stx >> 2; in bnx2x_stats_pmf_update()
262 dmae->src_addr_hi = 0; in bnx2x_stats_pmf_update()
263 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_stats_pmf_update()
264 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_stats_pmf_update()
265 dmae->len = DMAE_LEN32_RD_MAX; in bnx2x_stats_pmf_update()
266 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_stats_pmf_update()
267 dmae->comp_addr_hi = 0; in bnx2x_stats_pmf_update()
268 dmae->comp_val = 1; in bnx2x_stats_pmf_update()
270 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_stats_pmf_update()
271 dmae->opcode = bnx2x_dmae_opcode_add_comp(opcode, DMAE_COMP_PCI); in bnx2x_stats_pmf_update()
272 dmae->src_addr_lo = (bp->port.port_stx >> 2) + DMAE_LEN32_RD_MAX; in bnx2x_stats_pmf_update()
273 dmae->src_addr_hi = 0; in bnx2x_stats_pmf_update()
274 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats) + in bnx2x_stats_pmf_update()
276 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats) + in bnx2x_stats_pmf_update()
278 dmae->len = (sizeof(struct host_port_stats) >> 2) - DMAE_LEN32_RD_MAX; in bnx2x_stats_pmf_update()
279 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_stats_pmf_update()
280 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_stats_pmf_update()
281 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_stats_pmf_update()
290 struct dmae_command *dmae; in bnx2x_port_stats_init() local
311 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
312 dmae->opcode = opcode; in bnx2x_port_stats_init()
313 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_init()
314 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_init()
315 dmae->dst_addr_lo = bp->port.port_stx >> 2; in bnx2x_port_stats_init()
316 dmae->dst_addr_hi = 0; in bnx2x_port_stats_init()
317 dmae->len = sizeof(struct host_port_stats) >> 2; in bnx2x_port_stats_init()
318 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
319 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
320 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 = U64_LO(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_port_stats_init()
328 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_port_stats_init()
329 dmae->dst_addr_lo = bp->func_stx >> 2; in bnx2x_port_stats_init()
330 dmae->dst_addr_hi = 0; in bnx2x_port_stats_init()
331 dmae->len = sizeof(struct host_func_stats) >> 2; in bnx2x_port_stats_init()
332 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
333 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
334 dmae->comp_val = 1; in bnx2x_port_stats_init()
348 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
349 dmae->opcode = opcode; in bnx2x_port_stats_init()
351 dmae->src_addr_lo = (mac_addr + in bnx2x_port_stats_init()
353 dmae->len = (8 + BIGMAC_REGISTER_TX_STAT_GTBYT - in bnx2x_port_stats_init()
356 dmae->src_addr_lo = (mac_addr + in bnx2x_port_stats_init()
358 dmae->len = (8 + BIGMAC2_REGISTER_TX_STAT_GTBYT - in bnx2x_port_stats_init()
362 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
363 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats)); in bnx2x_port_stats_init()
364 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats)); in bnx2x_port_stats_init()
365 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
366 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
367 dmae->comp_val = 1; in bnx2x_port_stats_init()
371 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
372 dmae->opcode = opcode; in bnx2x_port_stats_init()
373 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
375 dmae->src_addr_lo = (mac_addr + in bnx2x_port_stats_init()
377 dmae->dst_addr_lo = in bnx2x_port_stats_init()
380 dmae->dst_addr_hi = in bnx2x_port_stats_init()
383 dmae->len = (8 + BIGMAC_REGISTER_RX_STAT_GRIPJ - in bnx2x_port_stats_init()
386 dmae->src_addr_lo = in bnx2x_port_stats_init()
388 dmae->dst_addr_lo = in bnx2x_port_stats_init()
391 dmae->dst_addr_hi = in bnx2x_port_stats_init()
394 dmae->len = (8 + BIGMAC2_REGISTER_RX_STAT_GRIPJ - in bnx2x_port_stats_init()
398 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
399 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
400 dmae->comp_val = 1; in bnx2x_port_stats_init()
407 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
408 dmae->opcode = opcode; in bnx2x_port_stats_init()
409 dmae->src_addr_lo = (mac_addr + in bnx2x_port_stats_init()
411 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
412 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats)); in bnx2x_port_stats_init()
413 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats)); in bnx2x_port_stats_init()
414 dmae->len = EMAC_REG_EMAC_RX_STAT_AC_COUNT; in bnx2x_port_stats_init()
415 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
416 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
417 dmae->comp_val = 1; in bnx2x_port_stats_init()
420 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
421 dmae->opcode = opcode; in bnx2x_port_stats_init()
422 dmae->src_addr_lo = (mac_addr + in bnx2x_port_stats_init()
424 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
425 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats) + in bnx2x_port_stats_init()
427 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats) + in bnx2x_port_stats_init()
429 dmae->len = 1; in bnx2x_port_stats_init()
430 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
431 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
432 dmae->comp_val = 1; in bnx2x_port_stats_init()
435 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
436 dmae->opcode = opcode; in bnx2x_port_stats_init()
437 dmae->src_addr_lo = (mac_addr + in bnx2x_port_stats_init()
439 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
440 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, mac_stats) + in bnx2x_port_stats_init()
442 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, mac_stats) + in bnx2x_port_stats_init()
444 dmae->len = EMAC_REG_EMAC_TX_STAT_AC_COUNT; in bnx2x_port_stats_init()
445 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
446 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
447 dmae->comp_val = 1; in bnx2x_port_stats_init()
451 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
452 dmae->opcode = opcode; in bnx2x_port_stats_init()
453 dmae->src_addr_lo = (port ? NIG_REG_STAT1_BRB_DISCARD : in bnx2x_port_stats_init()
455 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
456 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, nig_stats)); in bnx2x_port_stats_init()
457 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, nig_stats)); in bnx2x_port_stats_init()
458 dmae->len = (sizeof(struct nig_stats) - 4*sizeof(u32)) >> 2; in bnx2x_port_stats_init()
459 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
460 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
461 dmae->comp_val = 1; in bnx2x_port_stats_init()
463 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
464 dmae->opcode = opcode; in bnx2x_port_stats_init()
465 dmae->src_addr_lo = (port ? NIG_REG_STAT1_EGRESS_MAC_PKT0 : in bnx2x_port_stats_init()
467 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
468 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, nig_stats) + in bnx2x_port_stats_init()
470 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, nig_stats) + in bnx2x_port_stats_init()
472 dmae->len = (2*sizeof(u32)) >> 2; in bnx2x_port_stats_init()
473 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_init()
474 dmae->comp_addr_hi = 0; in bnx2x_port_stats_init()
475 dmae->comp_val = 1; in bnx2x_port_stats_init()
477 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_init()
478 dmae->opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_GRC, DMAE_DST_PCI, in bnx2x_port_stats_init()
480 dmae->src_addr_lo = (port ? NIG_REG_STAT1_EGRESS_MAC_PKT1 : in bnx2x_port_stats_init()
482 dmae->src_addr_hi = 0; in bnx2x_port_stats_init()
483 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, nig_stats) + in bnx2x_port_stats_init()
485 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, nig_stats) + in bnx2x_port_stats_init()
487 dmae->len = (2*sizeof(u32)) >> 2; in bnx2x_port_stats_init()
488 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_init()
489 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_init()
490 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_port_stats_init()
497 struct dmae_command *dmae = &bp->stats_dmae; in bnx2x_func_stats_init() local
507 memset(dmae, 0, sizeof(struct dmae_command)); in bnx2x_func_stats_init()
509 dmae->opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_PCI, DMAE_DST_GRC, in bnx2x_func_stats_init()
511 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_func_stats_init()
512 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_func_stats_init()
513 dmae->dst_addr_lo = bp->func_stx >> 2; in bnx2x_func_stats_init()
514 dmae->dst_addr_hi = 0; in bnx2x_func_stats_init()
515 dmae->len = sizeof(struct host_func_stats) >> 2; in bnx2x_func_stats_init()
516 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_func_stats_init()
517 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_func_stats_init()
518 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_func_stats_init()
1134 struct dmae_command *dmae; in bnx2x_port_stats_stop() local
1145 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_stop()
1147 dmae->opcode = bnx2x_dmae_opcode_add_comp( in bnx2x_port_stats_stop()
1150 dmae->opcode = bnx2x_dmae_opcode_add_comp( in bnx2x_port_stats_stop()
1152 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_stop()
1153 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_stop()
1154 dmae->dst_addr_lo = bp->port.port_stx >> 2; in bnx2x_port_stats_stop()
1155 dmae->dst_addr_hi = 0; in bnx2x_port_stats_stop()
1156 dmae->len = sizeof(struct host_port_stats) >> 2; in bnx2x_port_stats_stop()
1158 dmae->comp_addr_lo = dmae_reg_go_c[loader_idx] >> 2; in bnx2x_port_stats_stop()
1159 dmae->comp_addr_hi = 0; in bnx2x_port_stats_stop()
1160 dmae->comp_val = 1; in bnx2x_port_stats_stop()
1162 dmae->comp_addr_lo = in bnx2x_port_stats_stop()
1164 dmae->comp_addr_hi = in bnx2x_port_stats_stop()
1166 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_port_stats_stop()
1174 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_stop()
1175 dmae->opcode = in bnx2x_port_stats_stop()
1177 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_port_stats_stop()
1178 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, func_stats)); in bnx2x_port_stats_stop()
1179 dmae->dst_addr_lo = bp->func_stx >> 2; in bnx2x_port_stats_stop()
1180 dmae->dst_addr_hi = 0; in bnx2x_port_stats_stop()
1181 dmae->len = sizeof(struct host_func_stats) >> 2; in bnx2x_port_stats_stop()
1182 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_stop()
1183 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_stop()
1184 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_port_stats_stop()
1257 struct dmae_command *dmae; in bnx2x_port_stats_base_init() local
1268 dmae = bnx2x_sp(bp, dmae[bp->executer_idx++]); in bnx2x_port_stats_base_init()
1269 dmae->opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_PCI, DMAE_DST_GRC, in bnx2x_port_stats_base_init()
1271 dmae->src_addr_lo = U64_LO(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_base_init()
1272 dmae->src_addr_hi = U64_HI(bnx2x_sp_mapping(bp, port_stats)); in bnx2x_port_stats_base_init()
1273 dmae->dst_addr_lo = bp->port.port_stx >> 2; in bnx2x_port_stats_base_init()
1274 dmae->dst_addr_hi = 0; in bnx2x_port_stats_base_init()
1275 dmae->len = sizeof(struct host_port_stats) >> 2; in bnx2x_port_stats_base_init()
1276 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_base_init()
1277 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_port_stats_base_init()
1278 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_port_stats_base_init()
1314 struct dmae_command *dmae = &bp->stats_dmae; in bnx2x_func_stats_base_update() local
1324 memset(dmae, 0, sizeof(struct dmae_command)); in bnx2x_func_stats_base_update()
1326 dmae->opcode = bnx2x_dmae_opcode(bp, DMAE_SRC_GRC, DMAE_DST_PCI, in bnx2x_func_stats_base_update()
1328 dmae->src_addr_lo = bp->func_stx >> 2; in bnx2x_func_stats_base_update()
1329 dmae->src_addr_hi = 0; in bnx2x_func_stats_base_update()
1330 dmae->dst_addr_lo = U64_LO(bnx2x_sp_mapping(bp, func_stats_base)); in bnx2x_func_stats_base_update()
1331 dmae->dst_addr_hi = U64_HI(bnx2x_sp_mapping(bp, func_stats_base)); in bnx2x_func_stats_base_update()
1332 dmae->len = sizeof(struct host_func_stats) >> 2; in bnx2x_func_stats_base_update()
1333 dmae->comp_addr_lo = U64_LO(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_func_stats_base_update()
1334 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, stats_comp)); in bnx2x_func_stats_base_update()
1335 dmae->comp_val = DMAE_COMP_VAL; in bnx2x_func_stats_base_update()