LAST UPDATE: July 22nd, 1999 by Robin T. Miller

		LINUX SCSI Command Utility 'scu' Release Notes
		----------------------------------------------

	July 22nd, 1999
	---------------
     o	Fixed several commands related to CD-ROM audio and data
	testing.  Linux SCSI CD-ROM, named /dev/scdN, can only be
	openned read-only, which prevented certain 'scu' commands
	requiring write access from working.

     o	Fixed IOCTL encoding used for many CD-ROM commands.  Since
	Linux doesn't define IOC_VOID like Tru64 UNIX (and others).
	This IOCTL encoding is only used for Ultrix compatability
	commands, as all others have been rewritten to avoid this.


	July 15th, 1999
	---------------
     o	The program name 'lsd' has been renamed to 'scu' :-)

     o	Added support for 64-bit values.  This includes data limits,
        record limits, statistics, and SCSI commands which return
	64-bit values (e.g. log sense 64-bit counters, etc).  This
	support has also been tested on Windows/NT.

     o	Updated help file with Linux examples and Linux notes.

     o	An Alpha Linux 'scu' is available, but needs more testing.


	July 1st, 1999
	--------------
     o	Fixed problem with specifying a negative timeout value, which
	caused some tape commands to timeout unexpectedly.  These
	timeouts actually caused my adapter to reset the SCSI bus
	and reload scripts.

     o	Added functions to decode the driver and suggest status codes
	which are displayed (if non-zero) when debug is enabled.


	June 24th, 1999
	---------------
	I've completed adding support for SCSI generic (sg) V2.x features
which overcome a couple of previous restrictions:

     o	The sg V2.x features are automatically determined by obtaining
	the version number, which did not exist in the sg V1 release.

     o	When doing large transfers, 'scu' will automatically attempt to
	increase the reserved buffer size if the current size is too small.
	Note, large transfer sizes is only recommended on PCI SCSI adapters
	which support scatter gather.  Otherwise, the requested allocation
	for contiguous memory may fail.

	There are enough scatter gather maps to support 1MB transfers.
	This can be increased via an IOCTL, but I see no immediate need.

	Note:  sg v2.x now allocates one reserved buffer for each device,
	where sg v1 allocated a single buffer shared by all sg devices.

     o	sg v2.x now provides access to the SCSI status byte, which gets
	copied to the SCSI I/O CCB.  Higher 'scu' layers can now make use
	of this status for better error handling.

     o	'scu' now permits multiple processes to access the same sg device.
	The process ID is plugged into the packet ID field of I/O requests
	and this is used by the sg driver to coordinate per file descriptor
	requests.  If desired, a new command line option '-e' was added to
	force exclusive access, which is the default for the V1 sg driver.

     o	The sense data restriction still exists in this release, since this
	requires changes to the SCSI mid-layer drivers.  I'm told this fix
	is targeted for the 2.3 kernel base.

     o	'scu' now attempts scanning devices sg[a-z] rather than sg[a-h]
	when initializing its' internal Equipment Device Table (EDT).
	Also, 'scu' does NOT request the devices' Inquiry information
	until you "switch device" or "sbtl" to that sg device.  This
	avoids unnecessary Inquiry commands, undesirable when testing
	a single device with scripts.

     o	The sg v2.x module is in a modules subdirectory, along wigh a
	HowTo file describing how to install it.  The sg v2.x module was
	compiled for kernel 2.2.10, but I've tested it successfully on
	RedHat's latest release V6.0 with 2.2.5-15 kernel.

     o	I do not have an Alpha executable yet.  RedHat V6.0 for Alpha
	should be arriving any time now, so I should have this available
	in a couple weeks.

     o	Details of the enhanced SCSI generic driver can be found @ URL:

			http://www.torque.net/sg/


	Installation:
	-------------
	Short but sweet (for now)...

     o	Unpack kit via: # gzip -dc intel-scu.tar.gz | tar xvf -

	The resulting files are placed in a directory named scu.d/

     o	Place 'scu' and 'scu.hlp' files in directory /sbin, or
	simply run with them in the scu.d directory.

     o	Ensure the 'sg' module is loaded: "# modprobe sg"

	This loads the standard SCSI generic driver for your system.
	I've included the sg v2.x module in a modules/ directory of my
	kit, if you'd like to use this enhanced driver.

	UPDATE:  The sg v2.x module has been removed (for now), since
	I've determined that when this module is loaded, sense data
	seems to be shifted by 4 bytes.  This does not occur with a
	2.2.10 kernel, only when module/kernel versions do not match!

     o	That's it, you are ready to start using 'scu'.  Use "scu help"
	to obtain startup instructions and help on various commands.
	There's also an LINUX-Examples.log for referenece.


	Restrictions:
	-------------
     o	The generic interface only allows for returning 16 sense bytes.
	This is problematic for certain commands which require more
	sense data, like "format opt immed" which needs the format
	progress indication bytes.  [ Note: To be fixed in 2.3 release. ]

     o	The V1 generic API uses a single large buffer for requests
	greater than 4KB.  By default, it is set to 32KB, but the SCSI
	CDB and sizeof(struct sg_header) must be subtracted, so the
	actual max size is (32KB - 36 - sizeof(CDB)).

	This buffer can safely be increased to (131072 - 512), which is
	(128KB - 512) = 130560 bytes.  [ Note: sg V2 fixes this. ]

     o	Currently, there are no IOCTL's to permit SCSI bus re-scanning,
	or SCSI device/bus resets.  Perhaps in a future release.

     o	The V1 SCSI generic driver does not coordinate I/O requests from
	multiple processes directed to the same device.  To avoid hangs,
	and unpredicable results, an exclusive open is done on the sg
	device so no one else can hose us.

     o	'scu' does NOT have access to Compaq Array Controller devices,
	since this driver does not use the standard SCSI sub-system.
	These are the devices which reside under the /dev/ida directory
	when using SMART2 backplane array controllers.

     o	'scu' only allows for specifying a bus, target, and lun for a
	device nexus.  Therefore, you may have problems with adapters
	with a channel other than zero.  Luckily, my dual-channel NCR
	adapter shows up as separate SCSI buses, so hopefully others
	will too.  [ I'll update this EDT logic only as necessary. ]

     o	The Linux disk driver does _not_ automatically spin up disks,
	like the Tru64 UNIX CAM disk driver does.  Therefore, if you
	have scripts which assume this behaviour, then add a "start"
	command to ensure the disk is ready.


	Known Problems:
	---------------
    o	Do not attempt a "format opt immed" command.  Since Linux is
	only passing back 16 bytes of request sense data, 'scu' cannot
	access the format progress bytes (bytes 17 and 18 of sense data).
	The result of this is, 'scu' will constantly show "0% complete",
	and you'll have to abort the Format wait via Ctrl/C or whatever
	your interrupt key is.  The Format will eventually complete.

	The latest 'scu' kit can be located in wasted:~rmiller/linux/
or from my web home page @ URL:

		http://www.zk3.dec.com/~rmiller/linux.html

Cheers,
Robin
