[2176] in linux-scsi channel archive
Re: More than one SCSI controler & SCSI_IOCTL_GET_IDLUN
daemon@ATHENA.MIT.EDU (Joerg Schilling)
Fri Jul 18 07:08:51 1997
Date: Fri, 18 Jul 1997 12:58:54 +0200
From: schilling@fokus.gmd.de (Joerg Schilling)
To: eric@andante.jic.com, tn@bv.rz.fh-muenchen.de
Cc: linux-scsi@vger.rutgers.edu, schilling@fokus.gmd.de
Here is the version of the patch, I will include in the cdrecord-1.5a5
release. I modified the Bus # to be an integer and the directory to
be 'linux' to allow most users to patch their kernels.
I have currently no Linux with SCSI at all and would be happy to
get test results from people who have more SCSI busses.
I put the new cdrecord alpha out this moment. It os located on:
ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha
Joerg
http://www.fokus.gmd.de/usr/schilling ftp://ftp.fokus.gmd.de/pub/unix
------------------%Snip-----------%Snap---------------------------
--- 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(long));
+ 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;