diff options
author | Joachim Fenkes <fenkes@de.ibm.com> | 2008-04-23 14:55:45 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-23 14:55:45 -0400 |
commit | 4da27d6d5b92c8fe4b3a3e5bcf42606d9e4a6fc8 (patch) | |
tree | 971988a287044db1d26d1cab24ad5e4aeb578ea8 /drivers/infiniband/hw/ehca/ehca_reqs.c | |
parent | 863fb09fbf1eb74f56ea02184a62165056aa29cb (diff) |
IB/ehca: Move high-volume debug output to higher debug levels
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_reqs.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_reqs.c | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_reqs.c b/drivers/infiniband/hw/ehca/ehca_reqs.c index 0b2359e2757a..bbe0436f4f75 100644 --- a/drivers/infiniband/hw/ehca/ehca_reqs.c +++ b/drivers/infiniband/hw/ehca/ehca_reqs.c | |||
@@ -81,7 +81,7 @@ static inline int ehca_write_rwqe(struct ipz_queue *ipz_rqueue, | |||
81 | recv_wr->sg_list[cnt_ds].length; | 81 | recv_wr->sg_list[cnt_ds].length; |
82 | } | 82 | } |
83 | 83 | ||
84 | if (ehca_debug_level) { | 84 | if (ehca_debug_level >= 3) { |
85 | ehca_gen_dbg("RECEIVE WQE written into ipz_rqueue=%p", | 85 | ehca_gen_dbg("RECEIVE WQE written into ipz_rqueue=%p", |
86 | ipz_rqueue); | 86 | ipz_rqueue); |
87 | ehca_dmp(wqe_p, 16*(6 + wqe_p->nr_of_data_seg), "recv wqe"); | 87 | ehca_dmp(wqe_p, 16*(6 + wqe_p->nr_of_data_seg), "recv wqe"); |
@@ -281,7 +281,7 @@ static inline int ehca_write_swqe(struct ehca_qp *qp, | |||
281 | return -EINVAL; | 281 | return -EINVAL; |
282 | } | 282 | } |
283 | 283 | ||
284 | if (ehca_debug_level) { | 284 | if (ehca_debug_level >= 3) { |
285 | ehca_gen_dbg("SEND WQE written into queue qp=%p ", qp); | 285 | ehca_gen_dbg("SEND WQE written into queue qp=%p ", qp); |
286 | ehca_dmp( wqe_p, 16*(6 + wqe_p->nr_of_data_seg), "send wqe"); | 286 | ehca_dmp( wqe_p, 16*(6 + wqe_p->nr_of_data_seg), "send wqe"); |
287 | } | 287 | } |
@@ -459,13 +459,14 @@ int ehca_post_send(struct ib_qp *qp, | |||
459 | goto post_send_exit0; | 459 | goto post_send_exit0; |
460 | } | 460 | } |
461 | wqe_cnt++; | 461 | wqe_cnt++; |
462 | ehca_dbg(qp->device, "ehca_qp=%p qp_num=%x wqe_cnt=%d", | ||
463 | my_qp, qp->qp_num, wqe_cnt); | ||
464 | } /* eof for cur_send_wr */ | 462 | } /* eof for cur_send_wr */ |
465 | 463 | ||
466 | post_send_exit0: | 464 | post_send_exit0: |
467 | iosync(); /* serialize GAL register access */ | 465 | iosync(); /* serialize GAL register access */ |
468 | hipz_update_sqa(my_qp, wqe_cnt); | 466 | hipz_update_sqa(my_qp, wqe_cnt); |
467 | if (unlikely(ret || ehca_debug_level >= 2)) | ||
468 | ehca_dbg(qp->device, "ehca_qp=%p qp_num=%x wqe_cnt=%d ret=%i", | ||
469 | my_qp, qp->qp_num, wqe_cnt, ret); | ||
469 | my_qp->message_count += wqe_cnt; | 470 | my_qp->message_count += wqe_cnt; |
470 | spin_unlock_irqrestore(&my_qp->spinlock_s, flags); | 471 | spin_unlock_irqrestore(&my_qp->spinlock_s, flags); |
471 | return ret; | 472 | return ret; |
@@ -525,13 +526,14 @@ static int internal_post_recv(struct ehca_qp *my_qp, | |||
525 | goto post_recv_exit0; | 526 | goto post_recv_exit0; |
526 | } | 527 | } |
527 | wqe_cnt++; | 528 | wqe_cnt++; |
528 | ehca_dbg(dev, "ehca_qp=%p qp_num=%x wqe_cnt=%d", | ||
529 | my_qp, my_qp->real_qp_num, wqe_cnt); | ||
530 | } /* eof for cur_recv_wr */ | 529 | } /* eof for cur_recv_wr */ |
531 | 530 | ||
532 | post_recv_exit0: | 531 | post_recv_exit0: |
533 | iosync(); /* serialize GAL register access */ | 532 | iosync(); /* serialize GAL register access */ |
534 | hipz_update_rqa(my_qp, wqe_cnt); | 533 | hipz_update_rqa(my_qp, wqe_cnt); |
534 | if (unlikely(ret || ehca_debug_level >= 2)) | ||
535 | ehca_dbg(dev, "ehca_qp=%p qp_num=%x wqe_cnt=%d ret=%i", | ||
536 | my_qp, my_qp->real_qp_num, wqe_cnt, ret); | ||
535 | spin_unlock_irqrestore(&my_qp->spinlock_r, flags); | 537 | spin_unlock_irqrestore(&my_qp->spinlock_r, flags); |
536 | return ret; | 538 | return ret; |
537 | } | 539 | } |
@@ -575,16 +577,17 @@ static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc) | |||
575 | struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq); | 577 | struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq); |
576 | struct ehca_cqe *cqe; | 578 | struct ehca_cqe *cqe; |
577 | struct ehca_qp *my_qp; | 579 | struct ehca_qp *my_qp; |
578 | int cqe_count = 0; | 580 | int cqe_count = 0, is_error; |
579 | 581 | ||
580 | poll_cq_one_read_cqe: | 582 | poll_cq_one_read_cqe: |
581 | cqe = (struct ehca_cqe *) | 583 | cqe = (struct ehca_cqe *) |
582 | ipz_qeit_get_inc_valid(&my_cq->ipz_queue); | 584 | ipz_qeit_get_inc_valid(&my_cq->ipz_queue); |
583 | if (!cqe) { | 585 | if (!cqe) { |
584 | ret = -EAGAIN; | 586 | ret = -EAGAIN; |
585 | ehca_dbg(cq->device, "Completion queue is empty ehca_cq=%p " | 587 | if (ehca_debug_level >= 3) |
586 | "cq_num=%x ret=%i", my_cq, my_cq->cq_number, ret); | 588 | ehca_dbg(cq->device, "Completion queue is empty " |
587 | goto poll_cq_one_exit0; | 589 | "my_cq=%p cq_num=%x", my_cq, my_cq->cq_number); |
590 | goto poll_cq_one_exit0; | ||
588 | } | 591 | } |
589 | 592 | ||
590 | /* prevents loads being reordered across this point */ | 593 | /* prevents loads being reordered across this point */ |
@@ -614,7 +617,7 @@ poll_cq_one_read_cqe: | |||
614 | ehca_dbg(cq->device, | 617 | ehca_dbg(cq->device, |
615 | "Got CQE with purged bit qp_num=%x src_qp=%x", | 618 | "Got CQE with purged bit qp_num=%x src_qp=%x", |
616 | cqe->local_qp_number, cqe->remote_qp_number); | 619 | cqe->local_qp_number, cqe->remote_qp_number); |
617 | if (ehca_debug_level) | 620 | if (ehca_debug_level >= 2) |
618 | ehca_dmp(cqe, 64, "qp_num=%x src_qp=%x", | 621 | ehca_dmp(cqe, 64, "qp_num=%x src_qp=%x", |
619 | cqe->local_qp_number, | 622 | cqe->local_qp_number, |
620 | cqe->remote_qp_number); | 623 | cqe->remote_qp_number); |
@@ -627,11 +630,13 @@ poll_cq_one_read_cqe: | |||
627 | } | 630 | } |
628 | } | 631 | } |
629 | 632 | ||
630 | /* tracing cqe */ | 633 | is_error = cqe->status & WC_STATUS_ERROR_BIT; |
631 | if (unlikely(ehca_debug_level)) { | 634 | |
635 | /* trace error CQEs if debug_level >= 1, trace all CQEs if >= 3 */ | ||
636 | if (unlikely(ehca_debug_level >= 3 || (ehca_debug_level && is_error))) { | ||
632 | ehca_dbg(cq->device, | 637 | ehca_dbg(cq->device, |
633 | "Received COMPLETION ehca_cq=%p cq_num=%x -----", | 638 | "Received %sCOMPLETION ehca_cq=%p cq_num=%x -----", |
634 | my_cq, my_cq->cq_number); | 639 | is_error ? "ERROR " : "", my_cq, my_cq->cq_number); |
635 | ehca_dmp(cqe, 64, "ehca_cq=%p cq_num=%x", | 640 | ehca_dmp(cqe, 64, "ehca_cq=%p cq_num=%x", |
636 | my_cq, my_cq->cq_number); | 641 | my_cq, my_cq->cq_number); |
637 | ehca_dbg(cq->device, | 642 | ehca_dbg(cq->device, |
@@ -654,8 +659,9 @@ poll_cq_one_read_cqe: | |||
654 | /* update also queue adder to throw away this entry!!! */ | 659 | /* update also queue adder to throw away this entry!!! */ |
655 | goto poll_cq_one_exit0; | 660 | goto poll_cq_one_exit0; |
656 | } | 661 | } |
662 | |||
657 | /* eval ib_wc_status */ | 663 | /* eval ib_wc_status */ |
658 | if (unlikely(cqe->status & WC_STATUS_ERROR_BIT)) { | 664 | if (unlikely(is_error)) { |
659 | /* complete with errors */ | 665 | /* complete with errors */ |
660 | map_ib_wc_status(cqe->status, &wc->status); | 666 | map_ib_wc_status(cqe->status, &wc->status); |
661 | wc->vendor_err = wc->status; | 667 | wc->vendor_err = wc->status; |
@@ -676,14 +682,6 @@ poll_cq_one_read_cqe: | |||
676 | wc->imm_data = cpu_to_be32(cqe->immediate_data); | 682 | wc->imm_data = cpu_to_be32(cqe->immediate_data); |
677 | wc->sl = cqe->service_level; | 683 | wc->sl = cqe->service_level; |
678 | 684 | ||
679 | if (unlikely(wc->status != IB_WC_SUCCESS)) | ||
680 | ehca_dbg(cq->device, | ||
681 | "ehca_cq=%p cq_num=%x WARNING unsuccessful cqe " | ||
682 | "OPType=%x status=%x qp_num=%x src_qp=%x wr_id=%lx " | ||
683 | "cqe=%p", my_cq, my_cq->cq_number, cqe->optype, | ||
684 | cqe->status, cqe->local_qp_number, | ||
685 | cqe->remote_qp_number, cqe->work_request_id, cqe); | ||
686 | |||
687 | poll_cq_one_exit0: | 685 | poll_cq_one_exit0: |
688 | if (cqe_count > 0) | 686 | if (cqe_count > 0) |
689 | hipz_update_feca(my_cq, cqe_count); | 687 | hipz_update_feca(my_cq, cqe_count); |