blk2scsa.h revision 4bb7efa72ed531c10f097919636e67724ec4c25a
/*
* 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.
*/
#ifndef _SYS_SCSI_ADAPTERS_BLK2SCSA_H
#define _SYS_SCSI_ADAPTERS_BLK2SCSA_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct b2s_nexus_info b2s_nexus_info_t;
typedef struct b2s_leaf_info b2s_leaf_info_t;
typedef struct b2s_media b2s_media_t;
typedef struct b2s_inquiry b2s_inquiry_t;
typedef struct b2s_request b2s_request_t;
typedef struct b2s_nexus b2s_nexus_t;
typedef struct b2s_leaf b2s_leaf_t;
struct b2s_media {
};
struct b2s_inquiry {
const char *inq_vendor;
const char *inq_product;
const char *inq_revision;
const char *inq_serial;
};
struct b2s_nexus_info {
int nexus_version;
void *nexus_private;
};
struct b2s_leaf_info {
const char *leaf_unique_id;
};
#define B2S_LEAF_REMOVABLE (1U << 0)
/* these values reserved! */
typedef enum {
B2S_CMD_GETMEDIA = 0, /* get content */
} b2s_cmd_t;
typedef enum {
B2S_EOK = 0, /* success */
/* these are framework internal use only */
/* used internally for array sizing, must be last */
B2S_NERRS = 23
} b2s_err_t;
/* framework internal flags */
struct b2s_request {
/* note that this member should come last for future expansion */
union {
} br_args;
};
int b2s_mod_init(struct modlinkage *);
void b2s_mod_fini(struct modlinkage *);
/* used as version to alloc_hba */
#define B2S_VERSION_0 0
void b2s_free_nexus(b2s_nexus_t *);
int b2s_attach_nexus(b2s_nexus_t *);
int b2s_detach_nexus(b2s_nexus_t *);
void b2s_detach_leaf(b2s_leaf_t *);
/*
* Address information.
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SCSI_ADAPTERS_BLK2SCSA_H */