NetBSD/sys/scsi
mycroft 1d568eab9a Revamp the locking mechanism slightly. 1995-03-29 23:04:39 +00:00
..
README This file is *way* out of date. Remove some of the old comments. 1994-11-22 01:14:37 +00:00
cd.c Revamp the locking mechanism slightly. 1995-03-29 23:04:39 +00:00
ch.c Remove unused macros. 1995-01-16 21:31:34 +00:00
scsi_all.h Numerous changes. Many bugs fixed, better autoconfig, a few new features. 1994-12-28 19:42:47 +00:00
scsi_base.c Update copyrights. 1995-01-26 12:05:49 +00:00
scsi_cd.h Numerous changes. Many bugs fixed, better autoconfig, a few new features. 1994-12-28 19:42:47 +00:00
scsi_changer.h Numerous changes. Many bugs fixed, better autoconfig, a few new features. 1994-12-28 19:42:47 +00:00
scsi_debug.h Numerous changes. Many bugs fixed, better autoconfig, a few new features. 1994-12-28 19:42:47 +00:00
scsi_disk.h Numerous changes. Many bugs fixed, better autoconfig, a few new features. 1994-12-28 19:42:47 +00:00
scsi_ioctl.c Fix invocation of scsi_scsi_cmd(), per John Kohl. 1995-01-30 15:54:42 +00:00
scsi_message.h Numerous changes. Many bugs fixed, better autoconfig, a few new features. 1994-12-28 19:42:47 +00:00
scsi_tape.h Numerous changes. Many bugs fixed, better autoconfig, a few new features. 1994-12-28 19:42:47 +00:00
scsiconf.c Be less picky about revision numbers for some broken devices. 1995-02-22 19:32:33 +00:00
scsiconf.h Update copyrights. 1995-01-26 12:05:49 +00:00
sd.c Revamp the locking mechanism slightly. 1995-03-29 23:04:39 +00:00
st.c Add a rogue entry for the ANRITSU DMT780. 1995-03-25 18:41:42 +00:00
su.c New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:39:25 +00:00
uk.c fix syntax error. Andreas Gustafsson <gson@clinet.fi> 1995-03-24 20:17:15 +00:00

README

/*	$NetBSD: README,v 1.5 1994/11/22 01:14:37 mycroft Exp $	*/

This release consists of the following files 

share/man/man4/scsi.4 <-useful general info
share/man/man4/uk.4
share/man/man4/su.4
share/man/man4/ch.4
share/man/man4/cd.4
share/man/man4/sd.4
share/man/man4/st.4 <--READ THIS IF YOU USE TAPES!
sbin/scsi/procargs.c
sbin/scsi/scsi.c
sbin/scsi/scsi.1
sbin/scsi/Makefile
sbin/st/Makefile
sbin/st/st.1
sbin/st/st.c

notice sys/scsi/sg.c and sys/sys/sgio.h have been removed


----------------------------------------------------------------
This scsi system is designed to allow the re-use of top end drivers
such as disk and tape drivers, with different scsi adapters.

As of writing this document, There are top end drivers working for:
----------------------------------------------------------------
generic scsi disk
generic scsi tape
cd-rom  (plays music under the xcplayer (?) program)
AEG Character recognition devices *
Calera Character recognition devices *
Generic scsi-II scanners *
Exabyte tape changer device.
GENERIC SCSI DEVICES (user generated scsi commands) 
----------------------------------------------------------------


There are also working bottom end drivers for:
----------------------------------------------------------------
adaptec 1542 (and 1742 in 1542 mode)
bustec 742a (apparently works for VESA version (445S?))(and 747?)
adaptec 174x  (note NOT 27xx)
Ultrastore 14f (works for 34f (VESA version))				
Ultrastore 24f RSN (Beta version included here)
----------------------------------------------------------------


################## Using the scsi system ##################
------------minor numbers---------------
This scsi system does not allocate minor numbers to devices depending
on their SCSI IDs is any way. A devices minor number is dependant
on the order in which it was found.
e.g. the first tape found will become st0 (minor number 0)
	the second found will become st1 (minor number 16)
	the third will become st2 (minor 32) 
	etc.

These devices could be on the same scsi bus or different scsi busses.
That would not change their minor numbers.

THE EXCEPTION  TO THIS IS IN THE GENERIC SCSI DRIVER. in which case
the following mapping applies:

BB TTT LLL  B= scsi bus number, T = target number, L = LUN.

It is possible to run two different TYPES of scsi adapters at the 
same time and have st0 on one and st1 on another. (for example)

There is a scheme supported in which scsi devices can be 'wired in' even
if they are not present or powered on at probe time. (see scsiconf.c)
In addition, the scsi(1) command allows the operator ask for a
reprobe at any time.  Newly found devices will be configured in. Any
device that does not map to a known device type is attached to the
'unknown' (uk) driver.


--------------making devices------------
see st(1) and st(4) for info on tape devices.

--------------file layout-------------------
scsi_all.h  		general commands for all devices --- CHAPTER 7
scsi-disk.h  		commands relevant to disk        --- CHAPTER 8
scsi-tape.h  		commands for scsi tapes          --- CHAPTER 9
scsi-cd.h    		commands for cd-roms (and audio) --- CHAPTER 13
scsi-changer.h    	commands medium changer devices  --- CHAPTER 16

---------ioctl definitions-------------
User accessable structures (e.g. ioctl definitions) have been
placed in sys/cdio, sys/sgio and sys/chio (based after sys/mtio for
the ioctls for mag tapes (including st).
General scsi ioctls are found in sys/scsiio.h.

-----------cd-rom-----------------
At this time it is possible audio play is broken on cdroms and I will
be unable to fix it until I get one to test.
***IMPORTANT***
Cdrom audio is only suported at all for cdroms that use SCSI2 audio
definitions.

-------------media changer---------------
Once again courtesy of grefen@convex.com (in germany)
I have not tested this but he assures me it's ready for testing.
If anyone has an exabyte tape changer or similar, 
contact the author for information regarding the control interface
and program.

WARNING: This has not been tested for a LONG TIME!

------Mon Oct 11 22:20:25 WST 1993------
A new structure has been introduced..
Called scsi_link, one of these exists for every bus/target/lun
that has a driver attached to it.
It has links to the adapter and to the driver, as well as status
information of global interest. (e.g. if the device is in use).
The use of this new structure has allowed the compaction of a
lot of duplicated code into a single copy (now in scsi_base.c)
and makes more simple the USER level scsi implimentation.