From: Amir Vadai Date: Tue, 12 Apr 2011 14:40:07 +0000 (+0300) Subject: sdp: Remove protection before sleep on RX X-Git-Tag: v4.1.12-92~264^2~5^2~13 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6671507fea5d1887a08788ad6dbabda5efd1ca8c;p=users%2Fjedix%2Flinux-maple.git sdp: Remove protection before sleep on RX No need for this protection, it was needed because of a bug previously fixed. Credit update could be sent even when credit reaches 2. Signed-off-by: Amir Vadai --- diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c index de5455e70a55..bd81102b80d0 100644 --- a/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/drivers/infiniband/ulp/sdp/sdp_main.c @@ -2305,21 +2305,6 @@ sdp_mid_data: sdp_dbg_data(sk, "sk_wait_data %ld\n", timeo); posts_handler_put(ssk, 0); - if (remote_credits(ssk) <= SDP_MIN_TX_CREDITS) { - /* Remote host can not send, so there is no - * point of waiting for data. - * This situation is possible if current host - * can not send credits-update due to lack of - * memory. - */ - if (!copied) { - copied = -ENOMEM; - sdp_warn(sk, "out of credits\n"); - } - posts_handler_get(ssk); - break; - } - sk_wait_data(sk, &timeo); posts_handler_get(ssk);