Writing Device Drivers

SCSI Interface

SCSA is the Solaris 9 DDI/DKI programming interface for the transmission of SCSI commands from a target driver to a host adapter driver. By conforming to the SCSA, the target driver can pass any combination of SCSI commands and sequences to a target device without knowledge of the hardware implementation of the host adapter. SCSA conceptually separates the building of a SCSI command (by the target driver) from the transporting of the command to and data to and from the SCSI bus (by the HBA driver) for the appropriate target device. SCSA manages the connections between the target and HBA drivers through an HBA transport layer, as shown in the following figure.

Figure 15–1 SCSA Interface

Diagram shows the host bus adapter transport layer between a target driver and SCSI devices.

The HBA transport layer is a software and hardware layer responsible for transporting a SCSI command to a SCSI target device. The HBA driver provides resource allocation, DMA management, and transport services in response to requests made by SCSI target drivers through SCSA. The host adapter driver also manages the host adapter hardware and the SCSI protocols necessary to perform the commands. When a command has been completed, the HBA driver calls the target driver's SCSI pkt command completion routine.

Figure 15–2 illustrates this flow, with emphasis placed on the transfer of information from target drivers to SCSA to HBA drivers. The following figure also shows typical transport entry points and function calls.

Figure 15–2 Transport Layer Flow

Diagram shows how commands flow through the HBA transport layer.