diff options
Diffstat (limited to 'drivers/scsi/libsas')
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index 9dd1e9eda19b..d625577ed152 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c | |||
@@ -207,7 +207,7 @@ int sas_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) | |||
207 | 207 | ||
208 | task = sas_create_task(cmd, dev, GFP_ATOMIC); | 208 | task = sas_create_task(cmd, dev, GFP_ATOMIC); |
209 | if (!task) | 209 | if (!task) |
210 | return -ENOMEM; | 210 | return SCSI_MLQUEUE_HOST_BUSY; |
211 | 211 | ||
212 | /* Queue up, Direct Mode or Task Collector Mode. */ | 212 | /* Queue up, Direct Mode or Task Collector Mode. */ |
213 | if (sas_ha->lldd_max_execute_num < 2) | 213 | if (sas_ha->lldd_max_execute_num < 2) |
@@ -223,9 +223,10 @@ out_free_task: | |||
223 | SAS_DPRINTK("lldd_execute_task returned: %d\n", res); | 223 | SAS_DPRINTK("lldd_execute_task returned: %d\n", res); |
224 | ASSIGN_SAS_TASK(cmd, NULL); | 224 | ASSIGN_SAS_TASK(cmd, NULL); |
225 | sas_free_task(task); | 225 | sas_free_task(task); |
226 | if (res != -SAS_QUEUE_FULL) | 226 | if (res == -SAS_QUEUE_FULL) |
227 | return res; | 227 | cmd->result = DID_SOFT_ERROR << 16; /* retry */ |
228 | cmd->result = DID_SOFT_ERROR << 16; /* retry */ | 228 | else |
229 | cmd->result = DID_ERROR << 16; | ||
229 | out_done: | 230 | out_done: |
230 | cmd->scsi_done(cmd); | 231 | cmd->scsi_done(cmd); |
231 | return 0; | 232 | return 0; |