Mercurial > illumos > onarm
annotate usr/src/cmd/format/ctlr_ata.h @ 4:1a15d5aaf794
synchronized with onnv_86 (6202) in onnv-gate
author | Koji Uno <koji.uno@sun.com> |
---|---|
date | Mon, 31 Aug 2009 14:38:03 +0900 |
parents | c9caec207d52 |
children |
rev | line source |
---|---|
0 | 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 /* | |
24 * Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved. | |
25 * Use is subject to license terms. | |
26 */ | |
27 | |
28 /* | |
29 * Copyright (c) 2007 NEC Corporation | |
30 */ | |
31 | |
32 #ifndef _CTLR_ATA_H | |
33 #define _CTLR_ATA_H | |
34 | |
4
1a15d5aaf794
synchronized with onnv_86 (6202) in onnv-gate
Koji Uno <koji.uno@sun.com>
parents:
0
diff
changeset
|
35 #pragma ident "%Z%%M% %I% %E% SMI" |
0 | 36 |
37 #ifdef __cplusplus | |
38 extern "C" { | |
39 #endif | |
40 | |
41 #include <sys/buf.h> | |
42 | |
43 | |
44 /* | |
45 * Rounded parameter, as returned in Extended Sense information | |
46 */ | |
47 #define ROUNDED_PARAMETER 0x37 | |
48 | |
49 | |
50 /* | |
51 * Convert a three-byte triplet into an int | |
52 */ | |
53 #define TRIPLET(u, m, l) ((int)((((u))&0xff<<16) + \ | |
54 (((m)&0xff)<<8) + (l&0xff))) | |
55 #if defined(i386) || defined(__arm) | |
56 daddr_t altsec_offset; /* Alternate sector offset */ | |
57 #endif /* defined(i386) || defined(__arm) */ | |
58 | |
59 #ifdef __STDC__ | |
60 /* | |
61 * Local prototypes for ANSI C compilers | |
62 */ | |
63 | |
64 #if defined(i386) || defined(__arm) | |
65 int ata_rdwr(int, int, diskaddr_t, int, caddr_t, int, int *); | |
66 #else /* defined(i386) || defined(__arm) */ | |
67 static int ata_rdwr(int, int, diskaddr_t, int, caddr_t, int, int *); | |
68 #endif /* defined(i386) || defined(__arm) */ | |
69 | |
70 int ata_ex_man(struct defect_list *); | |
71 int ata_ex_grown(struct defect_list *); | |
72 int ata_read_defect_data(struct defect_list *, int); | |
73 int apply_chg_list(int, int, uchar_t *, uchar_t *, struct chg_list *); | |
74 | |
75 #else /* ! _STDC_ */ | |
76 | |
77 #if defined(i386) || defined(__arm) | |
78 int ata_rdwr(); | |
79 int ata_ex_cur(); | |
80 #else /* defined(i386) || defined(__arm) */ | |
81 static int ata_rdwr(); | |
82 static int ata_ex_cur(); | |
83 #endif /* defined(i386) || defined(__arm) */ | |
84 | |
85 int ata_ck_format(); | |
86 int ata_ex_man(); | |
87 int ata_ex_grown(); | |
88 int ata_read_defect_data(); | |
89 int apply_chg_list(); | |
90 | |
91 #endif /* __STDC__ */ | |
92 | |
93 #ifdef __cplusplus | |
94 } | |
95 #endif | |
96 | |
97 #endif /* _CTLR_ATA_H */ |