Writing Device Drivers

HBA Configuration Properties

When attaching an instance of an HBA device, scsi_hba_attach_setup(9F) creates a number of SCSI configuration properties for that HBA instance. A particular property is created only if no existing property of the same name is already attached to the HBA instance. This restriction avoids overriding any default property values in an HBA configuration file.

An HBA driver must use ddi_prop_get_int(9F) to retrieve each property. The HBA driver then modifies or accepts the default value of the properties to configure its specific operation.

scsi-reset-delay Property

The scsi-reset-delay property is an integer specifying the recovery time in milliseconds for a reset delay by either a SCSI bus or SCSI device.

scsi-options Property

The scsi-options property is an integer specifying a number of options through individually defined bits:

Per-Target scsi-options

An HBA driver might support a per-target scsi-options feature in the following format:

target<n>-scsi-options=<hex value>

In this example, < n> is the target ID. If the per-target scsi-options property is defined, the HBA driver uses that value rather than the per-HBA driver instance scsi-options property. This approach can provide more precise control if, for example, synchronous data transfer needs to be disabled for just one particular target device. The per-target scsi-options property can be defined in the driver.conf(4) file.

The following example shows a per-target scsi-options property definition to disable synchronous data transfer for target device 3:

target3-scsi-options=0x2d8