xref: /titanic_51/usr/src/uts/sun/sys/dada/impl/status.h (revision b3697b90e692e3e5d859fb77d285d4c056d99eda)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1996, by Sun Microsystems Inc.
24  * All rights resserved.
25  */
26 
27 #ifndef	_SYS_DADA_IMPL_STATUS_H
28 #define	_SYS_DADA_IMPL_STATUS_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * The following are the status bytes definition
38  */
39 
40 #define		STATUS_ATA_BUSY		0x80	/* Controller Busy */
41 #define		STATUS_ATA_DRDY		0x40	/* Drive Ready */
42 #define		STATUS_ATA_DWF		0x20	/* Write Fault */
43 #define		STATUS_ATA_DSC		0x10	/* Seek operation complete */
44 #define		STATUS_ATA_DRQ		0x08	/* Data Request */
45 #define		STATUS_ATA_CORR		0x04	/* ECC corection applied */
46 #define		STATUS_ATA_IDX		0x02	/* Disk revolution index */
47 #define		STATUS_ATA_ERR		0x01	/* Error Flag	*/
48 #define		STATUS_ATA_MASK		0x81	/* Mask for status byte */
49 #define		STATUS_GOOD		0x00	/* Good status */
50 
51 /*
52  * The following are the defines for the error register
53  */
54 
55 #define		ERR_AMNF		0x01	/* Address Mark not found */
56 #define		ERR_TKONF		0x02	/* Track 0 not found */
57 #define		ERR_ABORT		0x04	/* Aborted command 	*/
58 #define		ERR_IDNF		0x10	/* ID not found */
59 #define		ERR_MC			0x20	/* MEdia Change */
60 #define		ERR_UNC			0x40	/* Uncorrectable data error */
61 #define		ERR_BBK			0x80	/* Bad block detected */
62 
63 
64 #ifdef	__cplusplus
65 }
66 #endif
67 
68 #endif /* _SYS_DADA_IMPL_STATUS_H */
69