]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: fix wrong credit advertised in Hello MID
authorAmir Vadai <amirv@mellanox.co.il>
Wed, 1 Jul 2009 14:00:29 +0000 (17:00 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:04:33 +0000 (05:04 -0700)
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_cma.c

index f7dc7c6708c0954de9fad1af7f647a9c12bdd332..83447b10f1d949c257383f6333af10178cfc47c3 100644 (file)
@@ -336,11 +336,11 @@ int sdp_cma_handler(struct rdma_cm_id *id, struct rdma_cm_event *event)
                                ring_posted(sdp_sk(sk)->rx_ring));
                memset(&hh, 0, sizeof hh);
                hh.bsdh.mid = SDP_MID_HELLO;
-               hh.bsdh.bufs = htons(remote_credits(sdp_sk(sk)));
                hh.bsdh.len = htonl(sizeof(struct sdp_bsdh) + SDP_HH_SIZE);
                hh.max_adverts = 1;
                hh.majv_minv = SDP_MAJV_MINV;
                sdp_init_buffers(sdp_sk(sk), rcvbuf_initial_size);
+               hh.bsdh.bufs = htons(ring_posted(sdp_sk(sk)->rx_ring));
                hh.localrcvsz = hh.desremrcvsz = htonl(sdp_sk(sk)->recv_frags *
                                PAGE_SIZE + sizeof(struct sdp_bsdh));
                hh.max_adverts = 0x1;