Re: SCSI module loses count of buses in 2.0.33?

Bryn Paul Arnold Jones (bpaj@gytha.demon.co.uk)
Sun, 28 Dec 1997 14:44:05 +0000 (GMT)


-----BEGIN PGP SIGNED MESSAGE-----

On Sat, 27 Dec 1997, Stephen Harris wrote:

> This isn't a killer, more a cosmetic problem, but it might have long term
> problems.
>
> Setup: 2.0.33 with SCSI compiled as a module. Internal 2Gb disk, external
> Yamaha CDR100 writer. AHA2940 card. kerneld. RedHat 4.0 system otherwise.
>
> Under normal circumstances, the CDR is turned off, so at boot time, so scsi0
> is detected with sda quite happily and the partition mounted. Occaisionally
> I turn on the external box, so
> umount /partition
> rmmod sd_mod
> rmmod aic7xxx
> mount /partition
>

You don't have to do it like that, there is a file under /proc/scsi that
you can identify a device to, and have it found. Ok, after reading the
source, I found the right thing:). From line ~2300 of drivers/scsi/scsi.c
(grep is your friend;), one of the many things you can echo into
/proc/scsi/scsi is this:

/*
* Usage: echo "scsi add-single-device 0 1 2 3" >/proc/scsi/scsi
* with "0 1 2 3" replaced by your "Host Channel Id Lun".
* Consider this feature BETA.
* CAUTION: This is not for hotplugging your peripherals. As
* SCSI was not designed for this you could damage your
* hardware !
* However perhaps it is legal to switch on an
* already connected device. It is perhaps not
* guaranteed this device doesn't corrupt an ongoing data transfer.
*/

I suppose you could umount the disk first to make sure the bus is quiet :)

[snip snip]

Bryn
- --
PGP Pub key http://www.gytha.demon.co.uk/pubkey.asc ID: 1024/30AF2D69
On-line, adj.: FP: FC 4E 41 9E 64 C3 AB 28 A3 5A 57 F8 CC D9 A7 B8
The idea that a human being should always be accessible to a computer.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: Probably (spelt 'Proberbly') requires PGP version 2.6 or later ;)

iQCVAwUBNKZluesaGi8wry1pAQH4QAQAhf6v7vgTbYL26eym6OrjQA/a6hNWAEki
/a0bbe3isR7jHFyEvwCMismPqrYBzc5q2xTYFOeYdD1OgFZeD/ZdNCKPzTzE4ymB
FhRtJ+VEldUqzLUnFqTJtJiB2rGurplmBkt88YAlKzJ30FdfX887k9cvszYBF7/R
217lU6vi2CE=
=TPoi
-----END PGP SIGNATURE-----