sun_spms.c revision 791a814c934fcd4deb13b26c1f116ff283272a0d
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stddef.h>
#include <string.h>
#include <strings.h>
#include <alloca.h>
#include <scsi/libses_plugin.h>
/*
* Sun SPMS-1 r106, section 4.2.4 - Configuration
* Sun SPMS r106, section 4.1.3.1, Table 8 - Sun Feature Definition
* SES-2 r20, section 6.1.2.2, Table 7 - Enclosure Descriptor
* SPC-4 r14, section 6.4.2, Table 121 - Std. INQUIRY data format
*
* Vendor Specific Enclosure Information:
* (The below offsets are relative to the SES2 Enclosure Descriptor.)
* Sun Feature Block, starts at offset 0x28, size 20 bytes
* Platform specific content, starts at offset 0x64, variable size
*
*/
#pragma pack(1)
typedef struct ses_sun_spms_vs {
char ssvs_spms_header[4];
ssvs_int :1);
#pragma pack()
/*ARGSUSED*/
static int
{
char *csn;
int nverr;
return (0);
return (0);
return (0);
return (0);
if (cid_len < 4)
return (0);
/*
* The offset read from the Sun Feature Block needs to be adjusted
* so that the difference in the sizes of the Enclosure
* Descriptor and the INQUIRY data format is accounted for.
*/
return (0);
return (0);
}
int
{
};
&config) != 0);
}