block: introduce blk_rq_is_passthrough
[linux-block.git] / drivers / scsi / scsi_error.c
index 4b40f746d534147d5563849edf56b9942668e3f1..b4ce7bb5d2a9edc66ae7f3fe7ca862f41cb80da1 100644 (file)
@@ -1106,7 +1106,7 @@ static int scsi_request_sense(struct scsi_cmnd *scmd)
 
 static int scsi_eh_action(struct scsi_cmnd *scmd, int rtn)
 {
-       if (scmd->request->cmd_type != REQ_TYPE_BLOCK_PC) {
+       if (!blk_rq_is_passthrough(scmd->request)) {
                struct scsi_driver *sdrv = scsi_cmd_to_driver(scmd);
                if (sdrv->eh_action)
                        rtn = sdrv->eh_action(scmd, rtn);
@@ -1746,7 +1746,7 @@ check_type:
         * the check condition was retryable.
         */
        if (scmd->request->cmd_flags & REQ_FAILFAST_DEV ||
-           scmd->request->cmd_type == REQ_TYPE_BLOCK_PC)
+           blk_rq_is_passthrough(scmd->request))
                return 1;
        else
                return 0;