xref: /titanic_51/usr/src/uts/common/sys/sata/sata_satl.h (revision 63aa537723d4883425b44d96b6316b7ad14053fc)
1*63aa5377SAlan Perry /*
2*63aa5377SAlan Perry  * CDDL HEADER START
3*63aa5377SAlan Perry  *
4*63aa5377SAlan Perry  * The contents of this file are subject to the terms of the
5*63aa5377SAlan Perry  * Common Development and Distribution License (the "License").
6*63aa5377SAlan Perry  * You may not use this file except in compliance with the License.
7*63aa5377SAlan Perry  *
8*63aa5377SAlan Perry  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*63aa5377SAlan Perry  * or http://www.opensolaris.org/os/licensing.
10*63aa5377SAlan Perry  * See the License for the specific language governing permissions
11*63aa5377SAlan Perry  * and limitations under the License.
12*63aa5377SAlan Perry  *
13*63aa5377SAlan Perry  * When distributing Covered Code, include this CDDL HEADER in each
14*63aa5377SAlan Perry  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*63aa5377SAlan Perry  * If applicable, add the following below this CDDL HEADER, with the
16*63aa5377SAlan Perry  * fields enclosed by brackets "[]" replaced with your own identifying
17*63aa5377SAlan Perry  * information: Portions Copyright [yyyy] [name of copyright owner]
18*63aa5377SAlan Perry  *
19*63aa5377SAlan Perry  * CDDL HEADER END
20*63aa5377SAlan Perry  */
21*63aa5377SAlan Perry 
22*63aa5377SAlan Perry /*
23*63aa5377SAlan Perry  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24*63aa5377SAlan Perry  * Use is subject to license terms.
25*63aa5377SAlan Perry  */
26*63aa5377SAlan Perry 
27*63aa5377SAlan Perry #ifndef	_SATA_SATL_H
28*63aa5377SAlan Perry #define	_SATA_SATL_H
29*63aa5377SAlan Perry 
30*63aa5377SAlan Perry #include <sys/scsi/impl/spc3_types.h>
31*63aa5377SAlan Perry 
32*63aa5377SAlan Perry #ifdef __cplusplus
33*63aa5377SAlan Perry extern "C" {
34*63aa5377SAlan Perry #endif
35*63aa5377SAlan Perry 
36*63aa5377SAlan Perry /*
37*63aa5377SAlan Perry  * Definitions and declarations
38*63aa5377SAlan Perry  * ANSI SCSI / ATA Translation - 2 (SAT-2) specification
39*63aa5377SAlan Perry  */
40*63aa5377SAlan Perry 
41*63aa5377SAlan Perry /*
42*63aa5377SAlan Perry  * SATL ATA Pass Through PROTOCOL field values
43*63aa5377SAlan Perry  */
44*63aa5377SAlan Perry #define	SATL_APT_P_HW_RESET		0	/* ATA hardware reset */
45*63aa5377SAlan Perry #define	SATL_APT_P_SRST			0x1	/* Software reset */
46*63aa5377SAlan Perry #define	SATL_APT_P_NON_DATA		0x3	/* Non-data */
47*63aa5377SAlan Perry #define	SATL_APT_P_PIO_DATA_IN		0x4	/* PIO Data-in */
48*63aa5377SAlan Perry #define	SATL_APT_P_PIO_DATA_OUT		0x5	/* PIO Data-out */
49*63aa5377SAlan Perry #define	SATL_APT_P_DMA			0x6	/* DMA */
50*63aa5377SAlan Perry #define	SATL_APT_P_DMA_QUEUED		0x7	/* DMA Queued */
51*63aa5377SAlan Perry #define	SATL_APT_P_DEV_DIAG		0x8	/* Device Diagnostics */
52*63aa5377SAlan Perry #define	SATL_APT_P_DEV_RESET		0x9	/* Device Reset */
53*63aa5377SAlan Perry #define	SATL_APT_P_UDMA_IN		0xa	/* UDMA Data In */
54*63aa5377SAlan Perry #define	SATL_APT_P_UDMA_OUT		0xb	/* UDMA Data Out */
55*63aa5377SAlan Perry #define	SATL_APT_P_FPDMA		0xc	/* FPDMA */
56*63aa5377SAlan Perry #define	SATL_APT_P_RET_RESP		0xf	/* Return Response Info */
57*63aa5377SAlan Perry 
58*63aa5377SAlan Perry /*
59*63aa5377SAlan Perry  * SATL ATA Pass Through bit masks
60*63aa5377SAlan Perry  */
61*63aa5377SAlan Perry #define	SATL_APT_BM_EXTEND		0x01
62*63aa5377SAlan Perry #define	SATL_APT_BM_CK_COND		0x20
63*63aa5377SAlan Perry #define	SATL_APT_BM_T_DIR		0x08
64*63aa5377SAlan Perry #define	SATL_APT_BM_BYTE_BLOCK		0x04
65*63aa5377SAlan Perry 
66*63aa5377SAlan Perry #ifdef __cplusplus
67*63aa5377SAlan Perry }
68*63aa5377SAlan Perry #endif
69*63aa5377SAlan Perry 
70*63aa5377SAlan Perry #endif	/* _SATA_SATL_H */
71