Eric Youngdale (eric@aib.com)
Sun, 2 Jul 95 00:48 EDT

>I've noticed that this has crept into the kernel. I doesn't look like
>it's very functional, but /proc/scsi/scsi has write only permission. Is
>this going to be some type of mode page interface or something? Anyone know?

It is intended as an interface that allows the sysadmin to
fine tune various aspects of the scsi subsystem. The idea is that you simply
write text strings into /proc/scsi/scsi, which tells it what you want to
do. The advantage is that you do not need special programs/ioctls, etc
to perform these tasks, and simple "echo" commands from a shell script
can be used to perform these tasks.

The problem all along had been that the host adapters
themselves were never guaranteed to have any devices at all, so that
if you wanted to rescan a bus for a host adapter that only had a tape
drive that was not recognized at boot time, there would be no valid
device in /dev to which you could send commands to tell it what you
want. With /proc/scsi we now have the flexibility to do some of these
special tasks.

Ideas so far include:

1) Enable/Disable tagged queueing.
2) Enable/Disable synchronous transfers. People with NCR chipsets
may notice a rather dramatic performance increase with this enabled
and a fast disk, but not all devices are reliable with this
enabled, so it has been disabled by default.
3) Force a bus reset.
4) Rescan the bus for a new device that may now be online
(i.e. a tape drive that might have been offline at boot time,
or something that might have been hot-plugged onto the bus).
5) "Delete" a device that we might be powering down, or

I do not believe that any of these work yet - this is more or less a
work in progress. Credit for the /proc/scsi goes to Michael Neuffer.

Also in 1.3.5 are the patches to fully modularize the scsi
subsystem. There may be some minor kinks that need to be ironed out,
but the idea is that you should now be able to take a kernel with *no*
scsi support whatsoever, and start adding modules to get full scsi
capabilities. There is one module, scsi.o which contains the core of
the scsi support, and this one must be the first one loaded and the
last one unloaded. You can then load/unload (in more or less any
order) any of the low level drivers (provided that they have been
modularized), and any of the disk, tape, cdrom and generic drivers.
Usage counts are maintained, so you should not be able to unload
modules that correspond to devices in use.