/*
 * Copyright (c) 1996,1997, by Sun Microsystems, Inc.
 * All Rights Reserved
 */

	ident	"@(#)README 1.11	97/09/09 SMI"

DRIVER NAME:
	sst - Simple SCSI Target driver

ARCHITECTURES:
	SPARC and x86

DESCRIPTION OF DRIVER:
	This driver is intended as an example of programming a SCSA
	target driver for Solaris 2.X; it is not intended for any
	particular device.

	This driver has been modified to be 64-bit ready.  In
	particular it provides an example of how an LP64 driver
	can manage an ioctl from an ILP32 application.  Refer to
        SunOS 5.6 Writing Device Drivers, Appendix F for more
	information.

	Source Files
	-------------

	sst.c		driver source
	sst_def.h	driver definitions
	sst.conf	driver configuration file
	sstest.c	driver test program

NOTE:
	Areas where you may need to change this code or add your own to
	deal with your specific devices are marked "Note".
	Other warnings are marked "WARNING".

DISCLAIMER:
        This driver provides an example of programming using the SCSA 
	DDI/DDK interfaces for Solaris target drivers; it is not intended 
	for any particular device, although it has been tested on disk 
	and tape drives.  It is meant to be a skeleton that can be 
	used as a basis for a real-world driver.  

SYSTEM REQUIREMENTS:
	The driver requires a SCSI target device to operate.

COMPILING/LOADING:
	To compile and link the driver:

	use the Makefile provided in the driver subdirectory (sst); the
	executable files will be built in an architecture-specific
	subdirectory depending on the architecture of the build machine
	(i.e., sst/sparc)

	to compile and link without using the Makefile:

	% cc -D_KERNEL -c sst.c
	% ld -r sst.o -o sst

	To install:

	1. Copy the module (sparc/sst) and config file (sst.conf)
	   into /usr/kernel/drv

	2. (optional) Add an entry to /etc/devlink.tab, of the form:

		type=sample_driver;name=sst;minor=character        rsst\A1

	   This will cause devlinks(1M) to create link(s) to /devices with
	   names of the form "/dev/rsstX" where X is the SCSI target number
	   (the target number is "5" in the sst.conf file included in the
	   DDK; you can change it to refer to an appropriate target number
	   for the target device on your system).

	3. Run add_drv(1M).

		# add_drv sst

	To compile the test program:

	run "make sstest" in the sst directory; the executable file will be 
	built in an architecture-specific subdirectory depending on the 
	architecture of the build machine (sst/sparc or sst/i386)

	The test program takes as arguments the full path to the device
	file (e.g., /dev/sst0 or /devices/mc/mcis@3540,0/sst@3,0:character)
	and a command (see the sstest program's usage message for available
	commands)

	Setting kernel variables:
	    Variables can be explicitly set from the /etc/system file, by
	    adding an entry of the form

		"set sst:<variable name>=<value>"

	    The /etc/system file is read only once at boot time, if you change
	    it you must reboot for the change to take effect.

	    Alternatively, you can use adb to set variables and debug as
	    follows:

		# adb -kw /dev/ksyms /dev/mem

	    Or, if you booted under kadb, you can set the a variable from the
	    kadb prompt. For example, the following command will set the
	    variable sst_debug to the value 3 (maximum debugging messages):

		kadb[0]: sst_debug:W 3
	   
REFERENCES:
	
        SunOS 5.6 Writing Device Drivers
