svcrdma: remove rdma_create_qp() failure recovery logic
[linux-2.6-block.git] / net / sunrpc / xprtrdma / svc_rdma_transport.c
index e7323fbbd348c5e30a8a99763df73c37fa6b5a26..374feb44afeacefd7c4f49fea3839b25fd0ba7c4 100644 (file)
@@ -92,6 +92,7 @@ struct svc_xprt_class svc_rdma_class = {
        .xcl_owner = THIS_MODULE,
        .xcl_ops = &svc_rdma_ops,
        .xcl_max_payload = RPCSVC_MAXPAYLOAD_TCP,
+       .xcl_ident = XPRT_TRANSPORT_RDMA,
 };
 
 struct svc_rdma_op_ctxt *svc_rdma_get_context(struct svcxprt_rdma *xprt)
@@ -942,23 +943,8 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
 
        ret = rdma_create_qp(newxprt->sc_cm_id, newxprt->sc_pd, &qp_attr);
        if (ret) {
-               /*
-                * XXX: This is a hack. We need a xx_request_qp interface
-                * that will adjust the qp_attr's with a best-effort
-                * number
-                */
-               qp_attr.cap.max_send_sge -= 2;
-               qp_attr.cap.max_recv_sge -= 2;
-               ret = rdma_create_qp(newxprt->sc_cm_id, newxprt->sc_pd,
-                                    &qp_attr);
-               if (ret) {
-                       dprintk("svcrdma: failed to create QP, ret=%d\n", ret);
-                       goto errout;
-               }
-               newxprt->sc_max_sge = qp_attr.cap.max_send_sge;
-               newxprt->sc_max_sge = qp_attr.cap.max_recv_sge;
-               newxprt->sc_sq_depth = qp_attr.cap.max_send_wr;
-               newxprt->sc_max_requests = qp_attr.cap.max_recv_wr;
+               dprintk("svcrdma: failed to create QP, ret=%d\n", ret);
+               goto errout;
        }
        newxprt->sc_qp = newxprt->sc_cm_id->qp;