/*
* 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 2012 Nexenta Systems, Inc. All rights reserved.
*/
#include <stddef.h>
#include <strings.h>
#include <scsi/libses_plugin.h>
#include "ses2_impl.h"
static int
{
return (0);
return (0);
}
/*ARGSUSED*/
static void *
{
int i, pos;
&index) == 0);
&type) == 0);
return (0);
break;
sizeof (dep->sadei_length);
break;
type != SES_ET_DEVICE &&
type != SES_ET_ARRAY_DEVICE) {
/*
* We can't really do anything with this, because
* while the standard requires that these descriptors
* be in the same order as those in the status page,
* some element types may optionally include AES
* data. This means we cannot know which element
* this descriptor refers to unless EIP is 1. Sadly,
* the standard only says that this "should" be true.
* It's impossible to guess what use this is supposed
* to have otherwise. See 6.1.13.1.
*/
continue;
/*
* The element index field from AES descriptor is
* element only index which doesn't include the OVERALL
* STATUS fields so we should compare with
* SES_PROP_ELEMENT_ONLY_INDEX not
* SES_PROP_ELEMENT_INDEX.
*/
continue;
return (dep);
}
}
return (NULL);
}
/*ARGSUSED*/
static void *
{
&index) == 0);
*len = sizeof (ses2_threshold_impl_t);
return (NULL);
}
/*ARGSUSED*/
static void *
{
int i;
return (NULL);
return (NULL);
/*
* This variable-length list of variable-length strings format sucks
* for performance; we ALWAYS have to walk the whole bloody thing to
* find a particular node's entry.
*/
i < index; i++) {
return (NULL);
}
return (NULL);
if (!SES_WITHIN_PAGE(dp,
return (NULL);
return (dp->sedi_descriptor);
}
/*ARGSUSED*/
static void *
{
&index) != 0)
return (NULL);
return (NULL);
*len = sizeof (ses2_elem_status_impl_t);
}
/*ARGSUSED*/
static size_t
{
return (nelem * sizeof (ses2_elem_ctl_impl_t) +
}
/*ARGSUSED*/
static void *
ses_node_t *np)
{
void *data;
&index) != 0) {
"for enclosure node");
return (NULL);
}
/*
* if control element was already modified "select" field is non-zero,
* so skip setting default values to avoid fields overriding
*/
return (data);
return (NULL);
return (data);
}
/*ARGSUSED*/
static size_t
{
}
/*ARGSUSED*/
static size_t
{
return (nelem * sizeof (ses2_threshold_impl_t) +
}
/*ARGSUSED*/
static void *
ses_node_t *np)
{
void *data;
&index) == 0);
/* check if threshold is dirty, so no need to set default values */
tip->sti_low_warn) != 0)
return (data);
return (NULL);
return (data);
}
/*ARGSUSED*/
static size_t
{
return (datalen +
}
/*ARGSUSED*/
static size_t
{
}
/*ARGSUSED*/
static void *
ses_node_t *np)
{
(void) ses_error(ESES_BAD_TYPE,
"microcode download page only valid for enclosure "
"nodes");
return (NULL);
}
return (data);
}
/*ARGSUSED*/
static size_t
{
return (sizeof (ses2_subnick_ctl_page_impl_t));
}
{
.spd_gcoff = -1
},
{
},
{
},
{
.spd_gcoff = -1
},
{
.spd_gcoff = -1
},
{
.spd_gcoff =
},
{
},
{
},
{
},
{
.spd_gcoff =
},
{
.spd_gcoff = -1
},
{
.spd_gcoff =
},
{
.spd_gcoff =
},
/* Control pages */
{
},
{
.spd_gcoff = -1
},
{
.spd_gcoff =
},
{
.spd_gcoff =
},
{
.spd_gcoff =
},
{
.spd_gcoff =
},
{
.spd_pagenum = -1,
.spd_gcoff = -1
}
};