Skip to content

Commit 51fd6e6

Browse files
Quinn Tranmartinkpetersen
authored andcommitted
scsi: qla2xxx: flush IO on chip reset or sess delete
On Transmit respond in target mode, if the chip is already reset or the session is already deleted, then advance the command to the free step. There is no need to abort the command, because the chip has already flushed it. Signed-off-by: Quinn Tran <[email protected]> Signed-off-by: Himanshu Madhani <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 80676d0 commit 51fd6e6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/scsi/qla2xxx/qla_target.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3257,13 +3257,10 @@ int qlt_xmit_response(struct qla_tgt_cmd *cmd, int xmit_type,
32573257
unsigned long flags = 0;
32583258
int res;
32593259

3260-
if (cmd->sess && cmd->sess->deleted) {
3260+
if (!qpair->fw_started || (cmd->reset_count != qpair->chip_reset) ||
3261+
(cmd->sess && cmd->sess->deleted)) {
32613262
cmd->state = QLA_TGT_STATE_PROCESSED;
3262-
if (cmd->sess->logout_completed)
3263-
/* no need to terminate. FW already freed exchange. */
3264-
qlt_abort_cmd_on_host_reset(cmd->vha, cmd);
3265-
else
3266-
qlt_send_term_exchange(qpair, cmd, &cmd->atio, 0, 0);
3263+
qlt_abort_cmd_on_host_reset(cmd->vha, cmd);
32673264
return 0;
32683265
}
32693266

0 commit comments

Comments
 (0)