scsi: qla2xxx: Reject EH_{abort|device_reset|target_request}

Reject eh_{abort|device_reset|target_reset} when rport is being torn down
or chip is down.

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Quinn Tran 2019-07-26 09:07:31 -07:00 committed by Martin K. Petersen
parent 5e5402c147
commit 7f4374e67b
1 changed files with 9 additions and 0 deletions

View File

@ -1296,6 +1296,9 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
if (!qpair) if (!qpair)
return SUCCESS; return SUCCESS;
if (sp->fcport && sp->fcport->deleted)
return SUCCESS;
spin_lock_irqsave(qpair->qp_lock_ptr, flags); spin_lock_irqsave(qpair->qp_lock_ptr, flags);
if (sp->type != SRB_SCSI_CMD || GET_CMD_SP(sp) != cmd) { if (sp->type != SRB_SCSI_CMD || GET_CMD_SP(sp) != cmd) {
/* there's a chance an interrupt could clear /* there's a chance an interrupt could clear
@ -1420,6 +1423,9 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type,
if (err != 0) if (err != 0)
return err; return err;
if (fcport->deleted)
return SUCCESS;
ql_log(ql_log_info, vha, 0x8009, ql_log(ql_log_info, vha, 0x8009,
"%s RESET ISSUED nexus=%ld:%d:%llu cmd=%p.\n", name, vha->host_no, "%s RESET ISSUED nexus=%ld:%d:%llu cmd=%p.\n", name, vha->host_no,
cmd->device->id, cmd->device->lun, cmd); cmd->device->id, cmd->device->lun, cmd);
@ -1534,6 +1540,9 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
return ret; return ret;
ret = FAILED; ret = FAILED;
if (qla2x00_chip_is_down(vha))
return ret;
ql_log(ql_log_info, vha, 0x8012, ql_log(ql_log_info, vha, 0x8012,
"BUS RESET ISSUED nexus=%ld:%d:%llu.\n", vha->host_no, id, lun); "BUS RESET ISSUED nexus=%ld:%d:%llu.\n", vha->host_no, id, lun);