summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac/aac_tables.h
blob: fe687fb8477bc15fd53b4363409fb151476f294f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/*-
 * Copyright (c) 2000 Michael Smith
 * Copyright (c) 2000 BSDi
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *	$FreeBSD$
 */

/*
 * Status codes for block read/write commands, etc.
 *
 * XXX many of these would not normally be returned, as they are
 * relevant only to FSA operations.
 */
static struct aac_code_lookup aac_command_status_table[] = {
	{"OK",					ST_OK},
	{"operation not permitted",		ST_PERM},
	{"not found",				ST_NOENT},
	{"I/O error",				ST_IO},
	{"device not configured",		ST_NXIO},
	{"too big",				ST_E2BIG},
	{"permission denied",			ST_ACCES},
	{"file exists",				ST_EXIST},
	{"cross-device link",			ST_XDEV},
	{"operation not supported by device",	ST_NODEV},
	{"not a directory",			ST_NOTDIR},
	{"is a directory",			ST_ISDIR},
	{"invalid argument",			ST_INVAL},
	{"file too large",			ST_FBIG},
	{"no space on device",			ST_NOSPC},
	{"readonly filesystem",			ST_ROFS},
	{"too many links",			ST_MLINK},
	{"operation would block",		ST_WOULDBLOCK},
	{"file name too long",			ST_NAMETOOLONG},
	{"directory not empty",			ST_NOTEMPTY},
	{"quota exceeded",			ST_DQUOT},
	{"stale file handle",			ST_STALE},
	{"too many levels of remote in path",	ST_REMOTE},
	{"device busy (spinning up)",		ST_NOT_READY},
	{"bad file handle",			ST_BADHANDLE},
	{"not sync",				ST_NOT_SYNC},
	{"bad cookie",				ST_BAD_COOKIE},
	{"operation not supported",		ST_NOTSUPP},
	{"too small",				ST_TOOSMALL},
	{"server fault",			ST_SERVERFAULT},
	{"bad type",				ST_BADTYPE},
	{"jukebox",				ST_JUKEBOX},
	{"not mounted",				ST_NOTMOUNTED},
	{"in maintenance mode",			ST_MAINTMODE},
	{"stale ACL",				ST_STALEACL},
	{"bus reset - command aborted",		ST_BUS_RESET},
	{NULL, 					0},
	{"unknown command status",		0}
};

#define AAC_COMMAND_STATUS(x)	aac_describe_code(aac_command_status_table, x)

static struct aac_code_lookup aac_cpu_variant[] = {
	{"i960JX",		CPUI960_JX},
	{"i960CX",		CPUI960_CX},
	{"i960HX",		CPUI960_HX},
	{"i960RX",		CPUI960_RX},
	{"i960 80303",		CPUI960_80303},
	{"StrongARM SA110",	CPUARM_SA110},
	{"PPC603e",		CPUPPC_603e},
	{"XScale 80321",	CPU_XSCALE_80321},
	{"MIPS 4KC",		CPU_MIPS_4KC},
	{"MIPS 5KC",		CPU_MIPS_5KC},
	{"Unknown StrongARM",	CPUARM_xxx},
	{"Unknown PowerPC",	CPUPPC_xxx},
	{NULL, 0},
	{"Unknown processor",	0}
};

static struct aac_code_lookup aac_battery_platform[] = {
	{"required battery present",		PLATFORM_BAT_REQ_PRESENT},
	{"REQUIRED BATTERY NOT PRESENT",	PLATFORM_BAT_REQ_NOTPRESENT},
	{"optional battery present",		PLATFORM_BAT_OPT_PRESENT},
	{"optional battery not installed",	PLATFORM_BAT_OPT_NOTPRESENT},
	{"no battery support",			PLATFORM_BAT_NOT_SUPPORTED},
	{NULL, 0},
	{"unknown battery platform",		0}
};

static struct aac_code_lookup aac_container_types[] = {
	{"Volume",		CT_VOLUME},
	{"RAID 1 (Mirror)",	CT_MIRROR},
	{"RAID 0 (Stripe)",	CT_STRIPE},
	{"RAID 5",		CT_RAID5},
	{"SSRW",		CT_SSRW},
	{"SSRO",		CT_SSRO},
	{"Morph",		CT_MORPH},
	{"Passthrough",		CT_PASSTHRU},
	{"RAID 4",		CT_RAID4},
	{"RAID 0/1",		CT_RAID10},
	{"RAID 0/0",		CT_RAID00},
	{"Volume of Mirrors",	CT_VOLUME_OF_MIRRORS},
	{"Pseudo RAID 3",	CT_PSEUDO_RAID3},
	{"RAID 0/5",		CT_RAID50},
	{"RAID 5D",		CT_RAID5D},
	{"RAID 0/5D",		CT_RAID5D0},
	{"RAID 1E",		CT_RAID1E},
	{"RAID 6",		CT_RAID6},
	{"RAID 0/6",		CT_RAID60},
	{NULL, 0},
	{"unknown",		0}
};

OpenPOWER on IntegriCloud