i2o_scsi_var.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_VAR_H
#define _I2O_SCSI_VAR_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Convenient defines
*/
/*
* Local static data
*/
#define I2OHBA_CMD_NSEGS 17
#define I2O_OSM_TID 0x01
/*
* Targets supported
*/
#define N_I2OHBA_LUNS 8
#define N_I2OHBA_TARGETS 8
#define N_I2OHBA_TARGETS_WIDE 16
/*
* message module defines
*/
#define ContextSize32 0x51
#define ContextSize64 0x71
/*
* Default scsi-options
*/
#define I2OHBA_DEFAULT_SCSI_OPTIONS \
SCSI_OPTIONS_DR | \
SCSI_OPTIONS_TAG | \
/*
* Mutex short hands
*/
/*
* HBA interface macros
*/
/*
* Capability defines
*/
#define I2OHBA_CAP_DISCONNECT 0x8000
#define I2OHBA_CAP_PARITY 0x4000
#define I2OHBA_CAP_WIDE 0x2000
#define I2OHBA_CAP_SYNC 0x1000
#define I2OHBA_CAP_TAG 0x0800
#define I2OHBA_CAP_AUTOSENSE 0x0400
#define I2OHBA_CAP_ERRSTOP 0x0200
#define I2OHBA_CAP_ERRSYNC 0x0100
/*
* delay time for polling loops
*/
/*
* value used to force bus reset in i2ohab_i_reset_interface()
*/
#define I2OHBA_FORCE_BUS_RESET 0x02
/*
* timeout values
*/
typedef struct i2o_tid_scsi_ent {
struct i2ohba {
/*
* Message request double link list chain
*/
struct i2ohba_cmd *i2ohba_reqhead;
struct i2ohba_cmd *i2ohba_reqtail;
/*
* Mutex for the request or reply link list
*/
/*
* Mutex for utilparam msg or reset param msg
*/
/*
* Bus Adapter's Tid
*/
/*
* i2ohba shutdown flag
*/
/*
* i2ohba clear queue
*/
/*
* i2ohba timeout id
*/
/*
* flag for updating properties in i2ohba_i_watch()
* to avoid updating in interrupt context
*/
/*
* (dynamically changed by the target)
*/
/*
* Transport structure for this instance of the hba
*/
/*
* dev_info_t reference can be found in the transport structure
*/
/*
* IOP access handle (The IOP controls/associated with dip)
*/
/*
* Bus Adapter's Param
*/
/*
*/
/*
* scsi options, etc from ddi_getprop()
* default value from the UtilParamGet
*/
int i2ohba_scsi_options; /* default one */
int i2ohba_initiator_id;
/*
* scsi_reset_delay for i2o
*/
};
#ifdef __cplusplus
}
#endif
#endif /* _I2O_SCSI_VAR_H */