scsi: return EAGAIN when resetting a device under EH
authorChristoph Hellwig <hch@lst.de>
Mon, 27 Oct 2014 15:28:13 +0000 (16:28 +0100)
committerChristoph Hellwig <hch@lst.de>
Wed, 12 Nov 2014 10:16:12 +0000 (11:16 +0100)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/scsi/scsi_ioctl.c

index 712f159ebb696bc6e147c9511a982cb81f67fa17..c4f7b56fa6f60d880fb5ce6b57e91a2c694bb30f 100644 (file)
@@ -278,7 +278,7 @@ int scsi_ioctl_block_when_processing_errors(struct scsi_device *sdev, int cmd,
 {
        if (cmd == SG_SCSI_RESET && ndelay) {
                if (scsi_host_in_recovery(sdev->host))
-                       return -ENODEV;
+                       return -EAGAIN;
        } else {
                if (!scsi_block_when_processing_errors(sdev))
                        return -ENODEV;