aac_tables.h revision 1.3 1 1.3 briggs /* $NetBSD: aac_tables.h,v 1.3 2005/02/15 04:49:31 briggs Exp $ */
2 1.1 ad
3 1.1 ad /*-
4 1.1 ad * Copyright (c) 2000 Michael Smith
5 1.1 ad * Copyright (c) 2000 BSDi
6 1.1 ad * Copyright (c) 2000 Niklas Hallqvist
7 1.1 ad * All rights reserved.
8 1.1 ad *
9 1.1 ad * Redistribution and use in source and binary forms, with or without
10 1.1 ad * modification, are permitted provided that the following conditions
11 1.1 ad * are met:
12 1.1 ad * 1. Redistributions of source code must retain the above copyright
13 1.1 ad * notice, this list of conditions and the following disclaimer.
14 1.1 ad * 2. Redistributions in binary form must reproduce the above copyright
15 1.1 ad * notice, this list of conditions and the following disclaimer in the
16 1.1 ad * documentation and/or other materials provided with the distribution.
17 1.1 ad *
18 1.1 ad * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 1.1 ad * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 1.1 ad * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 1.1 ad * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 1.1 ad * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 1.1 ad * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 1.1 ad * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 1.1 ad * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 1.1 ad * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 1.1 ad * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 1.1 ad * SUCH DAMAGE.
29 1.1 ad *
30 1.1 ad * from FreeBSD: aac_tables.h,v 1.1 2000/09/13 03:20:34 msmith Exp
31 1.1 ad * via OpenBSD: aac_tables.h,v 1.1 2000/11/10 09:39:35 niklas Exp
32 1.1 ad */
33 1.1 ad
34 1.2 thorpej #ifndef _DEV_IC_AAC_TABLES_H_
35 1.2 thorpej #define _DEV_IC_AAC_TABLES_H_
36 1.2 thorpej
37 1.1 ad /*
38 1.1 ad * Status codes for block read/write commands, etc.
39 1.1 ad *
40 1.1 ad * XXX Many of these would not normally be returned, as they are relevant
41 1.1 ad * only to FSA operations.
42 1.1 ad */
43 1.1 ad const struct aac_code_lookup aac_command_status_table[] = {
44 1.1 ad { "OK", 0 },
45 1.1 ad { "operation not permitted", 1 },
46 1.1 ad { "not found", 2 },
47 1.1 ad { "I/O error", 5 },
48 1.1 ad { "device not configured", 6 },
49 1.1 ad { "too big", 7 },
50 1.1 ad { "permission denied", 13 },
51 1.1 ad { "file exists", 17 },
52 1.1 ad { "cross-device link", 18 },
53 1.1 ad { "operation not supported by device", 19 },
54 1.1 ad { "not a directory", 20 },
55 1.1 ad { "is a directory", 21 },
56 1.1 ad { "invalid argument", 22 },
57 1.1 ad { "file too large", 27 },
58 1.1 ad { "no space on device", 28 },
59 1.1 ad { "readonly filesystem", 30 },
60 1.1 ad { "too many links", 31 },
61 1.1 ad { "operation would block", 35 },
62 1.1 ad { "file name too long", 63 },
63 1.1 ad { "directory not empty", 66 },
64 1.1 ad { "quota exceeded", 69 },
65 1.1 ad { "stale file handle", 70 },
66 1.1 ad { "too many levels of remote in path", 71 },
67 1.1 ad { "bad file handle", 10001 },
68 1.1 ad { "not sync", 10002 },
69 1.1 ad { "bad cookie", 10003 },
70 1.1 ad { "operation not supported", 10004 },
71 1.1 ad { "too small", 10005 },
72 1.1 ad { "server fault", 10006 },
73 1.1 ad { "bad type", 10007 },
74 1.1 ad { "jukebox", 10008 },
75 1.1 ad { "not mounted", 10009 },
76 1.1 ad { "in maintenace mode", 10010 },
77 1.1 ad { "stale ACL", 10011 },
78 1.1 ad { NULL, 0 },
79 1.1 ad { "unknown command status", 0 }
80 1.1 ad };
81 1.1 ad
82 1.1 ad #define AAC_COMMAND_STATUS(x) aac_describe_code(aac_command_status_table, x)
83 1.1 ad
84 1.2 thorpej static const struct aac_code_lookup aac_cpu_variant[] = {
85 1.1 ad { "i960JX", CPUI960_JX },
86 1.1 ad { "i960CX", CPUI960_CX },
87 1.1 ad { "i960HX", CPUI960_HX },
88 1.1 ad { "i960RX", CPUI960_RX },
89 1.3 briggs { "i80303", CPUI80303 },
90 1.1 ad { "StrongARM SA110", CPUARM_SA110 },
91 1.1 ad { "PowerPC 603e", CPUPPC_603e },
92 1.1 ad { "Unknown StrongARM", CPUARM_xxx },
93 1.1 ad { "Unknown PowerPC", CPUPPC_xxx },
94 1.1 ad { NULL, 0 },
95 1.1 ad { "Unknown processor", 0 }
96 1.1 ad };
97 1.1 ad
98 1.2 thorpej static const struct aac_code_lookup aac_battery_platform[] = {
99 1.1 ad { "required battery present", PLATFORM_BAT_REQ_PRESENT },
100 1.1 ad { "REQUIRED BATTERY NOT PRESENT", PLATFORM_BAT_REQ_NOTPRESENT },
101 1.1 ad { "optional battery present", PLATFORM_BAT_OPT_PRESENT },
102 1.1 ad { "optional battery not installed", PLATFORM_BAT_OPT_NOTPRESENT },
103 1.1 ad { "no battery support", PLATFORM_BAT_NOT_SUPPORTED },
104 1.1 ad { NULL, 0 },
105 1.1 ad { "unknown battery platform", 0 }
106 1.1 ad };
107 1.1 ad
108 1.1 ad const struct aac_code_lookup aac_container_types[] = {
109 1.1 ad { "Volume", CT_VOLUME },
110 1.1 ad { "RAID 1 (Mirror)", CT_MIRROR },
111 1.1 ad { "RAID 0 (Stripe)", CT_STRIPE },
112 1.1 ad { "RAID 5", CT_RAID5 },
113 1.1 ad { "SSRW", CT_SSRW },
114 1.1 ad { "SSRO", CT_SSRO },
115 1.1 ad { "Morph", CT_MORPH },
116 1.1 ad { "Passthrough", CT_PASSTHRU },
117 1.1 ad { "RAID 4", CT_RAID4 },
118 1.1 ad { "RAID 10", CT_RAID10 },
119 1.1 ad { "RAID 00", CT_RAID00 },
120 1.1 ad { "Volume of Mirrors", CT_VOLUME_OF_MIRRORS },
121 1.1 ad { "Pseudo RAID 3", CT_PSEUDO_RAID3 },
122 1.1 ad { NULL, 0 },
123 1.1 ad { "unknown", 0 }
124 1.1 ad };
125 1.2 thorpej
126 1.2 thorpej #endif /* _DEV_IC_AAC_TABLES_H_ */
127