|
|
A SCSI periheral driver communicates with the SCSI host adapter server instead of directly with the hardware. The SCSI peripheral driver contains entry-point routines to pass user-level requests to open and close the device or to read or write data. The SCSI peripheral driver populates a request structure with this information, then passes that information to the SCSI host adapter driver. The host adapter driver handles the direct communication with the hardware.
Communication on the SCSI bus is only allowed between two devices at a time: the initiator (defined to be the SCSI host adapter) and the target (defined to be the embedded controller on the SCSI peripheral device).
The following diagram illustrates the SCSI interface:
SCSI interface
Up to seven SCSI-1 or fifteen SCSI-2 embedded SCSI controllers can be on a bus. Each controller can address up to eight physical devices, for a possible total of up to 120 devices. Multiple devices contending for the bus are handled by an arbitration process in which the priority is assigned based on the device's SCSI ID.
Each SCSI host adapter and peripheral driver has a unique major device number. SCSI host adapters and SCSI peripheral drivers are installed into the link kit the same as other drivers. In addition, the peripheral device driver information is put into the mscsi(F) file. When a new kernel is built, the build software uses the mscsi information about SCSI peripheral devices and the information in the sdevice(F) file about SCSI host adapter devices to create configuration tables for each. This is discussed further in ``SCSI configuration tables''.