]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: Remove protection before sleep on RX
authorAmir Vadai <amirv@mellanox.co.il>
Tue, 12 Apr 2011 14:40:07 +0000 (17:40 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:50 +0000 (05:05 -0700)
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 <amirv@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_main.c

index de5455e70a55750e723527ee9686c81dd9d845fc..bd81102b80d09d0f35f4ecf00f315d067ac5b08f 100644 (file)
@@ -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);