xref: /freebsd/sys/dev/aac/aac_tables.h (revision 35863739)
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},
4335863739SMike Smith     {"permission denoed",			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},
6935863739SMike Smith     {"in maintenace 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},
8235863739SMike Smith     {"StrongARM SA110",		CPUARM_SA110},
8335863739SMike Smith     {"PowerPC 603e",		CPUPPC_603e},
8435863739SMike Smith     {"Unknown StrongARM",	CPUARM_xxx},
8535863739SMike Smith     {"Unknown PowerPC",		CPUPPC_xxx},
8635863739SMike Smith     {NULL, 0},
8735863739SMike Smith     {"Unknown processor",	0}
8835863739SMike Smith };
8935863739SMike Smith 
9035863739SMike Smith static struct aac_code_lookup aac_battery_platform[] = {
9135863739SMike Smith     {"required battery present",	PLATFORM_BAT_REQ_PRESENT},
9235863739SMike Smith     {"REQUIRED BATTERY NOT PRESENT",	PLATFORM_BAT_REQ_NOTPRESENT},
9335863739SMike Smith     {"optional battery present",	PLATFORM_BAT_OPT_PRESENT},
9435863739SMike Smith     {"optional battery not installed",	PLATFORM_BAT_OPT_NOTPRESENT},
9535863739SMike Smith     {"no battery support",		PLATFORM_BAT_NOT_SUPPORTED},
9635863739SMike Smith     {NULL, 0},
9735863739SMike Smith     {"unknown battery platform",	0}
9835863739SMike Smith };
9935863739SMike Smith 
10035863739SMike Smith static struct aac_code_lookup aac_container_types[] = {
10135863739SMike Smith     {"Volume",			CT_VOLUME},
10235863739SMike Smith     {"RAID 1 (Mirror)",		CT_MIRROR},
10335863739SMike Smith     {"RAID 0 (Stripe)",		CT_STRIPE},
10435863739SMike Smith     {"RAID 5",			CT_RAID5},
10535863739SMike Smith     {"SSRW",			CT_SSRW},
10635863739SMike Smith     {"SSRO",			CT_SSRO},
10735863739SMike Smith     {"Morph",			CT_MORPH},
10835863739SMike Smith     {"Passthrough",		CT_PASSTHRU},
10935863739SMike Smith     {"RAID 4",			CT_RAID4},
11035863739SMike Smith     {"RAID 10",			CT_RAID10},
11135863739SMike Smith     {"RAID 00",			CT_RAID00},
11235863739SMike Smith     {"Volume of Mirrors",	CT_VOLUME_OF_MIRRORS},
11335863739SMike Smith     {"Pseudo RAID 3",		CT_PSEUDO_RAID3},
11435863739SMike Smith     {NULL, 0},
11535863739SMike Smith     {"unknown",			0}
11635863739SMike Smith };
11735863739SMike Smith 
118