diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 29 |
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 | ||