xref: /openbsd/sys/dev/ic/aac_tables.h (revision 4b1a56af)
1 /*	$OpenBSD: aac_tables.h,v 1.6 2022/01/09 05:42:37 jsg 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  *	$FreeBSD: /c/ncvs/src/sys/dev/aac/aac_tables.h,v 1.1 2000/09/13 03:20:34 msmith Exp $
31  */
32 
33 /*
34  * Status codes for block read/write commands, etc.
35  *
36  * XXX many of these would not normally be returned, as they are
37  * relevant only to FSA operations.
38  */
39 const struct aac_code_lookup aac_command_status_table[] = {
40 	{ "OK",					0 },
41 	{ "operation not permitted",		1 },
42 	{ "not found",				2 },
43 	{ "I/O error",				5 },
44 	{ "device not configured",		6 },
45 	{ "too big",				7 },
46 	{ "permission denied",			13 },
47 	{ "file exists",			17 },
48 	{ "cross-device link",			18 },
49 	{ "operation not supported by device",	19 },
50 	{ "not a directory",			20 },
51 	{ "is a directory",			21 },
52 	{ "invalid argument",			22 },
53 	{ "file too large",			27 },
54 	{ "no space on device",			28 },
55 	{ "readonly filesystem",		30 },
56 	{ "too many links",			31 },
57 	{ "operation would block",		35 },
58 	{ "file name too long",			63 },
59 	{ "directory not empty",		66 },
60 	{ "quota exceeded",			69 },
61 	{ "stale file handle",			70 },
62 	{ "too many levels of remote in path",	71 },
63 	{ "bad file handle",			10001 },
64 	{ "not sync",				10002 },
65 	{ "bad cookie",				10003 },
66 	{ "operation not supported",		10004 },
67 	{ "too small",				10005 },
68 	{ "server fault",			10006 },
69 	{ "bad type",				10007 },
70 	{ "jukebox",				10008 },
71 	{ "not mounted",			10009 },
72 	{ "in maintenance mode",		10010 },
73 	{ "stale ACL",				10011 },
74 	{ NULL, 				0 },
75 	{ "unknown command status",		0 }
76 };
77 
78 #define AAC_COMMAND_STATUS(x)	aac_describe_code(aac_command_status_table, x)
79 
80 static struct aac_code_lookup aac_cpu_variant[] = {
81 	{ "i960JX",			CPUI960_JX },
82 	{ "i960CX",			CPUI960_CX },
83 	{ "i960HX",			CPUI960_HX },
84 	{ "i960RX",			CPUI960_RX },
85 	{ "StrongARM SA110",		CPUARM_SA110 },
86 	{ "MPC824x",			CPUMPC_824x },
87 	{ "Unknown StrongARM",		CPUARM_xxx },
88 	{ "Unknown PowerPC",		CPUPPC_xxx },
89 	{ "Intel GC80302 IOP",		CPUI960_302},
90 	{ "XScale 80321",		CPU_XSCALE_80321 },
91 	{ "MIPS 4KC",			CPU_MIPS_4KC },
92 	{ "MIPS 5KC",			CPU_MIPS_5KC },
93 	{ NULL, 			0 },
94 	{ "Unknown processor",		0 }
95 };
96 
97 static struct aac_code_lookup aac_battery_platform[] = {
98 	{ "required battery present",		PLATFORM_BAT_REQ_PRESENT },
99 	{ "REQUIRED BATTERY NOT PRESENT",	PLATFORM_BAT_REQ_NOTPRESENT },
100 	{ "optional battery present",		PLATFORM_BAT_OPT_PRESENT },
101 	{ "optional battery not installed",	PLATFORM_BAT_OPT_NOTPRESENT },
102 	{ "no battery support",			PLATFORM_BAT_NOT_SUPPORTED },
103 	{ NULL,					0 },
104 	{ "unknown battery platform",		0 }
105 };
106 
107 #if 0
108 static struct aac_code_lookup aac_container_types[] = {
109 	{ "Volume",		CT_VOLUME },
110 	{ "RAID 1 (Mirror)",	CT_MIRROR },
111 	{ "RAID 0 (Stripe)",	CT_STRIPE },
112 	{ "RAID 5",		CT_RAID5 },
113 	{ "SSRW",		CT_SSRW },
114 	{ "SSRO",		CT_SSRO },
115 	{ "Morph",		CT_MORPH },
116 	{ "Passthrough",	CT_PASSTHRU },
117 	{ "RAID 4",		CT_RAID4 },
118 	{ "RAID 10",		CT_RAID10 },
119 	{ "RAID 00",		CT_RAID00 },
120 	{ "Volume of Mirrors",	CT_VOLUME_OF_MIRRORS },
121 	{ "Pseudo RAID 3",	CT_PSEUDO_RAID3 },
122 	{ NULL,			0 },
123 	{ "unknown",		0 }
124 };
125 #endif
126