summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorVarun Prakash <varun@chelsio.com>2016-04-20 00:00:18 +0530
committerNicholas Bellinger <nab@linux-iscsi.org>2016-05-09 23:12:28 -0700
commitb4869ee9525dd6ded57f1898b65035d5529acfa0 (patch)
tree0d1242b62412d80005e6e4d2909c1b6955ab476f /drivers/target
parent1c50ff424e3d9a392ec2df797c3b6083ed70fca6 (diff)
downloadop-kernel-dev-b4869ee9525dd6ded57f1898b65035d5529acfa0.zip
op-kernel-dev-b4869ee9525dd6ded57f1898b65035d5529acfa0.tar.gz
iscsi-target: call complete on conn_logout_comp
ISCSI_HW_OFFLOAD transport drivers waits on conn_logout_comp as ISCSI_TCP driver so call complete if transport type is ISCSI_HW_OFFLOAD. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 29df956..8021223 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -4063,16 +4063,18 @@ int iscsit_close_connection(
pr_debug("Closing iSCSI connection CID %hu on SID:"
" %u\n", conn->cid, sess->sid);
/*
- * Always up conn_logout_comp for the traditional TCP case just in case
- * the RX Thread in iscsi_target_rx_opcode() is sleeping and the logout
- * response never got sent because the connection failed.
+ * Always up conn_logout_comp for the traditional TCP and HW_OFFLOAD
+ * case just in case the RX Thread in iscsi_target_rx_opcode() is
+ * sleeping and the logout response never got sent because the
+ * connection failed.
*
* However for iser-target, isert_wait4logout() is using conn_logout_comp
* to signal logout response TX interrupt completion. Go ahead and skip
* this for iser since isert_rx_opcode() does not wait on logout failure,
* and to avoid iscsi_conn pointer dereference in iser-target code.
*/
- if (conn->conn_transport->transport_type == ISCSI_TCP)
+ if ((conn->conn_transport->transport_type == ISCSI_TCP) ||
+ (conn->conn_transport->transport_type == ISCSI_HW_OFFLOAD))
complete(&conn->conn_logout_comp);
if (!strcmp(current->comm, ISCSI_RX_THREAD_NAME)) {
OpenPOWER on IntegriCloud