patch-1.3.98 linux/drivers/scsi/sr_ioctl.c

Next file: linux/drivers/scsi/st.c
Previous file: linux/drivers/scsi/sr.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.97/linux/drivers/scsi/sr_ioctl.c linux/drivers/scsi/sr_ioctl.c
@@ -10,7 +10,7 @@
 #include "scsi.h"
 #include "hosts.h"
 #include "sr.h"
-#include "scsi_ioctl.h"
+#include <scsi/scsi_ioctl.h>
 
 #include <linux/cdrom.h>
 
@@ -555,12 +555,21 @@
     }
 	
     case BLKRASET:
+    {
 	if(!suser())  return -EACCES;
 	if(!(inode->i_rdev)) return -EINVAL;
 	if(arg > 0xff) return -EINVAL;
 	read_ahead[MAJOR(inode->i_rdev)] = arg;
 	return 0;
 	RO_IOCTLS(dev,arg);
+    }
+
+    case CDROMRESET:
+    {
+	invalidate_buffers(MKDEV(MAJOR(inode->i_rdev),MINOR(inode->i_rdev)));
+	return 0;
+    }
+
     default:
 	return scsi_ioctl(scsi_CDs[target].device,cmd,(void *) arg);
     }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this