[SCSI] qla2xxx: Check return value of fc_block_scsi_eh()
The fc_block_scsi_eh() might return with status FAST_IO_FAIL indicating I/O has been terminated due to fast_io_fail timeout. In this case the rport is still blocked, so any error recovery will be failing on this port. Hence we need to check if the return value from fc_block_scsi_eh() is something other than 0, in which case it should just return with that status. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
e46ef004f8
commit
4e98d3b8ac
|
@ -812,17 +812,20 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
|
||||||
{
|
{
|
||||||
scsi_qla_host_t *vha = shost_priv(cmd->device->host);
|
scsi_qla_host_t *vha = shost_priv(cmd->device->host);
|
||||||
srb_t *sp;
|
srb_t *sp;
|
||||||
int ret = SUCCESS;
|
int ret;
|
||||||
unsigned int id, lun;
|
unsigned int id, lun;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int wait = 0;
|
int wait = 0;
|
||||||
struct qla_hw_data *ha = vha->hw;
|
struct qla_hw_data *ha = vha->hw;
|
||||||
|
|
||||||
fc_block_scsi_eh(cmd);
|
|
||||||
|
|
||||||
if (!CMD_SP(cmd))
|
if (!CMD_SP(cmd))
|
||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
|
|
||||||
|
ret = fc_block_scsi_eh(cmd);
|
||||||
|
if (ret != 0)
|
||||||
|
return ret;
|
||||||
|
ret = SUCCESS;
|
||||||
|
|
||||||
id = cmd->device->id;
|
id = cmd->device->id;
|
||||||
lun = cmd->device->lun;
|
lun = cmd->device->lun;
|
||||||
|
|
||||||
|
@ -931,11 +934,13 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type,
|
||||||
fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
|
fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
fc_block_scsi_eh(cmd);
|
|
||||||
|
|
||||||
if (!fcport)
|
if (!fcport)
|
||||||
return FAILED;
|
return FAILED;
|
||||||
|
|
||||||
|
err = fc_block_scsi_eh(cmd);
|
||||||
|
if (err != 0)
|
||||||
|
return err;
|
||||||
|
|
||||||
qla_printk(KERN_INFO, vha->hw, "scsi(%ld:%d:%d): %s RESET ISSUED.\n",
|
qla_printk(KERN_INFO, vha->hw, "scsi(%ld:%d:%d): %s RESET ISSUED.\n",
|
||||||
vha->host_no, cmd->device->id, cmd->device->lun, name);
|
vha->host_no, cmd->device->id, cmd->device->lun, name);
|
||||||
|
|
||||||
|
@ -1009,14 +1014,17 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
|
||||||
int ret = FAILED;
|
int ret = FAILED;
|
||||||
unsigned int id, lun;
|
unsigned int id, lun;
|
||||||
|
|
||||||
fc_block_scsi_eh(cmd);
|
|
||||||
|
|
||||||
id = cmd->device->id;
|
id = cmd->device->id;
|
||||||
lun = cmd->device->lun;
|
lun = cmd->device->lun;
|
||||||
|
|
||||||
if (!fcport)
|
if (!fcport)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
ret = fc_block_scsi_eh(cmd);
|
||||||
|
if (ret != 0)
|
||||||
|
return ret;
|
||||||
|
ret = FAILED;
|
||||||
|
|
||||||
qla_printk(KERN_INFO, vha->hw,
|
qla_printk(KERN_INFO, vha->hw,
|
||||||
"scsi(%ld:%d:%d): BUS RESET ISSUED.\n", vha->host_no, id, lun);
|
"scsi(%ld:%d:%d): BUS RESET ISSUED.\n", vha->host_no, id, lun);
|
||||||
|
|
||||||
|
@ -1069,14 +1077,17 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
|
||||||
unsigned int id, lun;
|
unsigned int id, lun;
|
||||||
scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
|
scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
|
||||||
|
|
||||||
fc_block_scsi_eh(cmd);
|
|
||||||
|
|
||||||
id = cmd->device->id;
|
id = cmd->device->id;
|
||||||
lun = cmd->device->lun;
|
lun = cmd->device->lun;
|
||||||
|
|
||||||
if (!fcport)
|
if (!fcport)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
ret = fc_block_scsi_eh(cmd);
|
||||||
|
if (ret != 0)
|
||||||
|
return ret;
|
||||||
|
ret = FAILED;
|
||||||
|
|
||||||
qla_printk(KERN_INFO, ha,
|
qla_printk(KERN_INFO, ha,
|
||||||
"scsi(%ld:%d:%d): ADAPTER RESET ISSUED.\n", vha->host_no, id, lun);
|
"scsi(%ld:%d:%d): ADAPTER RESET ISSUED.\n", vha->host_no, id, lun);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue