aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x_main.c
diff options
context:
space:
mode:
authorEilon Greenstein <eilong@broadcom.com>2009-03-02 03:01:09 -0500
committerDavid S. Miller <davem@davemloft.net>2009-03-03 01:32:48 -0500
commitc3eefaf676646281c07f93cb523a7be4eab67f8c (patch)
tree326545411c6a95206e08fea2ead5ee1b4c9739a7 /drivers/net/bnx2x_main.c
parentc016201c5c6520abfcbd0c539fbf2524dd431ce6 (diff)
bnx2x: Debug prints
Add the FP index to relevant debug prints and simply beautify some others Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x_main.c')
-rw-r--r--drivers/net/bnx2x_main.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c
index bb9d53966fc1..e5952c57b40d 100644
--- a/drivers/net/bnx2x_main.c
+++ b/drivers/net/bnx2x_main.c
@@ -216,7 +216,7 @@ void bnx2x_write_dmae(struct bnx2x *bp, dma_addr_t dma_addr, u32 dst_addr,
216 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, wb_comp)); 216 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, wb_comp));
217 dmae->comp_val = DMAE_COMP_VAL; 217 dmae->comp_val = DMAE_COMP_VAL;
218 218
219 DP(BNX2X_MSG_OFF, "dmae: opcode 0x%08x\n" 219 DP(BNX2X_MSG_OFF, "DMAE: opcode 0x%08x\n"
220 DP_LEVEL "src_addr [%x:%08x] len [%d *4] " 220 DP_LEVEL "src_addr [%x:%08x] len [%d *4] "
221 "dst_addr [%x:%08x (%08x)]\n" 221 "dst_addr [%x:%08x (%08x)]\n"
222 DP_LEVEL "comp_addr [%x:%08x] comp_val 0x%08x\n", 222 DP_LEVEL "comp_addr [%x:%08x] comp_val 0x%08x\n",
@@ -237,7 +237,7 @@ void bnx2x_write_dmae(struct bnx2x *bp, dma_addr_t dma_addr, u32 dst_addr,
237 DP(BNX2X_MSG_OFF, "wb_comp 0x%08x\n", *wb_comp); 237 DP(BNX2X_MSG_OFF, "wb_comp 0x%08x\n", *wb_comp);
238 238
239 if (!cnt) { 239 if (!cnt) {
240 BNX2X_ERR("dmae timeout!\n"); 240 BNX2X_ERR("DMAE timeout!\n");
241 break; 241 break;
242 } 242 }
243 cnt--; 243 cnt--;
@@ -292,7 +292,7 @@ void bnx2x_read_dmae(struct bnx2x *bp, u32 src_addr, u32 len32)
292 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, wb_comp)); 292 dmae->comp_addr_hi = U64_HI(bnx2x_sp_mapping(bp, wb_comp));
293 dmae->comp_val = DMAE_COMP_VAL; 293 dmae->comp_val = DMAE_COMP_VAL;
294 294
295 DP(BNX2X_MSG_OFF, "dmae: opcode 0x%08x\n" 295 DP(BNX2X_MSG_OFF, "DMAE: opcode 0x%08x\n"
296 DP_LEVEL "src_addr [%x:%08x] len [%d *4] " 296 DP_LEVEL "src_addr [%x:%08x] len [%d *4] "
297 "dst_addr [%x:%08x (%08x)]\n" 297 "dst_addr [%x:%08x (%08x)]\n"
298 DP_LEVEL "comp_addr [%x:%08x] comp_val 0x%08x\n", 298 DP_LEVEL "comp_addr [%x:%08x] comp_val 0x%08x\n",
@@ -309,7 +309,7 @@ void bnx2x_read_dmae(struct bnx2x *bp, u32 src_addr, u32 len32)
309 while (*wb_comp != DMAE_COMP_VAL) { 309 while (*wb_comp != DMAE_COMP_VAL) {
310 310
311 if (!cnt) { 311 if (!cnt) {
312 BNX2X_ERR("dmae timeout!\n"); 312 BNX2X_ERR("DMAE timeout!\n");
313 break; 313 break;
314 } 314 }
315 cnt--; 315 cnt--;
@@ -517,13 +517,13 @@ static void bnx2x_panic_dump(struct bnx2x *bp)
517 for_each_rx_queue(bp, i) { 517 for_each_rx_queue(bp, i) {
518 struct bnx2x_fastpath *fp = &bp->fp[i]; 518 struct bnx2x_fastpath *fp = &bp->fp[i];
519 519
520 BNX2X_ERR("queue[%d]: rx_bd_prod(%x) rx_bd_cons(%x)" 520 BNX2X_ERR("fp%d: rx_bd_prod(%x) rx_bd_cons(%x)"
521 " *rx_bd_cons_sb(%x) rx_comp_prod(%x)" 521 " *rx_bd_cons_sb(%x) rx_comp_prod(%x)"
522 " rx_comp_cons(%x) *rx_cons_sb(%x)\n", 522 " rx_comp_cons(%x) *rx_cons_sb(%x)\n",
523 i, fp->rx_bd_prod, fp->rx_bd_cons, 523 i, fp->rx_bd_prod, fp->rx_bd_cons,
524 le16_to_cpu(*fp->rx_bd_cons_sb), fp->rx_comp_prod, 524 le16_to_cpu(*fp->rx_bd_cons_sb), fp->rx_comp_prod,
525 fp->rx_comp_cons, le16_to_cpu(*fp->rx_cons_sb)); 525 fp->rx_comp_cons, le16_to_cpu(*fp->rx_cons_sb));
526 BNX2X_ERR(" rx_sge_prod(%x) last_max_sge(%x)" 526 BNX2X_ERR(" rx_sge_prod(%x) last_max_sge(%x)"
527 " fp_u_idx(%x) *sb_u_idx(%x)\n", 527 " fp_u_idx(%x) *sb_u_idx(%x)\n",
528 fp->rx_sge_prod, fp->last_max_sge, 528 fp->rx_sge_prod, fp->last_max_sge,
529 le16_to_cpu(fp->fp_u_idx), 529 le16_to_cpu(fp->fp_u_idx),
@@ -535,11 +535,11 @@ static void bnx2x_panic_dump(struct bnx2x *bp)
535 struct bnx2x_fastpath *fp = &bp->fp[i]; 535 struct bnx2x_fastpath *fp = &bp->fp[i];
536 struct eth_tx_db_data *hw_prods = fp->hw_tx_prods; 536 struct eth_tx_db_data *hw_prods = fp->hw_tx_prods;
537 537
538 BNX2X_ERR("queue[%d]: tx_pkt_prod(%x) tx_pkt_cons(%x)" 538 BNX2X_ERR("fp%d: tx_pkt_prod(%x) tx_pkt_cons(%x)"
539 " tx_bd_prod(%x) tx_bd_cons(%x) *tx_cons_sb(%x)\n", 539 " tx_bd_prod(%x) tx_bd_cons(%x) *tx_cons_sb(%x)\n",
540 i, fp->tx_pkt_prod, fp->tx_pkt_cons, fp->tx_bd_prod, 540 i, fp->tx_pkt_prod, fp->tx_pkt_cons, fp->tx_bd_prod,
541 fp->tx_bd_cons, le16_to_cpu(*fp->tx_cons_sb)); 541 fp->tx_bd_cons, le16_to_cpu(*fp->tx_cons_sb));
542 BNX2X_ERR(" fp_c_idx(%x) *sb_c_idx(%x)" 542 BNX2X_ERR(" fp_c_idx(%x) *sb_c_idx(%x)"
543 " bd data(%x,%x)\n", le16_to_cpu(fp->fp_c_idx), 543 " bd data(%x,%x)\n", le16_to_cpu(fp->fp_c_idx),
544 fp->status_blk->c_status_block.status_block_index, 544 fp->status_blk->c_status_block.status_block_index,
545 hw_prods->packets_prod, hw_prods->bds_prod); 545 hw_prods->packets_prod, hw_prods->bds_prod);
@@ -556,8 +556,8 @@ static void bnx2x_panic_dump(struct bnx2x *bp)
556 u32 *rx_bd = (u32 *)&fp->rx_desc_ring[j]; 556 u32 *rx_bd = (u32 *)&fp->rx_desc_ring[j];
557 struct sw_rx_bd *sw_bd = &fp->rx_buf_ring[j]; 557 struct sw_rx_bd *sw_bd = &fp->rx_buf_ring[j];
558 558
559 BNX2X_ERR("rx_bd[%x]=[%x:%x] sw_bd=[%p]\n", 559 BNX2X_ERR("fp%d: rx_bd[%x]=[%x:%x] sw_bd=[%p]\n",
560 j, rx_bd[1], rx_bd[0], sw_bd->skb); 560 i, j, rx_bd[1], rx_bd[0], sw_bd->skb);
561 } 561 }
562 562
563 start = RX_SGE(fp->rx_sge_prod); 563 start = RX_SGE(fp->rx_sge_prod);
@@ -566,8 +566,8 @@ static void bnx2x_panic_dump(struct bnx2x *bp)
566 u32 *rx_sge = (u32 *)&fp->rx_sge_ring[j]; 566 u32 *rx_sge = (u32 *)&fp->rx_sge_ring[j];
567 struct sw_rx_page *sw_page = &fp->rx_page_ring[j]; 567 struct sw_rx_page *sw_page = &fp->rx_page_ring[j];
568 568
569 BNX2X_ERR("rx_sge[%x]=[%x:%x] sw_page=[%p]\n", 569 BNX2X_ERR("fp%d: rx_sge[%x]=[%x:%x] sw_page=[%p]\n",
570 j, rx_sge[1], rx_sge[0], sw_page->page); 570 i, j, rx_sge[1], rx_sge[0], sw_page->page);
571 } 571 }
572 572
573 start = RCQ_BD(fp->rx_comp_cons - 10); 573 start = RCQ_BD(fp->rx_comp_cons - 10);
@@ -575,8 +575,8 @@ static void bnx2x_panic_dump(struct bnx2x *bp)
575 for (j = start; j != end; j = RCQ_BD(j + 1)) { 575 for (j = start; j != end; j = RCQ_BD(j + 1)) {
576 u32 *cqe = (u32 *)&fp->rx_comp_ring[j]; 576 u32 *cqe = (u32 *)&fp->rx_comp_ring[j];
577 577
578 BNX2X_ERR("cqe[%x]=[%x:%x:%x:%x]\n", 578 BNX2X_ERR("fp%d: cqe[%x]=[%x:%x:%x:%x]\n",
579 j, cqe[0], cqe[1], cqe[2], cqe[3]); 579 i, j, cqe[0], cqe[1], cqe[2], cqe[3]);
580 } 580 }
581 } 581 }
582 582
@@ -589,8 +589,8 @@ static void bnx2x_panic_dump(struct bnx2x *bp)
589 for (j = start; j != end; j = TX_BD(j + 1)) { 589 for (j = start; j != end; j = TX_BD(j + 1)) {
590 struct sw_tx_bd *sw_bd = &fp->tx_buf_ring[j]; 590 struct sw_tx_bd *sw_bd = &fp->tx_buf_ring[j];
591 591
592 BNX2X_ERR("packet[%x]=[%p,%x]\n", j, 592 BNX2X_ERR("fp%d: packet[%x]=[%p,%x]\n",
593 sw_bd->skb, sw_bd->first_bd); 593 i, j, sw_bd->skb, sw_bd->first_bd);
594 } 594 }
595 595
596 start = TX_BD(fp->tx_bd_cons - 10); 596 start = TX_BD(fp->tx_bd_cons - 10);
@@ -598,8 +598,8 @@ static void bnx2x_panic_dump(struct bnx2x *bp)
598 for (j = start; j != end; j = TX_BD(j + 1)) { 598 for (j = start; j != end; j = TX_BD(j + 1)) {
599 u32 *tx_bd = (u32 *)&fp->tx_desc_ring[j]; 599 u32 *tx_bd = (u32 *)&fp->tx_desc_ring[j];
600 600
601 BNX2X_ERR("tx_bd[%x]=[%x:%x:%x:%x]\n", 601 BNX2X_ERR("fp%d: tx_bd[%x]=[%x:%x:%x:%x]\n",
602 j, tx_bd[0], tx_bd[1], tx_bd[2], tx_bd[3]); 602 i, j, tx_bd[0], tx_bd[1], tx_bd[2], tx_bd[3]);
603 } 603 }
604 } 604 }
605 605
@@ -3667,7 +3667,7 @@ static int bnx2x_hw_stats_update(struct bnx2x *bp)
3667 bnx2x_emac_stats_update(bp); 3667 bnx2x_emac_stats_update(bp);
3668 3668
3669 else { /* unreached */ 3669 else { /* unreached */
3670 BNX2X_ERR("stats updated by dmae but no MAC active\n"); 3670 BNX2X_ERR("stats updated by DMAE but no MAC active\n");
3671 return -1; 3671 return -1;
3672 } 3672 }
3673 3673