xref: /freebsd/sys/dev/aac/aac_tables.h (revision 95ee2897)
135863739SMike Smith /*-
24d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3718cf2ccSPedro F. Giffuni  *
435863739SMike Smith  * Copyright (c) 2000 Michael Smith
535863739SMike Smith  * Copyright (c) 2000 BSDi
635863739SMike Smith  * All rights reserved.
735863739SMike Smith  *
835863739SMike Smith  * Redistribution and use in source and binary forms, with or without
935863739SMike Smith  * modification, are permitted provided that the following conditions
1035863739SMike Smith  * are met:
1135863739SMike Smith  * 1. Redistributions of source code must retain the above copyright
1235863739SMike Smith  *    notice, this list of conditions and the following disclaimer.
1335863739SMike Smith  * 2. Redistributions in binary form must reproduce the above copyright
1435863739SMike Smith  *    notice, this list of conditions and the following disclaimer in the
1535863739SMike Smith  *    documentation and/or other materials provided with the distribution.
1635863739SMike Smith  *
1735863739SMike Smith  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1835863739SMike Smith  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1935863739SMike Smith  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2035863739SMike Smith  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2135863739SMike Smith  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2235863739SMike Smith  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2335863739SMike Smith  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2435863739SMike Smith  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2535863739SMike Smith  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2635863739SMike Smith  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2735863739SMike Smith  * SUCH DAMAGE.
2835863739SMike Smith  */
2935863739SMike Smith 
30da4882c2SMarius Strobl #if 0
3135863739SMike Smith /*
3235863739SMike Smith  * Status codes for block read/write commands, etc.
3335863739SMike Smith  *
3435863739SMike Smith  * XXX many of these would not normally be returned, as they are
3535863739SMike Smith  * relevant only to FSA operations.
3635863739SMike Smith  */
37da4882c2SMarius Strobl static const struct aac_code_lookup aac_command_status_table[] = {
386352e2e2SEd Maste 	{"OK",					ST_OK},
396352e2e2SEd Maste 	{"operation not permitted",		ST_PERM},
406352e2e2SEd Maste 	{"not found",				ST_NOENT},
416352e2e2SEd Maste 	{"I/O error",				ST_IO},
426352e2e2SEd Maste 	{"device not configured",		ST_NXIO},
436352e2e2SEd Maste 	{"too big",				ST_E2BIG},
446352e2e2SEd Maste 	{"permission denied",			ST_ACCES},
456352e2e2SEd Maste 	{"file exists",				ST_EXIST},
466352e2e2SEd Maste 	{"cross-device link",			ST_XDEV},
476352e2e2SEd Maste 	{"operation not supported by device",	ST_NODEV},
486352e2e2SEd Maste 	{"not a directory",			ST_NOTDIR},
496352e2e2SEd Maste 	{"is a directory",			ST_ISDIR},
506352e2e2SEd Maste 	{"invalid argument",			ST_INVAL},
516352e2e2SEd Maste 	{"file too large",			ST_FBIG},
526352e2e2SEd Maste 	{"no space on device",			ST_NOSPC},
536352e2e2SEd Maste 	{"readonly filesystem",			ST_ROFS},
546352e2e2SEd Maste 	{"too many links",			ST_MLINK},
556352e2e2SEd Maste 	{"operation would block",		ST_WOULDBLOCK},
566352e2e2SEd Maste 	{"file name too long",			ST_NAMETOOLONG},
576352e2e2SEd Maste 	{"directory not empty",			ST_NOTEMPTY},
586352e2e2SEd Maste 	{"quota exceeded",			ST_DQUOT},
596352e2e2SEd Maste 	{"stale file handle",			ST_STALE},
606352e2e2SEd Maste 	{"too many levels of remote in path",	ST_REMOTE},
616352e2e2SEd Maste 	{"device busy (spinning up)",		ST_NOT_READY},
626352e2e2SEd Maste 	{"bad file handle",			ST_BADHANDLE},
636352e2e2SEd Maste 	{"not sync",				ST_NOT_SYNC},
646352e2e2SEd Maste 	{"bad cookie",				ST_BAD_COOKIE},
656352e2e2SEd Maste 	{"operation not supported",		ST_NOTSUPP},
666352e2e2SEd Maste 	{"too small",				ST_TOOSMALL},
676352e2e2SEd Maste 	{"server fault",			ST_SERVERFAULT},
686352e2e2SEd Maste 	{"bad type",				ST_BADTYPE},
696352e2e2SEd Maste 	{"jukebox",				ST_JUKEBOX},
706352e2e2SEd Maste 	{"not mounted",				ST_NOTMOUNTED},
716352e2e2SEd Maste 	{"in maintenance mode",			ST_MAINTMODE},
726352e2e2SEd Maste 	{"stale ACL",				ST_STALEACL},
736352e2e2SEd Maste 	{"bus reset - command aborted",		ST_BUS_RESET},
7435863739SMike Smith 	{NULL, 					0},
7535863739SMike Smith 	{"unknown command status",		0}
7635863739SMike Smith };
7735863739SMike Smith 
7835863739SMike Smith #define AAC_COMMAND_STATUS(x)	aac_describe_code(aac_command_status_table, x)
79da4882c2SMarius Strobl #endif
8035863739SMike Smith 
81da4882c2SMarius Strobl static const struct aac_code_lookup aac_cpu_variant[] = {
8235863739SMike Smith 	{"i960JX",		CPUI960_JX},
8335863739SMike Smith 	{"i960CX",		CPUI960_CX},
8435863739SMike Smith 	{"i960HX",		CPUI960_HX},
8535863739SMike Smith 	{"i960RX",		CPUI960_RX},
867cb209f5SScott Long 	{"i960 80303",		CPUI960_80303},
8735863739SMike Smith 	{"StrongARM SA110",	CPUARM_SA110},
887cb209f5SScott Long 	{"PPC603e",		CPUPPC_603e},
897cb209f5SScott Long 	{"XScale 80321",	CPU_XSCALE_80321},
907cb209f5SScott Long 	{"MIPS 4KC",		CPU_MIPS_4KC},
917cb209f5SScott Long 	{"MIPS 5KC",		CPU_MIPS_5KC},
9235863739SMike Smith 	{"Unknown StrongARM",	CPUARM_xxx},
9335863739SMike Smith 	{"Unknown PowerPC",	CPUPPC_xxx},
9435863739SMike Smith 	{NULL, 0},
9535863739SMike Smith 	{"Unknown processor",	0}
9635863739SMike Smith };
9735863739SMike Smith 
98da4882c2SMarius Strobl static const struct aac_code_lookup aac_battery_platform[] = {
9935863739SMike Smith 	{"required battery present",		PLATFORM_BAT_REQ_PRESENT},
10035863739SMike Smith 	{"REQUIRED BATTERY NOT PRESENT",	PLATFORM_BAT_REQ_NOTPRESENT},
10135863739SMike Smith 	{"optional battery present",		PLATFORM_BAT_OPT_PRESENT},
10235863739SMike Smith 	{"optional battery not installed",	PLATFORM_BAT_OPT_NOTPRESENT},
10335863739SMike Smith 	{"no battery support",			PLATFORM_BAT_NOT_SUPPORTED},
10435863739SMike Smith 	{NULL, 0},
10535863739SMike Smith 	{"unknown battery platform",		0}
10635863739SMike Smith };
10735863739SMike Smith 
108da4882c2SMarius Strobl static const struct aac_code_lookup aac_container_types[] = {
10935863739SMike Smith 	{"Volume",		CT_VOLUME},
11035863739SMike Smith 	{"RAID 1 (Mirror)",	CT_MIRROR},
11135863739SMike Smith 	{"RAID 0 (Stripe)",	CT_STRIPE},
11235863739SMike Smith 	{"RAID 5",		CT_RAID5},
11335863739SMike Smith 	{"SSRW",		CT_SSRW},
11435863739SMike Smith 	{"SSRO",		CT_SSRO},
11535863739SMike Smith 	{"Morph",		CT_MORPH},
11635863739SMike Smith 	{"Passthrough",		CT_PASSTHRU},
11735863739SMike Smith 	{"RAID 4",		CT_RAID4},
1188ea9ab66SScott Long 	{"RAID 0/1",		CT_RAID10},
1198ea9ab66SScott Long 	{"RAID 0/0",		CT_RAID00},
12035863739SMike Smith 	{"Volume of Mirrors",	CT_VOLUME_OF_MIRRORS},
12135863739SMike Smith 	{"Pseudo RAID 3",	CT_PSEUDO_RAID3},
1228ea9ab66SScott Long 	{"RAID 0/5",		CT_RAID50},
1237cb209f5SScott Long 	{"RAID 5D",		CT_RAID5D},
1247cb209f5SScott Long 	{"RAID 0/5D",		CT_RAID5D0},
1257cb209f5SScott Long 	{"RAID 1E",		CT_RAID1E},
1267cb209f5SScott Long 	{"RAID 6",		CT_RAID6},
1277cb209f5SScott Long 	{"RAID 0/6",		CT_RAID60},
12835863739SMike Smith 	{NULL, 0},
12935863739SMike Smith 	{"unknown",		0}
13035863739SMike Smith };
131