diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/scsi_error.c | 19 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 2 |
2 files changed, 4 insertions, 17 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 1b88af89d0c7..2768bf6ffe59 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -307,20 +307,7 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) | |||
307 | (sshdr.asc == 0x04) && (sshdr.ascq == 0x02)) | 307 | (sshdr.asc == 0x04) && (sshdr.ascq == 0x02)) |
308 | return FAILED; | 308 | return FAILED; |
309 | 309 | ||
310 | if (scmd->request->cmd_flags & REQ_HARDBARRIER) | 310 | return NEEDS_RETRY; |
311 | /* | ||
312 | * barrier requests should always retry on UA | ||
313 | * otherwise block will get a spurious error | ||
314 | */ | ||
315 | return NEEDS_RETRY; | ||
316 | else | ||
317 | /* | ||
318 | * for normal (non barrier) commands, pass the | ||
319 | * UA upwards for a determination in the | ||
320 | * completion functions | ||
321 | */ | ||
322 | return SUCCESS; | ||
323 | |||
324 | /* these three are not supported */ | 311 | /* these three are not supported */ |
325 | case COPY_ABORTED: | 312 | case COPY_ABORTED: |
326 | case VOLUME_OVERFLOW: | 313 | case VOLUME_OVERFLOW: |
@@ -1336,7 +1323,9 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd) | |||
1336 | * assume caller has checked sense and determinted | 1323 | * assume caller has checked sense and determinted |
1337 | * the check condition was retryable. | 1324 | * the check condition was retryable. |
1338 | */ | 1325 | */ |
1339 | return (scmd->request->cmd_flags & REQ_FAILFAST_DEV); | 1326 | if (scmd->request->cmd_flags & REQ_FAILFAST_DEV || |
1327 | scmd->request->cmd_type == REQ_TYPE_BLOCK_PC) | ||
1328 | return 1; | ||
1340 | } | 1329 | } |
1341 | 1330 | ||
1342 | return 0; | 1331 | return 0; |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index e63b85ac8cd1..108daead7ae8 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -477,8 +477,6 @@ static int scsi_setup_discard_cmnd(struct scsi_device *sdp, struct request *rq) | |||
477 | 477 | ||
478 | static int scsi_setup_flush_cmnd(struct scsi_device *sdp, struct request *rq) | 478 | static int scsi_setup_flush_cmnd(struct scsi_device *sdp, struct request *rq) |
479 | { | 479 | { |
480 | /* for now, we use REQ_TYPE_BLOCK_PC. */ | ||
481 | rq->cmd_type = REQ_TYPE_BLOCK_PC; | ||
482 | rq->timeout = SD_TIMEOUT; | 480 | rq->timeout = SD_TIMEOUT; |
483 | rq->retries = SD_MAX_RETRIES; | 481 | rq->retries = SD_MAX_RETRIES; |
484 | rq->cmd[0] = SYNCHRONIZE_CACHE; | 482 | rq->cmd[0] = SYNCHRONIZE_CACHE; |