patch-2.2.19 linux/drivers/scsi/st.c

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

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.18/drivers/scsi/st.c linux/drivers/scsi/st.c
@@ -55,6 +55,8 @@
 
 #include "constants.h"
 
+#include "osst_detect.h"
+
 #ifdef MODULE
 MODULE_PARM(buffer_kbs, "i");
 MODULE_PARM(write_threshold_kbs, "i");
@@ -3407,6 +3409,18 @@
 #endif
 
 
+/* Returns zero for drives not supported by this driver */
+static int st_supported(Scsi_Device * SDp)
+{
+  /* These OnStream SC drives require a special driver. The OnStream ADR* drives
+     are supported by this driver */
+  if ( OSST_SUPPORTS(SDp) )
+      return 0;
+
+  return 1;
+}
+
+
 static struct file_operations st_fops = {
    NULL,            /* lseek - default */
    st_read,         /* read - general block-dev read */
@@ -3429,6 +3443,8 @@
 
    if (SDp->type != TYPE_TAPE)
        return 1;
+   if (!st_supported(SDp))
+       return 1;
 
    if (st_template.nr_dev >= st_template.dev_max) {
        SDp->attached--;
@@ -3502,6 +3518,8 @@
 static int st_detect(Scsi_Device * SDp)
 {
   if(SDp->type != TYPE_TAPE) return 0;
+  if (!st_supported(SDp))
+      return 0;
 
   printk(KERN_WARNING
 	 "Detected scsi tape st%d at scsi%d, channel %d, id %d, lun %d\n",

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)