--- ./include/linux/fs.h.~1~	Sun Jul 30 10:34:21 1995
+++ ./include/linux/fs.h	Thu Aug  3 11:47:45 1995
@@ -120,6 +120,8 @@
 #define SCSI_IOCTL_TAGGED_ENABLE 0x5383
 #define SCSI_IOCTL_TAGGED_DISABLE 0x5384
 
+/* Used to obtain the host number of a device. */
+#define SCSI_IOCTL_PROBE_HOST 0x5385
 
 #define BMAP_IOCTL 1	/* obsolete - kept for compatibility */
 #define FIBMAP	   1	/* bmap access */
--- ./drivers/scsi/st.c.~1~	Sun Jul 30 10:40:51 1995
+++ ./drivers/scsi/st.c	Thu Aug  3 11:59:38 1995
@@ -526,6 +526,7 @@
       (STp->mt_status)->mt_fileno = STp->drv_block = 0;
       if (scsi_tapes[dev].device->host->hostt->usage_count)
 	(*scsi_tapes[dev].device->host->hostt->usage_count)++;
+      if(st_template.usage_count) (*st_template.usage_count)++;
       return 0;
     }
 
@@ -1757,6 +1758,15 @@
      return (-EIO);
    }
 #endif
+
+   /*
+    * If this is something intended for the lower layer, just pass it
+    * through.
+    */
+   if( cmd_in == SCSI_IOCTL_GET_IDLUN || cmd_in == SCSI_IOCTL_PROBE_HOST )
+     {
+       return scsi_ioctl(STp->device, cmd_in, (void *) arg);
+     }
 
    cmd = cmd_in & IOCCMD_MASK;
    if (cmd == (MTIOCTOP & IOCCMD_MASK)) {
--- ./drivers/scsi/scsi_ioctl.c.~1~	Sun Jul 30 10:40:50 1995
+++ ./drivers/scsi/scsi_ioctl.c	Thu Aug  3 10:28:40 1995
@@ -321,11 +321,10 @@
         result = verify_area(VERIFY_WRITE, (void *) arg, sizeof(long));
         if (result) return result;
 
-	put_user(dev->id + (dev->lun << 8) + (dev->host->host_no << 16) +
-		    /* This has been added to support 
-		     * multichannel HBAs, it might cause 
-		     * problems with some software */ 
-		    (dev->channel << 24), 
+	put_user(dev->id 
+                 + (dev->lun << 8) 
+                 + (dev->channel << 16)
+                 + ((dev->host->hostt->low_ino & 0xff) << 24),
 		    (unsigned long *) arg);
 	return 0;
     case SCSI_IOCTL_TAGGED_ENABLE:
--- ./drivers/scsi/scsi_ioctl.h.~1~	Tue Aug  2 04:29:21 1994
+++ ./drivers/scsi/scsi_ioctl.h	Thu Aug  3 11:47:11 1995
@@ -1,7 +1,6 @@
 #ifndef _SCSI_IOCTL_H
 #define _SCSI_IOCTL_H 
 
-#define SCSI_IOCTL_PROBE_HOST 0
 #define SCSI_IOCTL_SEND_COMMAND 1
 #define SCSI_IOCTL_TEST_UNIT_READY 2
 #define SCSI_IOCTL_BENCHMARK_COMMAND 3
