From: Jim Mott Date: Tue, 23 Oct 2007 17:51:30 +0000 (-0700) Subject: SDP bug646 - Do not send DisConn if there is only 1 credit X-Git-Tag: v4.1.12-92~264^2~5^2~343 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9563c51c8b4a3c3e43e8263e943300aae1527398;p=users%2Fjedix%2Flinux-maple.git SDP bug646 - Do not send DisConn if there is only 1 credit Compliance with CA4-82: If one credit is available, an implementation shall only send SDP messages that provide additional credits and also do not contain ULP payload. Signed-off-by: Jim Mott --- diff --git a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c index e8e4673bffab8..41ae38e0da8ce 100644 --- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c +++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c @@ -492,7 +492,7 @@ void sdp_post_sends(struct sdp_sock *ssk, int nonagle) if (unlikely((1 << ssk->isk.sk.sk_state) & (TCPF_FIN_WAIT1 | TCPF_LAST_ACK)) && !ssk->isk.sk.sk_send_head && - ssk->bufs) { + ssk->bufs > (ssk->remote_credits >= ssk->rx_head - ssk->rx_tail)) { skb = sk_stream_alloc_skb(&ssk->isk.sk, sizeof(struct sdp_bsdh), GFP_KERNEL);