|
scsi_hba_attach_setup() is the recommended interface over scsi_hba_attach().
For scsi_hba_attach_setup() and scsi_hba_attach():
scsi_hba_attach() registers the DMA limits hba_lim and the transport vectors hba_tran of each instance of the HBA device defined by dip. scsi_hba_attach_setup() registers the DMA attributes hba_dma_attr and the transport vectors hba_tran of each instance of the HBA device defined by dip. The HBA driver can pass different DMA limits or DMA attributes, and transport vectors for each instance of the device, as necessary, to support any constraints imposed by the HBA itself.
scsi_hba_attach() and scsi_hba_attach_setup() use the dev_bus_ops field in the dev_ops(9S) structure.
The HBA driver should initialize this field to NULL before calling scsi_hba_attach() or scsi_hba_attach_setup().
If SCSI_HBA_TRAN_CLONE is requested in hba_flags, the hba_tran structure will be cloned once for each target attached to the HBA. The cloning of the structure will occur before the tran_tgt_init(9E) entry point is called to initialize a target. At all subsequent HBA entry points, including tran_tgt_init(9E), the scsi_hba_tran_t structure passed as an argument or found in a scsi_address structure will be the 'cloned' scsi_hba_tran_t structure,
thus allowing the HBA to use the tran_tgt_private field in the scsi_hba_tran_t structure to point to per-target data. The HBA must take care to free only the same scsi_hba_tran_t structure it allocated when detaching; all 'cloned' scsi_hba_tran_t structures allocated by the system will be freed by the system.
scsi_hba_attach() and scsi_hba_attach_setup() attach a number of integer-valued properties to dip, unless properties of the same name are already attached to the node. An HBA driver should retrieve these
configuration parameters via ddi_prop_get_int(9F), and respect any settings for features provided the HBA.
-
scsi-options
- Optional SCSI configuration bits
-
SCSI_OPTIONS_DR
- If not set, the HBA should not grant Disconnect privileges to target devices.
-
SCSI_OPTIONS_LINK
- If not set, the HBA should not enable Linked Commands.
-
SCSI_OPTIONS_TAG
- If not set, the HBA should not operate in Command Tagged Queueing mode.
-
SCSI_OPTIONS_FAST
- If not set, the HBA should not operate the bus in FAST SCSImode.
-
SCSI_OPTIONS_FAST20
- If not set, the HBA should not operate the bus in FAST20 SCSI mode.
-
SCSI_OPTIONS_WIDE
- If not set, the HBA should not operate the bus in WIDE SCSI mode.
-
SCSI_OPTIONS_SYNC
- If not set, the HBA should not operate the bus in synchronous transfer mode.
-
scsi-reset-delay
-
SCSI bus or device reset recovery time, in milliseconds.
-
scsi-selection-timeout
- Default SCSI selection phase timeout value, in milliseconds. Please refer to individual HBA man pages for any HBA-specific information
For scsi_hba_detach():
scsi_hba_detach() removes the reference to the DMA limits or attributes structure and the transport vector for the given instance of an HBAdriver.
|