aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla1280.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla1280.c')
-rw-r--r--drivers/scsi/qla1280.c41
1 files changed, 32 insertions, 9 deletions
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 4ad280814990..1a4ce1c39478 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -1098,7 +1098,13 @@ qla1280_error_action(struct scsi_cmnd *cmd, enum action action)
1098static int 1098static int
1099qla1280_eh_abort(struct scsi_cmnd * cmd) 1099qla1280_eh_abort(struct scsi_cmnd * cmd)
1100{ 1100{
1101 return qla1280_error_action(cmd, ABORT_COMMAND); 1101 int rc;
1102
1103 spin_lock_irq(cmd->device->host->host_lock);
1104 rc = qla1280_error_action(cmd, ABORT_COMMAND);
1105 spin_unlock_irq(cmd->device->host->host_lock);
1106
1107 return rc;
1102} 1108}
1103 1109
1104/************************************************************************** 1110/**************************************************************************
@@ -1108,7 +1114,13 @@ qla1280_eh_abort(struct scsi_cmnd * cmd)
1108static int 1114static int
1109qla1280_eh_device_reset(struct scsi_cmnd *cmd) 1115qla1280_eh_device_reset(struct scsi_cmnd *cmd)
1110{ 1116{
1111 return qla1280_error_action(cmd, DEVICE_RESET); 1117 int rc;
1118
1119 spin_lock_irq(cmd->device->host->host_lock);
1120 rc = qla1280_error_action(cmd, DEVICE_RESET);
1121 spin_unlock_irq(cmd->device->host->host_lock);
1122
1123 return rc;
1112} 1124}
1113 1125
1114/************************************************************************** 1126/**************************************************************************
@@ -1118,7 +1130,13 @@ qla1280_eh_device_reset(struct scsi_cmnd *cmd)
1118static int 1130static int
1119qla1280_eh_bus_reset(struct scsi_cmnd *cmd) 1131qla1280_eh_bus_reset(struct scsi_cmnd *cmd)
1120{ 1132{
1121 return qla1280_error_action(cmd, BUS_RESET); 1133 int rc;
1134
1135 spin_lock_irq(cmd->device->host->host_lock);
1136 rc = qla1280_error_action(cmd, BUS_RESET);
1137 spin_unlock_irq(cmd->device->host->host_lock);
1138
1139 return rc;
1122} 1140}
1123 1141
1124/************************************************************************** 1142/**************************************************************************
@@ -1128,7 +1146,13 @@ qla1280_eh_bus_reset(struct scsi_cmnd *cmd)
1128static int 1146static int
1129qla1280_eh_adapter_reset(struct scsi_cmnd *cmd) 1147qla1280_eh_adapter_reset(struct scsi_cmnd *cmd)
1130{ 1148{
1131 return qla1280_error_action(cmd, ADAPTER_RESET); 1149 int rc;
1150
1151 spin_lock_irq(cmd->device->host->host_lock);
1152 rc = qla1280_error_action(cmd, ADAPTER_RESET);
1153 spin_unlock_irq(cmd->device->host->host_lock);
1154
1155 return rc;
1132} 1156}
1133 1157
1134static int 1158static int
@@ -4038,11 +4062,10 @@ qla1280_status_entry(struct scsi_qla_host *ha, struct response *pkt,
4038 scsi_status, handle); 4062 scsi_status, handle);
4039 } 4063 }
4040 4064
4041 /* Target busy */ 4065 /* Target busy or queue full */
4042 if (scsi_status & SS_BUSY_CONDITION && 4066 if ((scsi_status & 0xFF) == SAM_STAT_TASK_SET_FULL ||
4043 scsi_status != SS_RESERVE_CONFLICT) { 4067 (scsi_status & 0xFF) == SAM_STAT_BUSY) {
4044 CMD_RESULT(cmd) = 4068 CMD_RESULT(cmd) = scsi_status & 0xff;
4045 DID_BUS_BUSY << 16 | (scsi_status & 0xff);
4046 } else { 4069 } else {
4047 4070
4048 /* Save ISP completion status */ 4071 /* Save ISP completion status */