SCSI HBA drivers have configuration requirements similar to those for standard device drivers. See Chapter 2, Hardware Overview, for more information.
Before an HBA driver can be used, it must first be properly installed on the system. The add_drv(1M) utility must be used to correctly install the HBA driver.
For example, to install the isp sample driver, first copy the driver to the /kernel/drv directory:
$ su Password: # cp isp /kernel/drv # cp isp.conf /kernel/drv
Next, run add_drv(1M) to install the driver. For SCSI HBA drivers, specify class as scsi to permit SCSI target drivers to use the HBA driver to communicate with a target device.
# add_drv -m" * 0666 root root" -i'"pci1077,1020"' -c scsi isp
Once the HBA driver is installed, a reconfiguration boot is necessary in order to create and attach driver instances for target devices attached on the SCSI bus controlled by the HBA device.
See "Installing and Removing Drivers" for more information on driver installation.
When using the cmdk sample driver to write an HBA driver for an x86 platform, one or more of these properties (as appropriate to the HBA driver and hardware) may need to be defined in the driver.conf(4) file.
These property definitions should appear only in an HBA driver's driver.conf(4) file. The HBA driver itself should not inspect or attempt to interpret these properties in any way. These properties are advisory only and serve as an adjunct to the cmdk driver. They should not be relied upon in any way. The property definitions may or may not be used in future releases.
The disk property may be used to define the type of disk supported by cmdk. For a SCSI HBA, the only possible value for the disk property is:
disk="scdk" - Disk type is a SCSI disk.
The queue property defines how the disk driver sorts the queue of incoming requests during strategy(9E). There are two possible values:
queue="qsort" - One-way elevator queueing model, provided by disksort(9F).
queue="qfifo" - FIFO (first in, first out) queuing model
The flow_control property defines how commands are transported to the HBA driver. There are three possible values:
flow_control="dsngl" - Single command per HBA driver
flow_control="dmult" - Multiple commands per HBA driver--when the HBA queue is full, the driver returns TRAN_BUSY.
flow_control="duplx" - The HBA can support separate read and write queues, with multiple commands per queue. FIFO ordering is used for the write queue; the queueing model used for the read queue is described by the queue property. When an HBA queue is full, the driver returns TRAN_BUSY.
Here is an example of a driver.conf(4) file for use with an x86 HBA PCI device designed for use with the cmdk sample driver:
# # config file for ISP 1020 SCSI HBA driver # flow_control="dsngl" queue="qsort" disk="scdk" scsi-initiator-id=7;