[comp.sys.nsc.32k] Structuring SCSI

news@daver.bungi.com (09/26/90)

I found the following technique very helpful in trying to structure
a SCSI device driver, so I thougth I would share it with the group.

The NCR 53C700 SCSI processor can be programmed in a language they
call "SCSI SCRIPS".  Since this language is quite device
independent but SCSI specific, it also makes nice way of expressing
a psuedo code outline for any SCSI device driver.  If this is of
interrest call NCR's Information Hot-Line 1-800-525-2252 and ask
for the NCR-53C700 Programmers Guide and NCR-53C700 Data Manual.
The Programmers Manual also includes well commented SCSI SCRIP code
for a sample initiator and target.

Before I tried this I was having great difficulty keeping straight
all the numerious states and error conditions.

By the way, the 53C700 is now available in a PGA package (previously
was 160-pin QFP only) .  Also NCR just announced a 53C710 which is
basicly a more general purpose 5C3700.  In case you didn't know,
a 53C7XX is a $50-60, 2-MIPS, RISC based SCSI I/O Processor on a chip.

Change of focus:

The following are some thoughts I put together to help me visualize
a comprehensize SCSI subsystem in relation to Minix.

Constructive ideas, thoughts, suggestions, either pro or con
are welcome.  All other comments should be directed to the
bit bucket.

Best regards,
johnc



SCSI Implementation Thoughts:
-----------------------------

(1)          SCSI Tasks (5)              Host Adaper Tasks
             ----------                 -----------------
                                          DP8490_task
FS   <-Msg-> disk_device (2)  <-Msg-><-+-> o Initiator_mode  <---+  } <= Intr
             tape_device               +-> o ReSelect_mode   <---+  }
             printer_device                o Target_mode (3) <---+  }
             processor_device (4)                                |
             WORM_device                  AIC6250_task           |
             CDROM_device     <-Msg-><-+-> o Initiator_mode  <-+ |  } <= Intr
             Other_device              +-> o ReSelect_mode   <-+ |  }
                                           o Target_mode (3) <-+ |  }
                                                               | |
Amoeba (3)         <-Msg->            <------------------------+-+

(1) Directory /dev determines mapping of device name to device major-minor
    and hence SCSI task process number, unit number (ie line).
 
(2) First task of SCSI group to run.  Initialization section contains
    code to establish overall configuration (ie. mapping of all major-minor
    device numbers to bus device scsi_id, lun).

(3) It appears that the host adapter target_mode must communicate with
    an Amoeba task only (and server process by implication), whereas the
    host adapter initiator_mode can communicate with either a SCSI task
    or an Amoeba task.  If the target_mode were employed with the FS an
    outstanding read would have to exist, blocking the FS to other
    processes.  Had not thought of it before, but Amoeba can
    provide a 'named' means of raw device access which bypasses the FS .!!??.

(4) Perhaps processor_device task is really Amoeba..??..

(5) SCSI-II device command descriptions.

    Device      SCSI Class                  X3T9.2 Section
    ---------   ----------------------      --------------
    Disk        Direct-Access                8
    Tape        Sequential-Access            9
    Printer     Printer                      10
    Processor   Processor                    11
    WORM        Write-Once Read-Multiple     12
    CDROM       Read-Only Direct-Access      13
    Other       unique, eg. IO bus board ?   --

-- 

mea@mea.utu.fi (Matti Aarnio) (09/26/90)

> I found the following technique very helpful in trying to structure
> a SCSI device driver, so I thougth I would share it with the group.
> 
> The NCR 53C700 SCSI processor can be programmed in a language they
> call "SCSI SCRIPS".  Since this language is quite device
> independent but SCSI specific, it also makes nice way of expressing
> a psuedo code outline for any SCSI device driver.  If this is of
> interrest call NCR's Information Hot-Line 1-800-525-2252 and ask
> for the NCR-53C700 Programmers Guide and NCR-53C700 Data Manual.
> The Programmers Manual also includes well commented SCSI SCRIP code
> for a sample initiator and target.

  That HOT-LINE is fine for USA, but how about us europeans ?
Could somebody pick up some european contacts ?  Especially if
there is one in Finland ?

  Alternatively, could somebody call them and ask them for
referred data to be sent here ?
(Disclosure of my address is used to arbiter that there is
 only one call.)

..
> Best regards,
> johnc

	/Matti Aarnio <mea@utu.fi>
	University of Turku, Computing Centre
	Turku, Finland

news@daver.bungi.com (09/26/90)

>   That HOT-LINE is fine for USA, but how about us europeans ?
> Could somebody pick up some european contacts ?  Especially if
> there is one in Finland ?


	NCR Microelectronics
	1635 Aeroplaza Drive
	Colorado Springs, Colorado  80916
	(303) 596-5612
	(800) 525-2252

	NCR Microelectronics		Best for literature requests.
	Inquiry Handling Dept.
	P.O. Box 57
	Dublin, Ohio  43017
	(800) 334-5454

	NCR GMBH
	Gustax-Heinemann-Ring 133
	199 Des Voeux
	8000 Muchen 83
	West Germany
	(49) 89 632 03

	ASIC/PACIFIC
	2501, Vicwood Plaza
	199 Des Voeux Road
	Central
	Hong Kong
	852-5-452-406

>   Alternatively, could somebody call them and ask them for
> referred data to be sent here ?
> (Disclosure of my address is used to arbiter that there is
>  only one call.)

Send me you _complete_ mailing address and I will call NCR and
request they send the literature to you.  Ditto for anyone else
on the pc532 mailing list.

johnc		tarpit!manatee!johnc