diff options
-rw-r--r-- | drivers/infiniband/ulp/isert/ib_isert.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index 276054b65b98..fc4641e5fd1e 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c | |||
@@ -1984,13 +1984,6 @@ static void | |||
1984 | isert_cq_comp_err(struct isert_conn *isert_conn, struct ib_wc *wc) | 1984 | isert_cq_comp_err(struct isert_conn *isert_conn, struct ib_wc *wc) |
1985 | { | 1985 | { |
1986 | if (wc->wr_id == ISER_BEACON_WRID) { | 1986 | if (wc->wr_id == ISER_BEACON_WRID) { |
1987 | struct iscsi_conn *conn = isert_conn->conn; | ||
1988 | |||
1989 | if (conn->sess) { | ||
1990 | target_sess_cmd_list_set_waiting(conn->sess->se_sess); | ||
1991 | target_wait_for_sess_cmds(conn->sess->se_sess); | ||
1992 | } | ||
1993 | |||
1994 | pr_info("conn %p completing conn_wait_comp_err\n", | 1987 | pr_info("conn %p completing conn_wait_comp_err\n", |
1995 | isert_conn); | 1988 | isert_conn); |
1996 | complete(&isert_conn->conn_wait_comp_err); | 1989 | complete(&isert_conn->conn_wait_comp_err); |
@@ -3243,6 +3236,15 @@ static void isert_release_work(struct work_struct *work) | |||
3243 | } | 3236 | } |
3244 | 3237 | ||
3245 | static void | 3238 | static void |
3239 | isert_wait4cmds(struct iscsi_conn *conn) | ||
3240 | { | ||
3241 | if (conn->sess) { | ||
3242 | target_sess_cmd_list_set_waiting(conn->sess->se_sess); | ||
3243 | target_wait_for_sess_cmds(conn->sess->se_sess); | ||
3244 | } | ||
3245 | } | ||
3246 | |||
3247 | static void | ||
3246 | isert_wait4flush(struct isert_conn *isert_conn) | 3248 | isert_wait4flush(struct isert_conn *isert_conn) |
3247 | { | 3249 | { |
3248 | struct ib_recv_wr *bad_wr; | 3250 | struct ib_recv_wr *bad_wr; |
@@ -3276,6 +3278,7 @@ static void isert_wait_conn(struct iscsi_conn *conn) | |||
3276 | isert_conn_terminate(isert_conn); | 3278 | isert_conn_terminate(isert_conn); |
3277 | mutex_unlock(&isert_conn->conn_mutex); | 3279 | mutex_unlock(&isert_conn->conn_mutex); |
3278 | 3280 | ||
3281 | isert_wait4cmds(conn); | ||
3279 | isert_wait4flush(isert_conn); | 3282 | isert_wait4flush(isert_conn); |
3280 | 3283 | ||
3281 | INIT_WORK(&isert_conn->release_work, isert_release_work); | 3284 | INIT_WORK(&isert_conn->release_work, isert_release_work); |