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