NetBSD/sys/scsi
mycroft cc44b4600c There's no point in bothering to unlock what we didn't lock. 1994-11-23 07:54:15 +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 There's no point in bothering to unlock what we didn't lock. 1994-11-23 07:54:15 +00:00
ch.c Clean up open and close routines somewhat. 1994-11-21 11:28:47 +00:00
scsi_all.h New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:39:25 +00:00
scsi_base.c C botch repair from bostic 1994-11-22 00:05:36 +00:00
scsi_cd.h New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:39:25 +00:00
scsi_changer.h New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:39:25 +00:00
scsi_debug.h Replace dev_unit with device_softc in scsi_link. Change argument to foostart() 1994-11-21 10:39:09 +00:00
scsi_disk.h C botch repair from bostic 1994-11-22 00:05:36 +00:00
scsi_ioctl.c be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
scsi_tape.h New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:39:25 +00:00
scsiconf.c Oops; update scsibusmatch() arg list. 1994-11-03 22:09:00 +00:00
scsiconf.h Replace dev_unit with device_softc in scsi_link. Change argument to foostart() 1994-11-21 10:39:09 +00:00
sd.c There's no point in bothering to unlock what we didn't lock. 1994-11-23 07:54:15 +00:00
st.c Complete last change. 1994-11-22 00:14:24 +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 Clean up open and close routines somewhat. 1994-11-21 11:28:47 +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.