summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qedi/qedi_fw.c
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2021-05-25 20:18:17 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-06-02 07:28:23 +0200
commit2819b4ae2873d50fd55292877b0231ec936c3b2e (patch)
tree9c6abb7de0dd80e9d1a3dbfdf9611e63e5ceecb5 /drivers/scsi/qedi/qedi_fw.c
parentscsi: qedi: Use GFP_NOIO for TMF allocation (diff)
downloadlinux-2819b4ae2873d50fd55292877b0231ec936c3b2e.tar.xz
linux-2819b4ae2873d50fd55292877b0231ec936c3b2e.zip
scsi: qedi: Fix TMF session block/unblock use
Drivers shouldn't be calling block/unblock session for tmf handling because the functions can change the session state from under libiscsi. iscsi_queuecommand's call to iscsi_prep_scsi_cmd_pdu-> iscsi_check_tmf_restrictions will prevent new cmds from being sent to qedi after we've started handling a TMF. So we don't need to try and block it in the driver, and we can remove these block calls. Link: https://lore.kernel.org/r/20210525181821.7617-25-michael.christie@oracle.com Reviewed-by: Manish Rangankar <mrangankar@marvell.com> Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qedi/qedi_fw.c')
-rw-r--r--drivers/scsi/qedi/qedi_fw.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c
index e82c68f660f8..f08fe967bcfe 100644
--- a/drivers/scsi/qedi/qedi_fw.c
+++ b/drivers/scsi/qedi/qedi_fw.c
@@ -159,14 +159,9 @@ static void qedi_tmf_resp_work(struct work_struct *work)
set_bit(QEDI_CONN_FW_CLEANUP, &qedi_conn->flags);
resp_hdr_ptr = (struct iscsi_tm_rsp *)qedi_cmd->tmf_resp_buf;
- iscsi_block_session(session->cls_session);
rval = qedi_cleanup_all_io(qedi, qedi_conn, qedi_cmd->task, true);
- if (rval) {
- iscsi_unblock_session(session->cls_session);
+ if (rval)
goto exit_tmf_resp;
- }
-
- iscsi_unblock_session(session->cls_session);
spin_lock(&session->back_lock);
__iscsi_complete_pdu(conn, (struct iscsi_hdr *)resp_hdr_ptr, NULL, 0);