aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_qp.c
diff options
context:
space:
mode:
authorJoachim Fenkes <fenkes@de.ibm.com>2007-09-11 09:32:22 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-09 22:59:10 -0400
commite37221928bf685d63ba5319746eafe463d61e330 (patch)
treeee74c9b24f41ab930579d51cd80b2ff4d173da09 /drivers/infiniband/hw/ehca/ehca_qp.c
parent2863ad4bddf366790a733cfd71f2f480afdf36fc (diff)
IB/ehca: Print return codes as signed decimal integers
...because -12 is easier to read than FFFFFFF4. 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_qp.c')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_qp.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
index e89fdca7fa19..88d7dd946033 100644
--- a/drivers/infiniband/hw/ehca/ehca_qp.c
+++ b/drivers/infiniband/hw/ehca/ehca_qp.c
@@ -310,7 +310,7 @@ static inline int init_qp_queue(struct ehca_shca *shca,
310 } 310 }
311 311
312 if (!ipz_rc) { 312 if (!ipz_rc) {
313 ehca_err(ib_dev, "Cannot allocate page for queue. ipz_rc=%x", 313 ehca_err(ib_dev, "Cannot allocate page for queue. ipz_rc=%i",
314 ipz_rc); 314 ipz_rc);
315 return -EBUSY; 315 return -EBUSY;
316 } 316 }
@@ -334,7 +334,7 @@ static inline int init_qp_queue(struct ehca_shca *shca,
334 if (cnt == (nr_q_pages - 1)) { /* last page! */ 334 if (cnt == (nr_q_pages - 1)) { /* last page! */
335 if (h_ret != expected_hret) { 335 if (h_ret != expected_hret) {
336 ehca_err(ib_dev, "hipz_qp_register_rpage() " 336 ehca_err(ib_dev, "hipz_qp_register_rpage() "
337 "h_ret= %lx ", h_ret); 337 "h_ret=%li", h_ret);
338 ret = ehca2ib_return_code(h_ret); 338 ret = ehca2ib_return_code(h_ret);
339 goto init_qp_queue1; 339 goto init_qp_queue1;
340 } 340 }
@@ -348,7 +348,7 @@ static inline int init_qp_queue(struct ehca_shca *shca,
348 } else { 348 } else {
349 if (h_ret != H_PAGE_REGISTERED) { 349 if (h_ret != H_PAGE_REGISTERED) {
350 ehca_err(ib_dev, "hipz_qp_register_rpage() " 350 ehca_err(ib_dev, "hipz_qp_register_rpage() "
351 "h_ret= %lx ", h_ret); 351 "h_ret=%li", h_ret);
352 ret = ehca2ib_return_code(h_ret); 352 ret = ehca2ib_return_code(h_ret);
353 goto init_qp_queue1; 353 goto init_qp_queue1;
354 } 354 }
@@ -617,7 +617,7 @@ static struct ehca_qp *internal_create_qp(
617 617
618 h_ret = hipz_h_alloc_resource_qp(shca->ipz_hca_handle, &parms); 618 h_ret = hipz_h_alloc_resource_qp(shca->ipz_hca_handle, &parms);
619 if (h_ret != H_SUCCESS) { 619 if (h_ret != H_SUCCESS) {
620 ehca_err(pd->device, "h_alloc_resource_qp() failed h_ret=%lx", 620 ehca_err(pd->device, "h_alloc_resource_qp() failed h_ret=%li",
621 h_ret); 621 h_ret);
622 ret = ehca2ib_return_code(h_ret); 622 ret = ehca2ib_return_code(h_ret);
623 goto create_qp_exit1; 623 goto create_qp_exit1;
@@ -671,7 +671,7 @@ static struct ehca_qp *internal_create_qp(
671 &parms.squeue, swqe_size); 671 &parms.squeue, swqe_size);
672 if (ret) { 672 if (ret) {
673 ehca_err(pd->device, "Couldn't initialize squeue " 673 ehca_err(pd->device, "Couldn't initialize squeue "
674 "and pages ret=%x", ret); 674 "and pages ret=%i", ret);
675 goto create_qp_exit2; 675 goto create_qp_exit2;
676 } 676 }
677 } 677 }
@@ -682,7 +682,7 @@ static struct ehca_qp *internal_create_qp(
682 H_SUCCESS, &parms.rqueue, rwqe_size); 682 H_SUCCESS, &parms.rqueue, rwqe_size);
683 if (ret) { 683 if (ret) {
684 ehca_err(pd->device, "Couldn't initialize rqueue " 684 ehca_err(pd->device, "Couldn't initialize rqueue "
685 "and pages ret=%x", ret); 685 "and pages ret=%i", ret);
686 goto create_qp_exit3; 686 goto create_qp_exit3;
687 } 687 }
688 } 688 }
@@ -728,7 +728,7 @@ static struct ehca_qp *internal_create_qp(
728 ret = ehca_cq_assign_qp(my_qp->send_cq, my_qp); 728 ret = ehca_cq_assign_qp(my_qp->send_cq, my_qp);
729 if (ret) { 729 if (ret) {
730 ehca_err(pd->device, 730 ehca_err(pd->device,
731 "Couldn't assign qp to send_cq ret=%x", ret); 731 "Couldn't assign qp to send_cq ret=%i", ret);
732 goto create_qp_exit4; 732 goto create_qp_exit4;
733 } 733 }
734 } 734 }
@@ -845,7 +845,7 @@ struct ib_srq *ehca_create_srq(struct ib_pd *pd,
845 mqpcb, my_qp->galpas.kernel); 845 mqpcb, my_qp->galpas.kernel);
846 if (hret != H_SUCCESS) { 846 if (hret != H_SUCCESS) {
847 ehca_err(pd->device, "Could not modify SRQ to INIT" 847 ehca_err(pd->device, "Could not modify SRQ to INIT"
848 "ehca_qp=%p qp_num=%x hret=%lx", 848 "ehca_qp=%p qp_num=%x h_ret=%li",
849 my_qp, my_qp->real_qp_num, hret); 849 my_qp, my_qp->real_qp_num, hret);
850 goto create_srq2; 850 goto create_srq2;
851 } 851 }
@@ -859,7 +859,7 @@ struct ib_srq *ehca_create_srq(struct ib_pd *pd,
859 mqpcb, my_qp->galpas.kernel); 859 mqpcb, my_qp->galpas.kernel);
860 if (hret != H_SUCCESS) { 860 if (hret != H_SUCCESS) {
861 ehca_err(pd->device, "Could not enable SRQ" 861 ehca_err(pd->device, "Could not enable SRQ"
862 "ehca_qp=%p qp_num=%x hret=%lx", 862 "ehca_qp=%p qp_num=%x h_ret=%li",
863 my_qp, my_qp->real_qp_num, hret); 863 my_qp, my_qp->real_qp_num, hret);
864 goto create_srq2; 864 goto create_srq2;
865 } 865 }
@@ -873,7 +873,7 @@ struct ib_srq *ehca_create_srq(struct ib_pd *pd,
873 mqpcb, my_qp->galpas.kernel); 873 mqpcb, my_qp->galpas.kernel);
874 if (hret != H_SUCCESS) { 874 if (hret != H_SUCCESS) {
875 ehca_err(pd->device, "Could not modify SRQ to RTR" 875 ehca_err(pd->device, "Could not modify SRQ to RTR"
876 "ehca_qp=%p qp_num=%x hret=%lx", 876 "ehca_qp=%p qp_num=%x h_ret=%li",
877 my_qp, my_qp->real_qp_num, hret); 877 my_qp, my_qp->real_qp_num, hret);
878 goto create_srq2; 878 goto create_srq2;
879 } 879 }
@@ -911,7 +911,7 @@ static int prepare_sqe_rts(struct ehca_qp *my_qp, struct ehca_shca *shca,
911 &bad_send_wqe_p, NULL, 2); 911 &bad_send_wqe_p, NULL, 2);
912 if (h_ret != H_SUCCESS) { 912 if (h_ret != H_SUCCESS) {
913 ehca_err(&shca->ib_device, "hipz_h_disable_and_get_wqe() failed" 913 ehca_err(&shca->ib_device, "hipz_h_disable_and_get_wqe() failed"
914 " ehca_qp=%p qp_num=%x h_ret=%lx", 914 " ehca_qp=%p qp_num=%x h_ret=%li",
915 my_qp, qp_num, h_ret); 915 my_qp, qp_num, h_ret);
916 return ehca2ib_return_code(h_ret); 916 return ehca2ib_return_code(h_ret);
917 } 917 }
@@ -989,7 +989,7 @@ static int internal_modify_qp(struct ib_qp *ibqp,
989 mqpcb, my_qp->galpas.kernel); 989 mqpcb, my_qp->galpas.kernel);
990 if (h_ret != H_SUCCESS) { 990 if (h_ret != H_SUCCESS) {
991 ehca_err(ibqp->device, "hipz_h_query_qp() failed " 991 ehca_err(ibqp->device, "hipz_h_query_qp() failed "
992 "ehca_qp=%p qp_num=%x h_ret=%lx", 992 "ehca_qp=%p qp_num=%x h_ret=%li",
993 my_qp, ibqp->qp_num, h_ret); 993 my_qp, ibqp->qp_num, h_ret);
994 ret = ehca2ib_return_code(h_ret); 994 ret = ehca2ib_return_code(h_ret);
995 goto modify_qp_exit1; 995 goto modify_qp_exit1;
@@ -1025,7 +1025,7 @@ static int internal_modify_qp(struct ib_qp *ibqp,
1025 ibqp, &smiqp_attr, smiqp_attr_mask, 1); 1025 ibqp, &smiqp_attr, smiqp_attr_mask, 1);
1026 if (smirc) { 1026 if (smirc) {
1027 ehca_err(ibqp->device, "SMI RESET -> INIT failed. " 1027 ehca_err(ibqp->device, "SMI RESET -> INIT failed. "
1028 "ehca_modify_qp() rc=%x", smirc); 1028 "ehca_modify_qp() rc=%i", smirc);
1029 ret = H_PARAMETER; 1029 ret = H_PARAMETER;
1030 goto modify_qp_exit1; 1030 goto modify_qp_exit1;
1031 } 1031 }
@@ -1127,7 +1127,7 @@ static int internal_modify_qp(struct ib_qp *ibqp,
1127 ret = prepare_sqe_rts(my_qp, shca, &bad_wqe_cnt); 1127 ret = prepare_sqe_rts(my_qp, shca, &bad_wqe_cnt);
1128 if (ret) { 1128 if (ret) {
1129 ehca_err(ibqp->device, "prepare_sqe_rts() failed " 1129 ehca_err(ibqp->device, "prepare_sqe_rts() failed "
1130 "ehca_qp=%p qp_num=%x ret=%x", 1130 "ehca_qp=%p qp_num=%x ret=%i",
1131 my_qp, ibqp->qp_num, ret); 1131 my_qp, ibqp->qp_num, ret);
1132 goto modify_qp_exit2; 1132 goto modify_qp_exit2;
1133 } 1133 }
@@ -1352,7 +1352,7 @@ static int internal_modify_qp(struct ib_qp *ibqp,
1352 1352
1353 if (h_ret != H_SUCCESS) { 1353 if (h_ret != H_SUCCESS) {
1354 ret = ehca2ib_return_code(h_ret); 1354 ret = ehca2ib_return_code(h_ret);
1355 ehca_err(ibqp->device, "hipz_h_modify_qp() failed rc=%lx " 1355 ehca_err(ibqp->device, "hipz_h_modify_qp() failed h_ret=%li "
1356 "ehca_qp=%p qp_num=%x", h_ret, my_qp, ibqp->qp_num); 1356 "ehca_qp=%p qp_num=%x", h_ret, my_qp, ibqp->qp_num);
1357 goto modify_qp_exit2; 1357 goto modify_qp_exit2;
1358 } 1358 }
@@ -1385,7 +1385,7 @@ static int internal_modify_qp(struct ib_qp *ibqp,
1385 ret = ehca2ib_return_code(h_ret); 1385 ret = ehca2ib_return_code(h_ret);
1386 ehca_err(ibqp->device, "ENABLE in context of " 1386 ehca_err(ibqp->device, "ENABLE in context of "
1387 "RESET_2_INIT failed! Maybe you didn't get " 1387 "RESET_2_INIT failed! Maybe you didn't get "
1388 "a LID h_ret=%lx ehca_qp=%p qp_num=%x", 1388 "a LID h_ret=%li ehca_qp=%p qp_num=%x",
1389 h_ret, my_qp, ibqp->qp_num); 1389 h_ret, my_qp, ibqp->qp_num);
1390 goto modify_qp_exit2; 1390 goto modify_qp_exit2;
1391 } 1391 }
@@ -1473,7 +1473,7 @@ int ehca_query_qp(struct ib_qp *qp,
1473 if (h_ret != H_SUCCESS) { 1473 if (h_ret != H_SUCCESS) {
1474 ret = ehca2ib_return_code(h_ret); 1474 ret = ehca2ib_return_code(h_ret);
1475 ehca_err(qp->device, "hipz_h_query_qp() failed " 1475 ehca_err(qp->device, "hipz_h_query_qp() failed "
1476 "ehca_qp=%p qp_num=%x h_ret=%lx", 1476 "ehca_qp=%p qp_num=%x h_ret=%li",
1477 my_qp, qp->qp_num, h_ret); 1477 my_qp, qp->qp_num, h_ret);
1478 goto query_qp_exit1; 1478 goto query_qp_exit1;
1479 } 1479 }
@@ -1648,7 +1648,7 @@ int ehca_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
1648 1648
1649 if (h_ret != H_SUCCESS) { 1649 if (h_ret != H_SUCCESS) {
1650 ret = ehca2ib_return_code(h_ret); 1650 ret = ehca2ib_return_code(h_ret);
1651 ehca_err(ibsrq->device, "hipz_h_modify_qp() failed rc=%lx " 1651 ehca_err(ibsrq->device, "hipz_h_modify_qp() failed h_ret=%li "
1652 "ehca_qp=%p qp_num=%x", 1652 "ehca_qp=%p qp_num=%x",
1653 h_ret, my_qp, my_qp->real_qp_num); 1653 h_ret, my_qp, my_qp->real_qp_num);
1654 } 1654 }
@@ -1691,7 +1691,7 @@ int ehca_query_srq(struct ib_srq *srq, struct ib_srq_attr *srq_attr)
1691 if (h_ret != H_SUCCESS) { 1691 if (h_ret != H_SUCCESS) {
1692 ret = ehca2ib_return_code(h_ret); 1692 ret = ehca2ib_return_code(h_ret);
1693 ehca_err(srq->device, "hipz_h_query_qp() failed " 1693 ehca_err(srq->device, "hipz_h_query_qp() failed "
1694 "ehca_qp=%p qp_num=%x h_ret=%lx", 1694 "ehca_qp=%p qp_num=%x h_ret=%li",
1695 my_qp, my_qp->real_qp_num, h_ret); 1695 my_qp, my_qp->real_qp_num, h_ret);
1696 goto query_srq_exit1; 1696 goto query_srq_exit1;
1697 } 1697 }
@@ -1741,7 +1741,7 @@ static int internal_destroy_qp(struct ib_device *dev, struct ehca_qp *my_qp,
1741 ret = ehca_cq_unassign_qp(my_qp->send_cq, qp_num); 1741 ret = ehca_cq_unassign_qp(my_qp->send_cq, qp_num);
1742 if (ret) { 1742 if (ret) {
1743 ehca_err(dev, "Couldn't unassign qp from " 1743 ehca_err(dev, "Couldn't unassign qp from "
1744 "send_cq ret=%x qp_num=%x cq_num=%x", ret, 1744 "send_cq ret=%i qp_num=%x cq_num=%x", ret,
1745 qp_num, my_qp->send_cq->cq_number); 1745 qp_num, my_qp->send_cq->cq_number);
1746 return ret; 1746 return ret;
1747 } 1747 }
@@ -1753,7 +1753,7 @@ static int internal_destroy_qp(struct ib_device *dev, struct ehca_qp *my_qp,
1753 1753
1754 h_ret = hipz_h_destroy_qp(shca->ipz_hca_handle, my_qp); 1754 h_ret = hipz_h_destroy_qp(shca->ipz_hca_handle, my_qp);
1755 if (h_ret != H_SUCCESS) { 1755 if (h_ret != H_SUCCESS) {
1756 ehca_err(dev, "hipz_h_destroy_qp() failed rc=%lx " 1756 ehca_err(dev, "hipz_h_destroy_qp() failed h_ret=%li "
1757 "ehca_qp=%p qp_num=%x", h_ret, my_qp, qp_num); 1757 "ehca_qp=%p qp_num=%x", h_ret, my_qp, qp_num);
1758 return ehca2ib_return_code(h_ret); 1758 return ehca2ib_return_code(h_ret);
1759 } 1759 }