scsi: return EAGAIN when resetting a device under EH

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
This commit is contained in:
Christoph Hellwig 2014-10-27 16:28:13 +01:00
parent 2b3b3d61e8
commit e9afccc524

View 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;