Commit 7f4374e6 authored by Quinn Tran's avatar Quinn Tran Committed by Martin K. Petersen

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: default avatarQuinn Tran <quinn.tran@cavium.com>
Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 5e5402c1
......@@ -1296,6 +1296,9 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
if (!qpair)
return SUCCESS;
if (sp->fcport && sp->fcport->deleted)
return SUCCESS;
spin_lock_irqsave(qpair->qp_lock_ptr, flags);
if (sp->type != SRB_SCSI_CMD || GET_CMD_SP(sp) != cmd) {
/* 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)
return err;
if (fcport->deleted)
return SUCCESS;
ql_log(ql_log_info, vha, 0x8009,
"%s RESET ISSUED nexus=%ld:%d:%llu cmd=%p.\n", name, vha->host_no,
cmd->device->id, cmd->device->lun, cmd);
......@@ -1534,6 +1540,9 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
return ret;
ret = FAILED;
if (qla2x00_chip_is_down(vha))
return ret;
ql_log(ql_log_info, vha, 0x8012,
"BUS RESET ISSUED nexus=%ld:%d:%llu.\n", vha->host_no, id, lun);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment