Driver Entry Points sata_tran_start(9E) NAME sata_tran_start - transport and start execution of SATA command SYNOPSIS #include int sata_tran_start(dev_info_t *dev_info, sata_pkt_t *sata_packet); INTERFACE LEVEL Consolidation Private PARAMETERS dev_info Pointer to a dev_info_t structure, referring to the HBA device instance. sata_packet Pointer to sata_pkt structure identifying the target port. DESCRIPTION sata_tran_start() function is called by the SATA HBA framework to transport to the attached SATA device and to start execution of a single SATA command specified by the sata_packet. The operation specified in sata_packet may be started immediately or may be queued by the SATA HBA driver for later execution. Once the operation is completed, SATA HBA driver should fill status fields of the sata packet and should invoke a completion callback routine specified in the sata packet. Port state should be always returned in the sata_device structure specified in the sata_pkt. SATA HBA Framework passes in sata_pkt the the time allocated for the operation. SATA HBA driver shall use this time to timeout SATA operations. The operation mode flags specified in the sata packet is used by SATA HBA framework to request specific mode of execution, eg. polling instead of interrupt, synchronous instead of asynchronous, etc. If a synchronous mode of operation is specified, sata_tran_start() function shall not return until the packet execution is completed (no callback). The pkt completion_reason has to be updated before the sata_tran_start() function returns, regardless if the function was executed asynchronously (callback function invoked) or asynchronously (function did not return until packet operation was completed). If the packet was not accepted by the SATA HBA driver, the pkt completion_reason has to reflect the same reason as the return value of the sata_tran_start() and the callback function should not be invoked. RETURN VALUE sata_tran_start must return: SATA_TRAN_ACCEPTED packet accepted for execution SATA_TRAN_QUEUE_FULL packet not accepted, queue full SATA_TRAN_PORT_ERROR packet not accepted, SATA port error SATA_TRAN_CMD_UNSUPPORTED packet not accepted, SATA cmd not supported SATA_TRAN_BUSY packet not accepted, unspecified busy condition SEE ALSO sata_hba_tran(9S), sata_hba_init(9F), sata_hba_fini(9F), sata_hba_attach(9F), sata_hba_detach(9F), sata_hba_event_notify(9F), sata_tran_probe_port(9F), sata_tran_abort(9F), sata_tran_reset_dport(9f), sata_tran_self_test(9F), sata_tran_hotplug_ops(9S), sata_tran_pwrmgt_ops(9S), sata_tran_ioctl(9F), sata_address(9S), sata_device(9S), sata_pkt(9S)