]> git.karo-electronics.de Git - linux-beck.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)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 11 Mar 2016 05:48:29 +0000 (21:48 -0800)
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>
drivers/infiniband/ulp/isert/ib_isert.c

index f121e612933913dc9b24ccdbb41f63a5d8f09b84..09ded3c704e50a81e5f17b5c4841ec6816e03fb3 100644 (file)
@@ -2048,7 +2048,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;