]> Pileus Git - ~andy/linux/blobdiff - drivers/scsi/scsi_error.c
drm/nv20-nv30/gr: use parent as self for subobjects
[~andy/linux] / drivers / scsi / scsi_error.c
index de2337f255a74ff02888f67e1d202766f257930a..c1b05a83d403221912fb845e314d3a30656a89fc 100644 (file)
@@ -789,7 +789,6 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd,
                             int cmnd_size, int timeout, unsigned sense_bytes)
 {
        struct scsi_device *sdev = scmd->device;
-       struct scsi_driver *sdrv = scsi_cmd_to_driver(scmd);
        struct Scsi_Host *shost = sdev->host;
        DECLARE_COMPLETION_ONSTACK(done);
        unsigned long timeleft;
@@ -845,8 +844,11 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd,
 
        scsi_eh_restore_cmnd(scmd, &ses);
 
-       if (sdrv && sdrv->eh_action)
-               rtn = sdrv->eh_action(scmd, cmnd, cmnd_size, rtn);
+       if (scmd->request->cmd_type != REQ_TYPE_BLOCK_PC) {
+               struct scsi_driver *sdrv = scsi_cmd_to_driver(scmd);
+               if (sdrv->eh_action)
+                       rtn = sdrv->eh_action(scmd, cmnd, cmnd_size, rtn);
+       }
 
        return rtn;
 }