diff options
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 2bf98469dc4c..bbbc186dbc1a 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -320,7 +320,7 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) | |||
320 | "changed. The Linux SCSI layer does not " | 320 | "changed. The Linux SCSI layer does not " |
321 | "automatically adjust these parameters.\n"); | 321 | "automatically adjust these parameters.\n"); |
322 | 322 | ||
323 | if (blk_barrier_rq(scmd->request)) | 323 | if (scmd->request->cmd_flags & REQ_HARDBARRIER) |
324 | /* | 324 | /* |
325 | * barrier requests should always retry on UA | 325 | * barrier requests should always retry on UA |
326 | * otherwise block will get a spurious error | 326 | * otherwise block will get a spurious error |
@@ -1331,16 +1331,16 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd) | |||
1331 | case DID_OK: | 1331 | case DID_OK: |
1332 | break; | 1332 | break; |
1333 | case DID_BUS_BUSY: | 1333 | case DID_BUS_BUSY: |
1334 | return blk_failfast_transport(scmd->request); | 1334 | return (scmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT); |
1335 | case DID_PARITY: | 1335 | case DID_PARITY: |
1336 | return blk_failfast_dev(scmd->request); | 1336 | return (scmd->request->cmd_flags & REQ_FAILFAST_DEV); |
1337 | case DID_ERROR: | 1337 | case DID_ERROR: |
1338 | if (msg_byte(scmd->result) == COMMAND_COMPLETE && | 1338 | if (msg_byte(scmd->result) == COMMAND_COMPLETE && |
1339 | status_byte(scmd->result) == RESERVATION_CONFLICT) | 1339 | status_byte(scmd->result) == RESERVATION_CONFLICT) |
1340 | return 0; | 1340 | return 0; |
1341 | /* fall through */ | 1341 | /* fall through */ |
1342 | case DID_SOFT_ERROR: | 1342 | case DID_SOFT_ERROR: |
1343 | return blk_failfast_driver(scmd->request); | 1343 | return (scmd->request->cmd_flags & REQ_FAILFAST_DRIVER); |
1344 | } | 1344 | } |
1345 | 1345 | ||
1346 | switch (status_byte(scmd->result)) { | 1346 | switch (status_byte(scmd->result)) { |
@@ -1349,7 +1349,9 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd) | |||
1349 | * assume caller has checked sense and determinted | 1349 | * assume caller has checked sense and determinted |
1350 | * the check condition was retryable. | 1350 | * the check condition was retryable. |
1351 | */ | 1351 | */ |
1352 | return blk_failfast_dev(scmd->request); | 1352 | if (scmd->request->cmd_flags & REQ_FAILFAST_DEV || |
1353 | scmd->request->cmd_type == REQ_TYPE_BLOCK_PC) | ||
1354 | return 1; | ||
1353 | } | 1355 | } |
1354 | 1356 | ||
1355 | return 0; | 1357 | return 0; |