i2o_scsi_util.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 (c) 1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _I2O_SCSI_UTIL_H
#define _I2O_SCSI_UTIL_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Utility msg synchronization condvar
*/
#define UTIL_MSG_SLEEP 0
#define UTIL_MSG_WAKEUP 1
/*
* Utility Parameter's mutex
*/
/*
* Defines for parameter size
*/
#define ONE_PARAM_BLOCK (sizeof (i2o_param_operations_list_header_t)\
+ sizeof (i2o_param_operation_specific_template_t) \
+ sizeof (uint32_t))
#define ALL_PARAM_BLOCK (sizeof (i2o_param_operations_list_header_t)\
+ sizeof (i2o_param_operation_all_template_t) \
+ sizeof (uint16_t))
/*
* Utility message's transaction context
*/
struct i2ohba_util {
int wakeup; /* value */
int status; /* status of reply msg */
void *i2ohba_util_buffer; /* result operation block */
};
/*
* Util_Params_Get Op on all Parameters
*/
typedef struct i2o_setparam {
/* i2o_message_frame_t */
union {
struct {
} s2;
} u2;
/* i2o_util_params_set_message */
/* SGL: i2o_sge_immediate_data_elememnt */
/* size == ONE_PARAM_BLOCK */
/* i2o_param_operation_list_header */
/* i2o_param_operation_specific_template */
/* SGL: i2o_sge_simple_element */
typedef struct i2o_setparam_reply {
/* i2o_param_results_list_header_t */
/* i2o_param_modify_operation_result */
/* ErrorInformation (if any) */
#define ALL_UTILPARAMS 0x01
#define SYNC_UTILPARAM 0x02
/*
* Util_Params_Get Op on all Parameters
*/
typedef struct i2o_getallparam {
/* i2o_message_frame_t */
union {
struct {
} s2;
} u2;
/* i2o_util_params_get_message */
/* SGL: i2o_sge_immediate_data_elememnt */
/* size == ALL_PARAM_BLOCK */
/* i2o_param_operation_list_header */
/* i2o_param_operation_all_template */
/* SGL: i2o_sge_simple_element */
typedef struct i2o_getallparam_reply {
/* i2o_param_results_list_header_t */
/* i2o_param_read_operation_result */
/* ListOfValues */
/*
* Util_Params_Get Op on Synch and Offset
*/
typedef struct i2o_getsyncparam {
/* i2o_message_frame_t */
union {
struct {
} s2;
} u2;
/* i2o_util_params_get_message */
/* SGL: i2o_sge_immediate_data_elememnt */
/* size == ONE_PARAM_BLOCK */
/* i2o_param_operation_list_header */
/* i2o_param_operation_specific_template */
/* SGL: i2o_sge_simple_element */
typedef struct i2o_getsyncparam_reply {
/* i2o_param_results_list_header_t */
/* i2o_param_read_operation_result */
/* ListOfValues */
#ifdef __cplusplus
}
#endif
#endif /* _I2O_SCSI_UTIL_H */