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