diff options
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 3f62041222f2..c42748b3b257 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c | |||
@@ -869,7 +869,11 @@ isert_rx_login_req(struct iser_rx_desc *rx_desc, int rx_buflen, | |||
869 | size, rx_buflen, MAX_KEY_VALUE_PAIRS); | 869 | size, rx_buflen, MAX_KEY_VALUE_PAIRS); |
870 | memcpy(login->req_buf, &rx_desc->data[0], size); | 870 | memcpy(login->req_buf, &rx_desc->data[0], size); |
871 | 871 | ||
872 | complete(&isert_conn->conn_login_comp); | 872 | if (login->first_request) { |
873 | complete(&isert_conn->conn_login_comp); | ||
874 | return; | ||
875 | } | ||
876 | schedule_delayed_work(&conn->login_work, 0); | ||
873 | } | 877 | } |
874 | 878 | ||
875 | static void | 879 | static void |
@@ -2224,6 +2228,14 @@ isert_get_login_rx(struct iscsi_conn *conn, struct iscsi_login *login) | |||
2224 | int ret; | 2228 | int ret; |
2225 | 2229 | ||
2226 | pr_debug("isert_get_login_rx before conn_login_comp conn: %p\n", conn); | 2230 | pr_debug("isert_get_login_rx before conn_login_comp conn: %p\n", conn); |
2231 | /* | ||
2232 | * For login requests after the first PDU, isert_rx_login_req() will | ||
2233 | * kick schedule_delayed_work(&conn->login_work) as the packet is | ||
2234 | * received, which turns this callback from iscsi_target_do_login_rx() | ||
2235 | * into a NOP. | ||
2236 | */ | ||
2237 | if (!login->first_request) | ||
2238 | return 0; | ||
2227 | 2239 | ||
2228 | ret = wait_for_completion_interruptible(&isert_conn->conn_login_comp); | 2240 | ret = wait_for_completion_interruptible(&isert_conn->conn_login_comp); |
2229 | if (ret) | 2241 | if (ret) |