mpapi_scsi_vhci.h revision 8c4f8890c870d3bd16cbcaeed2dc4679d5e076b5
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(_BIT_FIELDS_LTOH) && !defined(_BIT_FIELDS_HTOL)
#endif /* _BIT_FIELDS_LTOH */
/* Structure for MP_OID (kernel level only) */
typedef struct mp_oid {
#if defined(_BIT_FIELDS_HTOL)
seq_id:24;
#else
type:8;
#endif
} mp_oid_t;
typedef union mpoid {
} mpoid_t;
/*
* MP API item - A generic one to use in a list setup
* in a common way for all types of elements of
* Object type items required for mpapi.
*/
typedef struct mpapi_item {
void *idata; /* item data */
typedef struct mpapi_item_list {
struct mpapi_item_list *next;
/*
* MP API item header definition.
*/
typedef struct mpapi_list_header {
/*
* Structure to maintain mp api initiator data.
*/
typedef struct mpapi_initiator_data {
void *resp; /* phci */
int valid;
/*
* Structure to maintain mp api lu data.
*/
typedef struct mpapi_lu_data {
void *resp; /* vlun */
int valid;
/*
* Structure to maintain mp api path data.
*/
typedef struct mpapi_path_data {
void *resp; /* pip */
char *path_name;
int valid;
/*
* Structure to maintain mp api tpg data.
*/
typedef struct mpapi_tpg_data {
void *resp; /* target port prop, but non-unique */
int valid;
/*
* Structure to maintain mp api tport data.
*/
typedef struct mpapi_tport_data {
void *resp; /* target port prop */
int valid;
/* Structure for mpapi private data */
typedef struct mpapi_priv {
/*
* Will be initialized with the lbolt value(lower
* 32 bits) at the time of initialization. This will
* enable detection of stale OIDs used by the
* upper layers.
*/
/*
* The Seq number space is unique within an Object
* type - that is there can be a seq# 2 in Object type
* 'initiator Port' and also a seq#2 in object type
* 'Path LU'. Even though the seq space collides,
* the unique type field(Object type) will make them
* distinct.
* The following field will indicate what the next
* sequence number that can be used for a particular
* type of Object type - Object type will be used to
* index into the array element.
*/
/*
* One list for each type of object.
*/
/*
* Still to do.. LBA
*/
} mpapi_priv_t;
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SCSI_ADAPTERS_MPAPI_SCSI_VHCI_H */