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