Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
[sfrench/cifs-2.6.git] / drivers / scsi / scsi_error.c
index 0bd88381c1e1d10f3402eaa8c62ab04e7f63b66b..1de30eb83bb097664056209ec6d06a470385b76d 100644 (file)
@@ -320,7 +320,7 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
                                    "changed. The Linux SCSI layer does not "
                                    "automatically adjust these parameters.\n");
 
-               if (blk_barrier_rq(scmd->request))
+               if (scmd->request->cmd_flags & REQ_HARDBARRIER)
                        /*
                         * barrier requests should always retry on UA
                         * otherwise block will get a spurious error
@@ -1334,16 +1334,16 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd)
        case DID_OK:
                break;
        case DID_BUS_BUSY:
-               return blk_failfast_transport(scmd->request);
+               return (scmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT);
        case DID_PARITY:
-               return blk_failfast_dev(scmd->request);
+               return (scmd->request->cmd_flags & REQ_FAILFAST_DEV);
        case DID_ERROR:
                if (msg_byte(scmd->result) == COMMAND_COMPLETE &&
                    status_byte(scmd->result) == RESERVATION_CONFLICT)
                        return 0;
                /* fall through */
        case DID_SOFT_ERROR:
-               return blk_failfast_driver(scmd->request);
+               return (scmd->request->cmd_flags & REQ_FAILFAST_DRIVER);
        }
 
        switch (status_byte(scmd->result)) {
@@ -1352,7 +1352,9 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd)
                 * assume caller has checked sense and determinted
                 * the check condition was retryable.
                 */
-               return blk_failfast_dev(scmd->request);
+               if (scmd->request->cmd_flags & REQ_FAILFAST_DEV ||
+                   scmd->request->cmd_type == REQ_TYPE_BLOCK_PC)
+                       return 1;
        }
 
        return 0;