if (sdev->host->shost_state == SHOST_RECOVERY) 
if (scsi_host_in_recovery(sdev->host)) 
int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd,			    void __user *arg, struct file *filp){	int val, result;	/* The first set of iocts may be executed even if we're doing	 * error processing, as long as the device was opened	 * non-blocking */	if (filp && filp->f_flags & O_NONBLOCK) {		if (sdev->host->shost_state == SHOST_RECOVERY)			return -ENODEV;	} else if (!scsi_block_when_processing_errors(sdev))		return -ENODEV;	switch (cmd) {	case SG_SCSI_RESET:		result = get_user(val, (int __user *)arg);		if (result)			return result;		if (val == SG_SCSI_RESET_NOTHING)			return 0;		switch (val) {		case SG_SCSI_RESET_DEVICE:			val = SCSI_TRY_RESET_DEVICE;			break;		case SG_SCSI_RESET_BUS:			val = SCSI_TRY_RESET_BUS;			break;		case SG_SCSI_RESET_HOST:			val = SCSI_TRY_RESET_HOST;			break;		default:			return -EINVAL;		}		if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))			return -EACCES;		return (scsi_reset_provider(sdev, val) ==			SUCCESS) ? 0 : -EIO;	}	return -ENODEV;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/939647ee308e0ad924e776657704c7bedd498664/scsi_ioctl.c/clean/drivers/scsi/scsi_ioctl.c