]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/rds/ib_cm.c
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
[linux.git] / net / rds / ib_cm.c
index 94d4427377b237a5e2873c7304c476f4c50b1e54..9043f5c04787216e3447813c026c284e30da2b5b 100644 (file)
@@ -135,7 +135,7 @@ void rds_ib_cm_connect_complete(struct rds_connection *conn, struct rdma_cm_even
        rds_ib_recv_init_ring(ic);
        /* Post receive buffers - as a side effect, this will update
         * the posted credit count. */
-       rds_ib_recv_refill(conn, 1);
+       rds_ib_recv_refill(conn, 1, GFP_KERNEL);
 
        /* Tune RNR behavior */
        rds_ib_tune_rnr(ic, &qp_attr);
@@ -269,7 +269,6 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
 
        /* Protection domain and memory range */
        ic->i_pd = rds_ibdev->pd;
-       ic->i_mr = rds_ibdev->mr;
 
        cq_attr.cqe = ic->i_send_ring.w_nr + 1;
        ic->i_send_cq = ib_create_cq(dev, rds_ib_send_cq_comp_handler,
@@ -375,7 +374,7 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
 
        rds_ib_recv_init_ack(ic);
 
-       rdsdebug("conn %p pd %p mr %p cq %p %p\n", conn, ic->i_pd, ic->i_mr,
+       rdsdebug("conn %p pd %p cq %p %p\n", conn, ic->i_pd,
                 ic->i_send_cq, ic->i_recv_cq);
 
 out:
@@ -647,7 +646,6 @@ void rds_ib_conn_shutdown(struct rds_connection *conn)
                        ib_destroy_cq(ic->i_send_cq);
                if (ic->i_recv_cq)
                        ib_destroy_cq(ic->i_recv_cq);
-               rdma_destroy_id(ic->i_cm_id);
 
                /* then free the resources that ib callbacks use */
                if (ic->i_send_hdrs)
@@ -673,6 +671,8 @@ void rds_ib_conn_shutdown(struct rds_connection *conn)
                if (ic->i_recvs)
                        rds_ib_recv_clear_ring(ic);
 
+               rdma_destroy_id(ic->i_cm_id);
+
                /*
                 * Move connection back to the nodev list.
                 */
@@ -681,7 +681,6 @@ void rds_ib_conn_shutdown(struct rds_connection *conn)
 
                ic->i_cm_id = NULL;
                ic->i_pd = NULL;
-               ic->i_mr = NULL;
                ic->i_send_cq = NULL;
                ic->i_recv_cq = NULL;
                ic->i_send_hdrs = NULL;