From: Amir Vadai Date: Wed, 1 Jul 2009 14:00:29 +0000 (+0300) Subject: sdp: fix wrong credit advertised in Hello MID X-Git-Tag: v4.1.12-92~264^2~5^2~265 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=407d7b9e3e9a72c88b7ef6f04518af3385c29c18;p=users%2Fjedix%2Flinux-maple.git sdp: fix wrong credit advertised in Hello MID Signed-off-by: Amir Vadai --- diff --git a/drivers/infiniband/ulp/sdp/sdp_cma.c b/drivers/infiniband/ulp/sdp/sdp_cma.c index f7dc7c6708c09..83447b10f1d94 100644 --- a/drivers/infiniband/ulp/sdp/sdp_cma.c +++ b/drivers/infiniband/ulp/sdp/sdp_cma.c @@ -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;