[6073] in linux-scsi channel archive
Re: SCSI generic interface addition
daemon@ATHENA.MIT.EDU (Bernard Hatt)
Thu Mar 11 19:46:58 1999
Date: Thu, 11 Mar 1999 22:58:00 +0000
From: Bernard Hatt <bmh@arkady.demon.co.uk>
To: Eric Youngdale <eric@andante.jic.com>
Cc: Douglas Gilbert <dgilbert@interlog.com>,
linux-scsi@vger.rutgers.edu
Eric Youngdale wrote:
> > > Having looked at the problem, I have hacked drivers/scsi/sg.c to
> > > create directories under /proc/sg which contains symbolic links
> > > named by the SCSI address or device name to the matching /dev/sg?
> > > device file.
>
> I haven't actually looked at what you did, so forgive me if you
> have addressed this. What happens if you have more than one SCSI bus,
> and each bus has a device number 0?
I did deal with this case, as I have two SCSI controllers, one on the
motherboard (53C875) which has the devices where bandwith is important
(the disk with Linux on it and the CD writer) and a cheap(ish) PCI card
(53C815) on which I can experiment with odds and ends, the problem is
that Linux detects the PCI card first. (And worse still I have a CD-ROM
attached to the onboard IDE interface, and the ARCBIOS counts this as
scsi(0)!,
the PCI card as scsi(1) and the onboard SCSI last as scsi(2) ).
My two generated directories contain:
bmh@nevermind]$ ls -l /proc/sg/type
lr-xr-xr-x 1 root root 0 Mar 11 21:29
ARCHIVE_VIPER_150_21247 -> /dev/sgb
lr-xr-xr-x 1 root root 0 Mar 11 21:29 IBM_DCAS-34330 ->
/dev/sgc
lr-xr-xr-x 1 root root 0 Mar 11 21:29 PHILIPS_CDD2600 ->
/dev/sgd
lr-xr-xr-x 1 root root 0 Mar 11 21:29 UMAX_Astra_1220S ->
/dev/sga
[bmh@nevermind]$ ls -l /proc/sg/addr
lr-xr-xr-x 1 root root 0 Mar 11 21:29 scsi0_id2 -> /dev/sga
lr-xr-xr-x 1 root root 0 Mar 11 21:29 scsi0_id5 -> /dev/sgb
lr-xr-xr-x 1 root root 0 Mar 11 21:29 scsi1_id1 -> /dev/sgc
lr-xr-xr-x 1 root root 0 Mar 11 21:29 scsi1_id6 -> /dev/sgd
On Wed, 10 Mar 1999, Douglas Gilbert wrote:
> Well there is this really persistent guy from down under called
> Richard Gooch (rgooch@atnf.csiro.au) who has been pushing the
> idea of a pseudo-file system for devices called devfs. The web page
> is: http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html
> One day Linus is going to relent and put it in cause he has
> been thinking about it for a loooong time.
I did think about generating the actual device files under /proc, but
putting
in symlinks seemed easier. The devfs idea sound good to me, I'll have a
go
at putting it on my machine at the weekend.
I had considered having a shell script which parsed /proc/scsi/scsi at
boot time and generated links in /dev, but I wasn't certain that the
/dev/sg?
devices would always be in the same order.
It looks like devfs may be a better solution, but at least I now know
a bit more about kernel programming :-)
Bernard
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu