xref: /freebsd/sys/dev/aac/aac_tables.h (revision 7cb209f5)
135863739SMike Smith /*-
235863739SMike Smith  * Copyright (c) 2000 Michael Smith
335863739SMike Smith  * Copyright (c) 2000 BSDi
435863739SMike Smith  * All rights reserved.
535863739SMike Smith  *
635863739SMike Smith  * Redistribution and use in source and binary forms, with or without
735863739SMike Smith  * modification, are permitted provided that the following conditions
835863739SMike Smith  * are met:
935863739SMike Smith  * 1. Redistributions of source code must retain the above copyright
1035863739SMike Smith  *    notice, this list of conditions and the following disclaimer.
1135863739SMike Smith  * 2. Redistributions in binary form must reproduce the above copyright
1235863739SMike Smith  *    notice, this list of conditions and the following disclaimer in the
1335863739SMike Smith  *    documentation and/or other materials provided with the distribution.
1435863739SMike Smith  *
1535863739SMike Smith  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1635863739SMike Smith  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1735863739SMike Smith  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1835863739SMike Smith  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1935863739SMike Smith  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2035863739SMike Smith  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2135863739SMike Smith  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2235863739SMike Smith  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2335863739SMike Smith  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2435863739SMike Smith  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2535863739SMike Smith  * SUCH DAMAGE.
2635863739SMike Smith  *
2735863739SMike Smith  *	$FreeBSD$
2835863739SMike Smith  */
2935863739SMike Smith 
3035863739SMike Smith /*
3135863739SMike Smith  * Status codes for block read/write commands, etc.
3235863739SMike Smith  *
3335863739SMike Smith  * XXX many of these would not normally be returned, as they are
3435863739SMike Smith  * relevant only to FSA operations.
3535863739SMike Smith  */
3635863739SMike Smith static struct aac_code_lookup aac_command_status_table[] = {
3735863739SMike Smith 	{"OK",					0},
3835863739SMike Smith 	{"operation not permitted",		1},
3935863739SMike Smith 	{"not found",				2},
4035863739SMike Smith 	{"I/O error",				5},
4135863739SMike Smith 	{"device not configured",		6},
4235863739SMike Smith 	{"too big",				7},
437cb209f5SScott Long 	{"permission denied",			13},
4435863739SMike Smith 	{"file exists",				17},
4535863739SMike Smith 	{"cross-device link",			18},
4635863739SMike Smith 	{"operation not supported by device",	19},
4735863739SMike Smith 	{"not a directory",			20},
4835863739SMike Smith 	{"is a directory",			21},
4935863739SMike Smith 	{"invalid argument",			22},
5035863739SMike Smith 	{"file too large",			27},
5135863739SMike Smith 	{"no space on device",			28},
5235863739SMike Smith 	{"readonly filesystem",			30},
5335863739SMike Smith 	{"too many links",			31},
5435863739SMike Smith 	{"operation would block",		35},
5535863739SMike Smith 	{"file name too long",			63},
5635863739SMike Smith 	{"directory not empty",			66},
5735863739SMike Smith 	{"quota exceeded",			69},
5835863739SMike Smith 	{"stale file handle",			70},
5935863739SMike Smith 	{"too many levels of remote in path",	71},
6035863739SMike Smith 	{"bad file handle",			10001},
6135863739SMike Smith 	{"not sync",				10002},
6235863739SMike Smith 	{"bad cookie",				10003},
6335863739SMike Smith 	{"operation not supported",		10004},
6435863739SMike Smith 	{"too small",				10005},
6535863739SMike Smith 	{"server fault",			10006},
6635863739SMike Smith 	{"bad type",				10007},
6735863739SMike Smith 	{"jukebox",				10008},
6835863739SMike Smith 	{"not mounted",				10009},
697cb209f5SScott Long 	{"in maintenance mode",			10010},
7035863739SMike Smith 	{"stale ACL",				10011},
7135863739SMike Smith 	{NULL, 					0},
7235863739SMike Smith 	{"unknown command status",		0}
7335863739SMike Smith };
7435863739SMike Smith 
7535863739SMike Smith #define AAC_COMMAND_STATUS(x)	aac_describe_code(aac_command_status_table, x)
7635863739SMike Smith 
7735863739SMike Smith static struct aac_code_lookup aac_cpu_variant[] = {
7835863739SMike Smith 	{"i960JX",		CPUI960_JX},
7935863739SMike Smith 	{"i960CX",		CPUI960_CX},
8035863739SMike Smith 	{"i960HX",		CPUI960_HX},
8135863739SMike Smith 	{"i960RX",		CPUI960_RX},
827cb209f5SScott Long 	{"i960 80303",		CPUI960_80303},
8335863739SMike Smith 	{"StrongARM SA110",	CPUARM_SA110},
847cb209f5SScott Long 	{"PPC603e",		CPUPPC_603e},
857cb209f5SScott Long 	{"XScale 80321",	CPU_XSCALE_80321},
867cb209f5SScott Long 	{"MIPS 4KC",		CPU_MIPS_4KC},
877cb209f5SScott Long 	{"MIPS 5KC",		CPU_MIPS_5KC},
8835863739SMike Smith 	{"Unknown StrongARM",	CPUARM_xxx},
8935863739SMike Smith 	{"Unknown PowerPC",	CPUPPC_xxx},
9035863739SMike Smith 	{NULL, 0},
9135863739SMike Smith 	{"Unknown processor",	0}
9235863739SMike Smith };
9335863739SMike Smith 
9435863739SMike Smith static struct aac_code_lookup aac_battery_platform[] = {
9535863739SMike Smith 	{"required battery present",		PLATFORM_BAT_REQ_PRESENT},
9635863739SMike Smith 	{"REQUIRED BATTERY NOT PRESENT",	PLATFORM_BAT_REQ_NOTPRESENT},
9735863739SMike Smith 	{"optional battery present",		PLATFORM_BAT_OPT_PRESENT},
9835863739SMike Smith 	{"optional battery not installed",	PLATFORM_BAT_OPT_NOTPRESENT},
9935863739SMike Smith 	{"no battery support",			PLATFORM_BAT_NOT_SUPPORTED},
10035863739SMike Smith 	{NULL, 0},
10135863739SMike Smith 	{"unknown battery platform",		0}
10235863739SMike Smith };
10335863739SMike Smith 
10435863739SMike Smith static struct aac_code_lookup aac_container_types[] = {
10535863739SMike Smith 	{"Volume",		CT_VOLUME},
10635863739SMike Smith 	{"RAID 1 (Mirror)",	CT_MIRROR},
10735863739SMike Smith 	{"RAID 0 (Stripe)",	CT_STRIPE},
10835863739SMike Smith 	{"RAID 5",		CT_RAID5},
10935863739SMike Smith 	{"SSRW",		CT_SSRW},
11035863739SMike Smith 	{"SSRO",		CT_SSRO},
11135863739SMike Smith 	{"Morph",		CT_MORPH},
11235863739SMike Smith 	{"Passthrough",		CT_PASSTHRU},
11335863739SMike Smith 	{"RAID 4",		CT_RAID4},
1148ea9ab66SScott Long 	{"RAID 0/1",		CT_RAID10},
1158ea9ab66SScott Long 	{"RAID 0/0",		CT_RAID00},
11635863739SMike Smith 	{"Volume of Mirrors",	CT_VOLUME_OF_MIRRORS},
11735863739SMike Smith 	{"Pseudo RAID 3",	CT_PSEUDO_RAID3},
1188ea9ab66SScott Long 	{"RAID 0/5",		CT_RAID50},
1197cb209f5SScott Long 	{"RAID 5D",		CT_RAID5D},
1207cb209f5SScott Long 	{"RAID 0/5D",		CT_RAID5D0},
1217cb209f5SScott Long 	{"RAID 1E",		CT_RAID1E},
1227cb209f5SScott Long 	{"RAID 6",		CT_RAID6},
1237cb209f5SScott Long 	{"RAID 0/6",		CT_RAID60},
12435863739SMike Smith 	{NULL, 0},
12535863739SMike Smith 	{"unknown",		0}
12635863739SMike Smith };
12735863739SMike Smith 
128