Re: Don't understand how devfsd and ide-scsi are working together
On Sun, 2003-04-13 at 03:31, Alan Chandler wrote:
> I have just upgraded to use devfsd and I seem to not have the scsi device
> created by ide-scsi until I do something completely strange. See below
>
> /proc/scsi/scsi lists the device as scsi device 1 thus
>
> kanger:/dev/scsi# more /proc/scsi/scsi
> Attached devices:
> Host: scsi0 Channel: 00 Id: 03 Lun: 00
> Vendor: TEAC Model: CD-R55S Rev: 1.0J
> Type: CD-ROM ANSI SCSI revision: 02
> Host: scsi1 Channel: 00 Id: 00 Lun: 00
> Vendor: PIONEER Model: DVD-ROM DVD-104 Rev: 2.02
> Type: CD-ROM ANSI SCSI revision: 02
> Host: scsi2 Channel: 00 Id: 00 Lun: 00
> Vendor: eUSB Model: SmartMedia Rev: 5.04
> Type: Direct-Access ANSI SCSI revision: 02
>
> But if I do an ls of the supposidly correct directory
>
> kanger:/# ls /dev/scsi/host1/bus0/target0/lun0/
> kanger:/# ls /dev/scsi/host1/bus0/target0/lun0/
>
> I get nothing (ie the directory is empty)
>
> As soon as I do the following (which theoretically has nothing to do with it)
>
> kanger:/# ls /dev/scsi/host1/bus0/target0/lun2/
> ls: /dev/scsi/host1/bus0/target0/lun2/: No such file or directory
>
> I can them immediately repeat the orginal
>
> kanger:/# ls /dev/scsi/host1/bus0/target0/lun0/
> cd
I assume that the above two lines are a single command?
> and now get the "cd" device listed.
>
> At the same time much of the rest of /dev comes to life /dev/cdroms appear for
> instance (where it wasn't before) and it has two cd's mentioned.
>
> Whats happening?
ide-scsi is just a emulation layer that presents the IDE bus as a SCSI
bus. To actually make use of SCSI devices on the IDE bus, you need to
load the appropriate module for the device type (in this case, sr_mod).
The /dev/scsi/.../lun*/ directories will be empty until you load those
modules.
However, because you specifically did a ls of /dev/scsi/.../cd, it
caused devfs to trigger a modprobe of sr_mod, and the device magically
appeared, along with the appropriate symlinks in /dev/cdroms.
You could have got the same behavior my manually modprobe'ing ide-scsi
and sr_mod.
--
Dave Carrigan
Seattle, WA, USA
dave@rudedog.org | http://www.rudedog.org/ | ICQ:161669680
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL
Reply to: