66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * CDDL HEADER START
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * The contents of this file are subject to the terms of the
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Common Development and Distribution License (the "License").
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * You may not use this file except in compliance with the License.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * See the License for the specific language governing permissions
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * and limitations under the License.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * When distributing Covered Code, include this CDDL HEADER in each
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * If applicable, add the following below this CDDL HEADER, with the
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * fields enclosed by brackets "[]" replaced with your own identifying
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * information: Portions Copyright [yyyy] [name of copyright owner]
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * CDDL HEADER END
f5f2d263454d943a366844932bdb677530ba733bFred Herard * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Use is subject to license terms.
0c6eaab480b44a0c790ad94e7cb6084792411de9Hans Rosenfeld * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlfextern "C" {
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA Host Bus Adapter (HBA) driver transport definitions
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf/* SATA Framework definitions */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_MAX_CPORTS 32 /* Max number of controller ports */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf /* Multiplier (PMult) */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_MAX_PMPORTS 16 /* Maximum number of ports on PMult */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_PMULT_HOSTPORT 0xf /* Port Multiplier host port number */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA device address
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Address qualifier flags are used to specify what is addressed (device
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * or port) and where (controller or port multiplier data port).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA address Qualifier flags (in qual field of sata_address struct).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * They are mutually exclusive.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_ADDR_DCPORT 0x01 /* Device attched to controller port */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_ADDR_DPMPORT 0x02 /* Device attched to PM device port */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_ADDR_CPORT 0x04 /* Controller's device port */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_ADDR_PMPORT 0x08 /* Port Multiplier's device port */
918304a3bd962ac065ad520336a044d94b40ad16Xiao-Yu Zhang#define SATA_ADDR_PMULT_SPEC 0x40 /* Port Multiplier Specific */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA port status and control register block.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * The sstatus, serror, scontrol, sactive and snotific
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * are the copies of the SATA port status and control registers.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * (Port SStatus, SError, SControl, SActive and SNotification are
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * defined by Serial ATA r1.0a sepc and Serial ATA II spec.
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhang * SATA Port Multiplier general status and control register block.
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhang * The gscr0, gscr1, gscr2 are the copyies of the register on port multiplier.
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhang * GSCR[0], GSCR[1], GSCR[2] are defined in SATA defined by Port Multiplier
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhang * 1.0/1.1/1.2 spec.
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhang uint32_t gscr0; /* Product Identifier register */
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhang uint32_t gscr1; /* Resrved Information register */
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhang uint32_t gscr2; /* Port Information register */
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhangtypedef struct sata_pmult_gscr sata_pmult_gscr_t;
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA Device Structure (rev 1)
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Used to request/return state of the controller, port, port multiplier
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * or an attached drive:
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * The satadev_addr.cport, satadev_addr.pmport and satadev_addr.qual
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * fields are used to specify SATA address (see sata_address structure
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * description).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * The satadev_scr structure is used to pass the content of a port
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * status and control registers.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * The satadev_add_info field is used by SATA HBA driver to return an
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * additional information, which type depends on the function using
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * sata_device as argument. For example:
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * - in case of sata_tran_probe_port() this field should contain
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * a number of available Port Multiplier device ports;
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * - in case of sata_hba_event_notify() this field may contain
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * a value specific for a reported event.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf struct sata_address satadev_addr; /* sata port/device address */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf struct sata_port_scr satadev_scr; /* Port status and ctrl regs */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf uint32_t satadev_add_info; /* additional information, */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf /* function specific */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf_NOTE(SCHEME_PROTECTS_DATA("unshared data", sata_device))
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satadev_state field of sata_device structure.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Common flags specifying current state of a port or an attached drive.
4372d277de71fc7c19cb9f41df9b8757b34e2cc5pawelw * These states are mutually exclusive, obviously
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Attached drive specific states (satadev_state field of the sata_device
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * structure).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_DSTATE_PWR_ACTIVE, SATA_DSTATE_PWR_IDLE and SATA_DSTATE_PWR_STANDBY
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * are mutually exclusive. All other states may be combined with each other
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * and with one of the power states.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * These flags may be used only if the address qualifier (satadev_addr.qual) is
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * set to SATA_ADDR_DCPORT or SATA_ADDR_DPMPORT value.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf/* Mask for drive power states */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA Port specific states (satadev_state field of sata_device structure).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_PSTATE_PWRON and SATA_PSTATE_PWROFF are mutually exclusive.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * All other states may be combined with each other and with one of the power
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * level state.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * These flags may be used only if the address qualifier (satadev_addr.qual) is
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * set to SATA_ADDR_CPORT or SATA_ADDR_PMPORT value.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf/* Mask for the valid port-specific state flags */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf/* Mask for a port power states */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Device type (in satadev_type field of sata_device structure).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * More device types may be added in the future.
385470574fb49e32c324af06c01d697a16cc3c4bying tian - Beijing China#define SATA_DTYPE_ATADISK 0x01 /* ATA disk */
385470574fb49e32c324af06c01d697a16cc3c4bying tian - Beijing China#define SATA_DTYPE_ATAPI 0x40 /* ATAPI device */
385470574fb49e32c324af06c01d697a16cc3c4bying tian - Beijing China (SATA_DTYPE_ATAPI|0x02) /* ATAPI CD/DVD device */
385470574fb49e32c324af06c01d697a16cc3c4bying tian - Beijing China (SATA_DTYPE_ATAPI|0x04) /* ATAPI tape */
385470574fb49e32c324af06c01d697a16cc3c4bying tian - Beijing China (SATA_DTYPE_ATAPI|0x08) /* ATAPI disk */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_DTYPE_UNKNOWN 0x20 /* Device attached, unkown */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA cmd structure (rev 1)
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA HBA framework always sets all fields except status_reg and error_reg.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA HBA driver action depends on the addressing type specified by
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * addr_type field:
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * If LBA48 addressing is indicated, SATA HBA driver has to load values from
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_sec_count_msb_reg, satacmd_lba_low_msb_reg,
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_lba_mid_msb_reg and satacmd_lba_hi_msb_reg
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * to appropriate registers prior to loading other registers.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * For other addressing modes, SATA HBA driver should skip loading values
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * from satacmd_sec_count_msb_reg, satacmd_lba_low_msb_reg,
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_lba_mid_msb_reg and satacmd_lba_hi_msb_reg
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * fields and load only remaining field values to corresponding registers.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_sec_count_msb and satamcd_sec_count_lsb values are loaded into
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * sec_count register, satacmd_sec_count_msb loaded first (if LBA48
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * addressing is used).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_lba_low_msb and satacmd_lba_low_lsb values are loaded into the
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * lba_low register, satacmd_lba_low_msb loaded first (if LBA48 addressing
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * is used). The lba_low register is the newer name for the old
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * sector_number register.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_lba_mid_msb and satacmd_lba_mid_lsb values are loaded into lba_mid
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * register, satacmd_lba_mid_msb loaded first (if LBA48 addressing is used).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * The lba_mid register is the newer name for the old cylinder_low register.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_lba_high_msb and satacmd_lba_high_lsb values are loaded into
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * the lba_high regster, satacmd_lba_high_msb loaded first (if LBA48
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * addressing is used). The lba_high register is a newer name for the old
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * cylinder_high register.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * No addressing mode is selected when an ata command does not involve actual
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * reading/writing data from/to the media (for example IDENTIFY DEVICE or
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SET FEATURE command), or the ATAPI PACKET command is sent.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * If ATAPI PACKET command is sent and tagged commands are used,
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA HBA driver has to provide and manage a tag value and
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * set it into the sector_count register.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Device Control register is not specified in sata_cmd structure - SATA HBA
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * driver shall set it accordingly to current mode of operation (interrupt
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Buffer structure's b_flags should be used to determine the
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * address type of b_un.b_addr. However, there is no need to allocate DMA
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * resources for the buffer in SATA HBA driver.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * DMA resources for a buffer structure are allocated by the SATA HBA
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * framework. Scatter/gather list is to be used only for DMA transfers
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * and it should be based on the DMA cookies list.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Upon completion of a command, SATA HBA driver has to update
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_status_reg and satacmd_error_reg to reflect the contents of
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * the corresponding device status and error registers.
6f9b9bf43c10fb1741a40302efe9db1a139745c8pawelw * If the command completed successfully, satacmd_flags.sata_copy_xxx flags
6f9b9bf43c10fb1741a40302efe9db1a139745c8pawelw * specify what register fields should be updated in sata_cmd structure.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * If the command completed with error, SATA HBA driver has to update
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_sec_count_msb, satacmd_sec_count_lsb, satacmd_lba_low_msb,
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_lba_low_lsb, satacmd_lba_mid_msb, satacmd_lba_mid_lsb,
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_lba_high_msb and satacmd_lba_high_lsb to values read from the
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * corresponding device registers.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * If an operation could not complete because of the port error, the
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * sata_pkt.satapkt_device.satadev_scr structure has to be updated.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * If ATAPI PACKET command was sent and command completed with error,
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * rqsense structure has to be filed by SATA HBA driver. The satacmd_arq_cdb
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * points to pre-set request sense cdb that may be used for issuing request
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * sense data from the device.
6f9b9bf43c10fb1741a40302efe9db1a139745c8pawelw * The sata_max_queue_depth field specifies the maximum allowable queue depth
6f9b9bf43c10fb1741a40302efe9db1a139745c8pawelw * minus one, i.e. for maximum queue depth of 32, sata_max_queue_depth would
6f9b9bf43c10fb1741a40302efe9db1a139745c8pawelw * be set to value 0x1f.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * If FPDMA-type command was sent and command completed with error, the HBA
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * driver may use pre-set command READ LOG EXTENDED command pointed to
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * by satacmd_rle_sata_cmd field to retrieve error data from a device.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Only ATA register fields of the sata_cmd are set-up for that purpose.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * If the READ MULTIPLIER command was specified in cmd_reg (command directed
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * to a port multiplier host port rather then to an attached device),
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * upon the command completion SATA HBA driver has to update_sector count
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * and lba fields of the sata_cmd structure to values returned via
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * command block registers (task file registers).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_ATAPI_MAX_CDB_LEN 16 /* Covers both 12 and 16 byte cdbs */
2038334ab26baaa43c9083f35def041511c3cc1fUnknown#define SATA_ATAPI_RQSENSE_LEN 24 /* Allocated Request Sense data */
2038334ab26baaa43c9083f35def041511c3cc1fUnknown#define SATA_ATAPI_MIN_RQSENSE_LEN 18 /* Min Fixed size Request Sense data */
2038334ab26baaa43c9083f35def041511c3cc1fUnknown#define SATA_ATAPI_RQSENSE_CDB_LEN 6 /* Request Sense CDB length */
6f9b9bf43c10fb1741a40302efe9db1a139745c8pawelw#define SATA_MAX_QUEUE_DEPTH 32 /* Default max queue depth */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf uint8_t satacmd_addr_type; /* addr type: LBA28, LBA48 */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf uint8_t satacmd_features_reg_ext; /* features reg extended */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf uint8_t satacmd_sec_count_msb; /* sector count MSB (LBA48) */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf uint8_t satacmd_lba_high_msb; /* LBA High MSB (LBA48) */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf uint8_t satacmd_device_reg; /* ATA dev reg & LBA28 MSB */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf uint8_t satacmd_features_reg; /* ATA features register */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf uint8_t satacmd_acdb[SATA_ATAPI_MAX_CDB_LEN]; /* ATAPI cdb */
2038334ab26baaa43c9083f35def041511c3cc1fUnknown /* kept for binary compat. */
2038334ab26baaa43c9083f35def041511c3cc1fUnknown * Error retrieval buffer
2038334ab26baaa43c9083f35def041511c3cc1fUnknown * dma handle pointer
2038334ab26baaa43c9083f35def041511c3cc1fUnknown * (for buffer DMA syncing)
2038334ab26baaa43c9083f35def041511c3cc1fUnknown * Valid only in error
2038334ab26baaa43c9083f35def041511c3cc1fUnknown * retrieval packet!
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf int satacmd_num_dma_cookies; /* number of dma cookies */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf /* ptr to dma cookie list */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf/* ATA address type (in satacmd_addr_type field */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satacmd_flags : contain data transfer direction flags,
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * tagged queuing type flags, queued command flag, and reset state handling
c03acfcad7780db4ddf763511a82026680b3b2c1ls * Data transfer direction flags (satacmd_flags.sata_data_direction)
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Direction flags are mutually exclusive.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_DIR_NODATA_XFER 0x0001 /* No data transfer */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_DIR_READ 0x0002 /* Reading data from a device */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_DIR_WRITE 0x0004 /* Writing data to a device */
37a077ef1920ee044b2887247b2a802e726d3368ls * Tagged Queuing type flags
37a077ef1920ee044b2887247b2a802e726d3368ls * satacmd_flags.sata_queue_stag
37a077ef1920ee044b2887247b2a802e726d3368ls * satacmd_flags.sata_queue_otag
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * These flags indicate how the SATA command should be queued.
37a077ef1920ee044b2887247b2a802e726d3368ls * sata_queue_stag
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Simple-queue-tagged command. It may be executed out-of-order in respect
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * to other queued commands.
37a077ef1920ee044b2887247b2a802e726d3368ls * sata_queue_otag
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Ordered-queue-tagged command. It cannot be executed out-of-order in
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * respect to other commands, i.e. it should be executed in the order of
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * being transported to the HBA.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Translated head-of-queue-tagged scsi commands and commands that are
43fd86b499a1ef15b1394b35ed4066e6f8a526f5ls * to be put at the head of the queue are treated as sata_queue_otag
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * tagged commands.
37a077ef1920ee044b2887247b2a802e726d3368ls * Queuing command set-up flag (satacmd_flags.sata_queued).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * This flag indicates that sata_cmd was set-up for DMA Queued command
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * (either READ_DMA_QUEUED, READ_DMA_QUEUED_EXT, WRITE_DMA_QUEUED or
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * WRITE_DMA_QUEUED_EXT command) or one of the Native Command Queuing commands
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * (either READ_FPDMA_QUEUED or WRITE_FPDMA_QUEUED).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * This flag will be used only if sata_tran_hba_flags indicates controller
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * support for queuing and the device for which sata_cmd is prepared supports
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * either legacy queuing (indicated by Device Identify data word 83 bit 2)
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * or NCQ (indicated by word 76 of Device Identify data).
37a077ef1920ee044b2887247b2a802e726d3368ls * Reset state handling
37a077ef1920ee044b2887247b2a802e726d3368ls * satacmd_flags.sata_ignore_dev_reset
37a077ef1920ee044b2887247b2a802e726d3368ls * satacmd_flags.sata_clear_dev_reset
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA HBA device enters reset state if the device was subjected to
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * the Device Reset (may also enter this state if the device was reset
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * as a side effect of port reset). SATA HBA driver sets this state.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Device stays in this condition until explicit request from SATA HBA
37a077ef1920ee044b2887247b2a802e726d3368ls * framework to clear the state.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA Packet structure (rev 1)
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * hba_driver_private is for a private use of the SATA HBA driver;
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satapkt_framework_private is used only by SATA HBA framework;
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satapkt_comp is a callback function to be called when packet
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * execution is completed (for any reason) if mode of operation is not
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * synchronous (SATA_OPMODE_SYNCH);
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satapkt_reason specifies why the packet operation was completed
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * NOTE: after the packet completion callback SATA HBA driver should not
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * attempt to access any sata_pkt fields because sata_pkt is not valid anymore
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * (it could have been destroyed).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Since satapkt_hba_driver_private field cannot be retrieved, any hba private
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * data respources allocated per packet and accessed via this pointer should
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * either be freed before the completion callback is done, or the pointer has
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * to be saved by the HBA driver before the completion callback.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf struct sata_device satapkt_device; /* Device address/type */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf /* HBA driver private data */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf /* SATA framework priv data */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf /* Rqsted mode of operation */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf struct sata_cmd satapkt_cmd; /* composite sata command */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Operation mode flags (in satapkt_op_mode field of sata_pkt structure).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Use to specify what should be a mode of operation for specified command.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Default (000b) means use Interrupt and Asynchronous mode to
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * perform an operation.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Synchronous operation menas that the packet operation has to be completed
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * before the function called to initiate the operation returns.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_OPMODE_INTERRUPTS 0 /* Use interrupts (hint) */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_OPMODE_POLLING 1 /* Use polling instead of interrupts */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_OPMODE_ASYNCH 0 /* Return immediately after accepting pkt */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_OPMODE_SYNCH 4 /* Perform synchronous operation */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satapkt_reason values:
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_PKT_QUEUE_FULL - cmd not sent because of queue full (detected
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * by the controller). If a device reject command for this reason, it
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * should be reported as SATA_PKT_DEV_ERROR
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_PKT_CMD_NOT_SUPPORTED - command not supported by a controller
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Controller is unable to send such command to a device.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * If device rejects a command, it should be reported as
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_PKT_DEV_ERROR.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_PKT_DEV_ERROR - cmd failed because of device reported an error.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * The content of status_reg (ERROR bit has to be set) and error_reg
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * fields of the sata_cmd structure have to be set and will be used
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * by SATA HBA Framework to determine the error cause.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_PKT_PORT_ERROR - cmd failed because of a link or a port error.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Link failed / no communication with a device / communication error
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * or other port related error was detected by a controller.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * sata_pkt.satapkt_device.satadev_scr.sXXXXXXX words have to be set.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_PKT_ABORTED - cmd execution was aborted by the request from the
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * framework. Abort mechanism is HBA driver specific.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_PKT_TIMEOUT - cmd execution has timed-out. Timeout specified by
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * pkt_time was exceeded. The command was terminated by the SATA HBA
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_PKT_COMPLETED - this is a value returned when an operation
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * completes without errors.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_PKT_BUSY - packet was not accepted for execution because the
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * driver was busy performing some other operation(s).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_PKT_RESET - packet execution was aborted because of device
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * reset originated by either the HBA driver or the SATA framework.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_PKT_QUEUE_FULL 2 /* Not accepted, queue full */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_PKT_PORT_ERROR 3 /* Not completed, port error */
2038334ab26baaa43c9083f35def041511c3cc1fUnknown * Error retrieval sata packet types
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhang * Read/write port multiplier packet types
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Hoplug functions vector structure (rev 1)
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf int (*sata_tran_port_activate)(dev_info_t *, sata_device_t *);
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf int (*sata_tran_port_deactivate)(dev_info_t *, sata_device_t *);
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlftypedef struct sata_tran_hotplug_ops sata_tran_hotplug_ops_t;
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Power management functions vector structure (rev 1)
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * The embedded function returns information about the controller's
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * power level.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Additional functions may be added in the future without changes to
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * sata_tran structure.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf int (*sata_tran_get_pwr_level)(dev_info_t *, sata_device_t *);
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlftypedef struct sata_tran_pwrmgt_ops sata_tran_pwrmgt_ops_t;
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA port PHY Power Level
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * These states correspond to the interface power management state as defined
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * in Serial ATA spec.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_TRAN_PORTPWR_LEVEL1 1 /* Interface in active PM state */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_TRAN_PORTPWR_LEVEL2 2 /* Interface in PARTIAL PM state */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_TRAN_PORTPWR_LEVEL3 3 /* Interface in SLUMBER PM state */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA HBA Tran structure (rev 1)
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Registered with SATA Framework
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * dma_attr is a pointer to data (buffer) dma attibutes of the controller
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * DMA engine.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * The qdepth field specifies number of commands that may be accepted by
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * the controller. Value range 1-32. A value greater than 1 indicates that
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * the controller supports queuing. Support for Native Command Queuing
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * indicated by SATA_CTLF_NCQ flag also requires qdepth set to a value
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * greater then 1.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf ddi_dma_attr_t *sata_tran_hba_dma_attr; /* DMA attributes */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf int sata_tran_hba_num_cports; /* Num of HBA device ports */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf uint16_t sata_tran_hba_features_support; /* HBA features */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf uint16_t sata_tran_hba_qdepth; /* HBA-supported queue depth */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf int (*sata_tran_probe_port)(dev_info_t *, sata_device_t *);
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf int (*sata_tran_abort)(dev_info_t *, sata_pkt_t *, int);
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf int (*sata_tran_selftest)(dev_info_t *, sata_device_t *);
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf /* Hotplug vector */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf /* Power mgt vector */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Controller's features support flags (sata_tran_hba_features_support).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Note: SATA_CTLF_NCQ indicates that SATA controller supports NCQ in addition
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * to legacy queuing commands, indicated by SATA_CTLF_QCMD flag.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_CTLF_PORT_MULTIPLIER 0x010 /* Port Multiplier suport */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_CTLF_ASN 0x040 /* Asynchronous Event Support */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_CTLF_QCMD 0x080 /* Queued commands support */
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhang#define SATA_CTLF_PMULT_FBS 0x200 /* FIS-based switching support */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * sata_tran_start() return values.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * When pkt is not accepted, the satapkt_reason has to be updated
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * before function returns - it should reflect the same reason for not being
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * executed as the return status of above functions.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * If pkt was accepted and executed synchronously,
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * satapk_reason should indicate a completion status.
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_TRAN_QUEUE_FULL 1 /* not accepted, queue full */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_TRAN_PORT_ERROR 2 /* not accepted, port error */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#define SATA_TRAN_CMD_UNSUPPORTED 3 /* not accepted, cmd not supported */
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * sata_tran_abort() abort type flag
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * Events handled by SATA HBA Framework
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * More then one event may be reported at the same time
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_EVNT__DEVICE_ATTACHED
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * HBA detected the presence of a device ( electrical connection with
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * a device was detected ).
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_EVNT_DEVICE_DETACHED
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * HBA detected the detachment of a device (electrical connection with
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * a device was broken)
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_EVNT_LINK_LOST
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * HBA lost link with an attached device
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_EVNT_LINK_ESTABLISHED
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * HBA established a link with an attached device
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_EVNT_PORT_FAILED
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * HBA has determined that the port failed and is unuseable
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_EVENT_DEVICE_RESET
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA device was reset, causing loss of the device setting
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA_EVNT_PWR_LEVEL_CHANGED
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * A port or entire SATA controller power level has changed
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhang * SATA_EVNT_PMULT_LINK_CHANGED
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhang * Port multiplier detect change on a link of its device port
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf * SATA Framework interface entry points
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlfint sata_hba_attach(dev_info_t *, sata_hba_tran_t *, ddi_attach_cmd_t);
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlfvoid sata_hba_event_notify(dev_info_t *, sata_device_t *, int);
2038334ab26baaa43c9083f35def041511c3cc1fUnknownsata_pkt_t *sata_get_error_retrieval_pkt(dev_info_t *, sata_device_t *, int);
8aa6aadbbfba50077655c6a46a5e269c880e4ab4Xiao-Yu Zhangsata_pkt_t *sata_get_rdwr_pmult_pkt(dev_info_t *, sata_device_t *, uint8_t,
918304a3bd962ac065ad520336a044d94b40ad16Xiao-Yu Zhangvoid sata_register_pmult(dev_info_t *, sata_device_t *, sata_pmult_gscr_t *);
0c6eaab480b44a0c790ad94e7cb6084792411de9Hans Rosenfeldvoid sata_split_model(char *, char **, char **);
f5f2d263454d943a366844932bdb677530ba733bFred Herard * SATA trace ring buffer constants
f5f2d263454d943a366844932bdb677530ba733bFred Herard * SATA trace ring buffer content
f5f2d263454d943a366844932bdb677530ba733bFred Herard * SATA trace ring buffer header
f5f2d263454d943a366844932bdb677530ba733bFred Herard sata_trace_dmsg_t *dmsgp; /* ptr to last message */
f5f2d263454d943a366844932bdb677530ba733bFred Herard * SATA trace ring buffer interfaces
f5f2d263454d943a366844932bdb677530ba733bFred Herardvoid sata_trace_debug(dev_info_t *, const char *fmt, ...);
f5f2d263454d943a366844932bdb677530ba733bFred Herardvoid sata_vtrace_debug(dev_info_t *, const char *fmt, va_list);
66f9d5cb3cc0652e2d9d1366fb950efbe4ca2f24mlf#endif /* _SATA_HBA_H */