X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fscsi%2Fsr_ioctl.c;h=3471be05779a5220e40eb3e67d32ad3ee7b6bd8e;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=1ddb5f27a8743fdfeeb6f386ff460fe181d5187d;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c index 1ddb5f27a..3471be057 100644 --- a/drivers/scsi/sr_ioctl.c +++ b/drivers/scsi/sr_ioctl.c @@ -29,6 +29,9 @@ * It is off by default and can be turned on with this module parameter */ static int xa_test = 0; +module_param(xa_test, int, S_IRUGO | S_IWUSR); + + #define IOCTL_RETRIES 3 /* ATAPI drives don't have a SCMD_PLAYAUDIO_TI command. When these drives @@ -549,5 +552,17 @@ int sr_dev_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, unsigned long arg) { Scsi_CD *cd = cdi->handle; + int ret; + + ret = scsi_nonblockable_ioctl(cd->device, cmd, + (void __user *)arg, NULL); + /* + * ENODEV means that we didn't recognise the ioctl, or that we + * cannot execute it in the current device state. In either + * case fall through to scsi_ioctl, which will return ENDOEV again + * if it doesn't recognise the ioctl + */ + if (ret != -ENODEV) + return ret; return scsi_ioctl(cd->device, cmd, (void __user *)arg); }