Kernel Functions for Drivers sata_hba_attach(9F) NAME sata_hba_attach - SATA Host Bus Adapter attach routine. SYNOPSIS #include int sata_hba_attach(dev_info_t *dev_info, sata_hba_tran_t *sata_tran, ddi_attach_cmd_t); INTERFACE LEVEL Consolidation Private PARAMETERS dev_info Pointer to a dev_info_t structure, referring to the HBA device instance. sata_hba_tran Pointer to sata_hba_tran structure cmd Attach type. Possible values are DDI_ATTACH and DDI_RESUME. DESCRIPTION DDI_ATTACH The sata_hba_attach function with cmd set to DDI_ATTACH is called by SATA HBA driver to attach the SATA HBA instance and register it with the SATA HBA framework. The SATA HBA has to be fully initialized and capable of communicating with attached devices and sending commands to these devices prior to calling sata_hba_attach(). SATA HBA framework will allocate system resources for this HBA instance and will perform generic initializations. During the initialization SATA HBA Framework will call a number of functions identified by sata_hba_tran function vector. It will probe each sata device port (including port multiplier's device ports) and it will attempt to retrieve attached device identify data. The device nodes (sd) and their properties, control nodes and attachment point nodes are created by this function. DDI_RESUME The sata_hba_attach() function may be called with cmd set to DDI_RESUME after sata_hba_detach(9E) has been successfully called with cmd set to DDI_SUSPEND. Restoring the HBA hardware state is the responsibility of the SATA HBA driver. SATA HBA framework will restore device settings that could be lost during power down and will resume serving new request directed to the attached HBA instance. RETURN VALUE Returns DDI_SUCCESS on success or DDI_FAILURE on failure. SEE ALSO sata_hba_detach(9F), sata_hba_init(9F), sata_hba_tran(9S)