Writing Device Drivers

Installing the Driver

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
 	# 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.