--- linux/include/scsi/scsi.h.orig	Wed Jul 16 18:46:52 1997
+++ linux/include/scsi/scsi.h	Wed Jul 16 18:50:50 1997
@@ -180,6 +180,8 @@
 /* Used to obtain the host number of a device. */
 #define SCSI_IOCTL_PROBE_HOST 0x5385
 
+/* Used to get the bus number for a device */
+#define SCSI_IOCTL_GET_BUS_NUMBER 0x5386
 
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.

--- linux/drivers/scsi/scsi_ioctl.c.orig	Wed Jul 16 18:33:46 1997
+++ linux/drivers/scsi/scsi_ioctl.c	Wed Jul 16 18:46:11 1997
@@ -343,6 +343,11 @@
 		    (unsigned long *) arg);
         put_user( dev->host->unique_id, (unsigned long *) arg+1);
 	return 0;
+    case SCSI_IOCTL_GET_BUS_NUMBER:
+        result = verify_area(VERIFY_WRITE, (void *) arg, sizeof(int));
+        if (result) return result;
+        put_user( dev->host->host_no, (int *) arg);
+	return 0;
     case SCSI_IOCTL_TAGGED_ENABLE:
 	if(!suser())  return -EACCES;
 	if(!dev->tagged_supported) return -EINVAL;