lm_l700.c revision cee0fb94c0d4227de0a00efc162fb2739844b641
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "lm_acs.h"
#define L700_156 156
#define L700_156_R 168
#define L700_216 216
#define L700_216_R 228
#define L700_324 324
#define L700_324_R 336
#define L700_384 384
#define L700_384_R 396
#define L700_618 618
#define L700_618_R 630
#define L700_678 678
#define L700_678_R 690
#define L700_MAX_DRIVE 40
#define L700_CONFIG_1 "config task [\"%d\"] scope [full] \
bay [\"panel 0\" true] \
bay [\"panel 1\" true] \
bay [\"panel 2\" true] %s; "
#define L700_CONFIG_2 "config task [\"%d\"] scope [full] \
bay [\"panel 0\" true] \
bay [\"panel 1\" true] \
bay [\"panel 2\" true] \
bay [\"panel 3\" true] %s; "
#define L700_GROUP_1 "slotgroup [\"group 0\" \"panel 0\" none \"ordinary\"] \
slotgroup [\"group 1\" \"panel 1\" none \"ordinary\"] \
slotgroup [\"group 2\" \"panel 2\" none \"ordinary\"] \
slotgroup [\"group cap0\" \"panel 1\" both \"port\"]"
#define L700_GROUP_1A "slotgroup [\"group 0\" \"panel 0\" none \"ordinary\"] \
slotgroup [\"group 1\" \"panel 1\" none \"ordinary\"] \
slotgroup [\"group 2\" \"panel 2\" none \"ordinary\"] \
slotgroup [\"group cap0\" \"panel 1\" both \"port\"] \
slotgroup [\"group cap1\" \"panel 1\" both \"port\"]"
#define L700_GROUP_2 "slotgroup [\"group 0\" \"panel 0\" none \"ordinary\"] \
slotgroup [\"group 1\" \"panel 1\" none \"ordinary\"] \
slotgroup [\"group 2\" \"panel 2\" none \"ordinary\"] \
slotgroup [\"group 3\" \"panel 3\" none \"ordinary\"] \
slotgroup [\"group cap0\" \"panel 1\" both \"port\"]"
#define L700_GROUP_2A "slotgroup [\"group 0\" \"panel 0\" none \"ordinary\"] \
slotgroup [\"group 1\" \"panel 1\" none \"ordinary\"] \
slotgroup [\"group 2\" \"panel 2\" none \"ordinary\"] \
slotgroup [\"group 3\" \"panel 3\" none \"ordinary\"] \
slotgroup [\"group cap0\" \"panel 1\" both \"port\"] \
slotgroup [\"group cap1\" \"panel 1\" both \"port\"]"
static acs_drive_t acs_drives;
int
char *ret_msg)
{
int i;
int num_caps;
char cap_name[MAX_CAP_SIZE];
const char *bay_str;
char *grp_str;
"number of panels in L700 library");
return (LM_ERROR);
}
LM_ERROR) {
"in L700 library failed");
return (LM_ERROR);
}
"acs_query_cap");
"acs_query_cap() failed, defaulting to one cap "
return (LM_ERROR);
}
num_caps++;
}
for (i = 0; i < MAX_L700_CAPS; i++) {
"group cap%d", i);
if (i < num_caps)
else
acs_caps[i].cap_config = 0;
}
"library - %d", num_caps);
if (num_caps == 1)
else if (num_caps == 2)
else {
"invalid number of "
}
} else {
if (num_caps == 1)
else if (num_caps == 2)
else {
"invalid number of "
}
}
return (LM_OK);
}