]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iser-target: Fix identification of login rx descriptor type
authorJenny Derzhavetz <jennyf@mellanox.com>
Wed, 24 Feb 2016 17:23:58 +0000 (19:23 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:46:24 +0000 (15:46 -0700)
Orabug: 23331107

[ Upstream commit b89a7c25462b164db280abc3b05d4d9d888d40e9 ]

Once connection request is accepted, one rx descriptor
is posted to receive login request. This descriptor has rx type,
but is outside the main pool of rx descriptors, and thus
was mistreated as tx type.

Signed-off-by: Jenny Derzhavetz <jennyf@mellanox.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 3c6961458165c0ec909d68191bff4de7bdf50549)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/infiniband/ulp/isert/ib_isert.c

index 353e2ab090eef3be9f52780a739642bf54b0050a..7b6973d754b4c1d34302cf7017b9b89d2b67286a 100644 (file)
@@ -2059,7 +2059,8 @@ is_isert_tx_desc(struct isert_conn *isert_conn, void *wr_id)
        void *start = isert_conn->rx_descs;
        int len = ISERT_QP_MAX_RECV_DTOS * sizeof(*isert_conn->rx_descs);
 
-       if (wr_id >= start && wr_id < start + len)
+       if ((wr_id >= start && wr_id < start + len) ||
+           (wr_id == isert_conn->login_req_buf))
                return false;
 
        return true;