aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2011-02-23 18:27:17 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-02-25 13:00:57 -0500
commit4e98d3b8ac81696d38eb7b54e8566e763f7aa97a (patch)
tree839f2de3e8500abf3298dd931db1539bb55b1e79 /drivers/scsi
parente46ef004f8938eb7bc80f350d8efed9bf57f04b3 (diff)
[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>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 032d494da0db..110cac08121d 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -812,17 +812,20 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
812{ 812{
813 scsi_qla_host_t *vha = shost_priv(cmd->device->host); 813 scsi_qla_host_t *vha = shost_priv(cmd->device->host);
814 srb_t *sp; 814 srb_t *sp;
815 int ret = SUCCESS; 815 int ret;
816 unsigned int id, lun; 816 unsigned int id, lun;
817 unsigned long flags; 817 unsigned long flags;
818 int wait = 0; 818 int wait = 0;
819 struct qla_hw_data *ha = vha->hw; 819 struct qla_hw_data *ha = vha->hw;
820 820
821 fc_block_scsi_eh(cmd);
822
823 if (!CMD_SP(cmd)) 821 if (!CMD_SP(cmd))
824 return SUCCESS; 822 return SUCCESS;
825 823
824 ret = fc_block_scsi_eh(cmd);
825 if (ret != 0)
826 return ret;
827 ret = SUCCESS;
828
826 id = cmd->device->id; 829 id = cmd->device->id;
827 lun = cmd->device->lun; 830 lun = cmd->device->lun;
828 831
@@ -931,11 +934,13 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type,
931 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; 934 fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata;
932 int err; 935 int err;
933 936
934 fc_block_scsi_eh(cmd);
935
936 if (!fcport) 937 if (!fcport)
937 return FAILED; 938 return FAILED;
938 939
940 err = fc_block_scsi_eh(cmd);
941 if (err != 0)
942 return err;
943
939 qla_printk(KERN_INFO, vha->hw, "scsi(%ld:%d:%d): %s RESET ISSUED.\n", 944 qla_printk(KERN_INFO, vha->hw, "scsi(%ld:%d:%d): %s RESET ISSUED.\n",
940 vha->host_no, cmd->device->id, cmd->device->lun, name); 945 vha->host_no, cmd->device->id, cmd->device->lun, name);
941 946
@@ -1009,14 +1014,17 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
1009 int ret = FAILED; 1014 int ret = FAILED;
1010 unsigned int id, lun; 1015 unsigned int id, lun;
1011 1016
1012 fc_block_scsi_eh(cmd);
1013
1014 id = cmd->device->id; 1017 id = cmd->device->id;
1015 lun = cmd->device->lun; 1018 lun = cmd->device->lun;
1016 1019
1017 if (!fcport) 1020 if (!fcport)
1018 return ret; 1021 return ret;
1019 1022
1023 ret = fc_block_scsi_eh(cmd);
1024 if (ret != 0)
1025 return ret;
1026 ret = FAILED;
1027
1020 qla_printk(KERN_INFO, vha->hw, 1028 qla_printk(KERN_INFO, vha->hw,
1021 "scsi(%ld:%d:%d): BUS RESET ISSUED.\n", vha->host_no, id, lun); 1029 "scsi(%ld:%d:%d): BUS RESET ISSUED.\n", vha->host_no, id, lun);
1022 1030
@@ -1069,14 +1077,17 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
1069 unsigned int id, lun; 1077 unsigned int id, lun;
1070 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); 1078 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
1071 1079
1072 fc_block_scsi_eh(cmd);
1073
1074 id = cmd->device->id; 1080 id = cmd->device->id;
1075 lun = cmd->device->lun; 1081 lun = cmd->device->lun;
1076 1082
1077 if (!fcport) 1083 if (!fcport)
1078 return ret; 1084 return ret;
1079 1085
1086 ret = fc_block_scsi_eh(cmd);
1087 if (ret != 0)
1088 return ret;
1089 ret = FAILED;
1090
1080 qla_printk(KERN_INFO, ha, 1091 qla_printk(KERN_INFO, ha,
1081 "scsi(%ld:%d:%d): ADAPTER RESET ISSUED.\n", vha->host_no, id, lun); 1092 "scsi(%ld:%d:%d): ADAPTER RESET ISSUED.\n", vha->host_no, id, lun);
1082 1093