[2158] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: More than one SCSI controler & SCSI_IOCTL_GET_IDLUN

daemon@ATHENA.MIT.EDU (Eric Youngdale)
Sun Jul 13 22:37:36 1997

Date: 	Sun, 13 Jul 1997 22:41:45 -0400 (EDT)
From: Eric Youngdale <eric@andante.jic.com>
To: Joerg Schilling <schilling@fokus.gmd.de>
cc: linux-scsi@vger.rutgers.edu, tn@bv.rz.fh-muenchen.de
In-Reply-To: <199707121448.QAA14376@sherwood.fokus.gmd.de>



On Sat, 12 Jul 1997, Joerg Schilling wrote:

> Hi,
> 
> I want to enhance cdrecord to be able to deal with more than 
> one SCSI controler.
> 
> For that reason I need to know the SCSI Bus #, the Target ID and the LUN
> of each device. For this reason I found only one ioctl(2):
> SCSI_IOCTL_GET_IDLUN. It gives TargetID & LUN but unfortunately
> there is no Bus #. 
> 
> Instead there is totally rubbish information low_ino & 0xff
> 
> I will for that reason give the advice for all cdrecord users
> to change /usr/src/linux/drivers/scsi/scsi_ioctl.c line 338
> 
> from:
> 
>                  + ((dev->host->hostt->proc_dir->low_ino & 0xff) << 24), 
> 
> to:
>                  + (dev->host->host_no << 24), 
> 
> 
> As the file scsi_ioctl.c seemes not to be maintained, I ask you 
> to modify this on the next Linux release too.

	Actually there is a reason why things are the way they are.
With the current code, this is the only way to determine exactly what
type of host a given device corresponds to.  The host_no is not a terribly
meaningful parameter and is mainly used for display purposes.  Returning
this to the user could be useful just for informational purposes, but at
the moment I don't see a reason why the host_no *must* be determined.

-Eric



home help back first fref pref prev next nref lref last post