sgendef.h revision 275c9da86e89f8abf71135cf63d9fc23671b2e60
/*
* 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.
*/
/*
* Copyright Siemens 1999
* All rights reserved.
*/
#ifndef _SYS_SCSI_TARGETS_SGENDEF_H
#define _SYS_SCSI_TARGETS_SGENDEF_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#if defined(_KERNEL)
struct sgen_errstats {
};
typedef struct sgen_state {
int sgen_flags; /* see SGEN_FL_* */
char *sgen_rqs_sen; /* sense buffer */
int sgen_arq_enabled; /* auto request sense enabled */
int sgen_diag; /* diagnostic output level */
} sgen_state_t;
/*
* Convenience accessors for sgen_state_t.
*/
/*
*/
#define SGEN_SET_OPEN(stp) \
#define SGEN_CLR_OPEN(stp) \
#define SGEN_IS_OPEN(stp) \
#define SGEN_SET_SUSP(stp) \
#define SGEN_CLR_SUSP(stp) \
#define SGEN_IS_SUSP(stp) \
#define SGEN_SET_BUSY(stp) \
#define SGEN_CLR_BUSY(stp) \
#define SGEN_IS_BUSY(stp) \
#define SGEN_SET_EXCL(stp) \
#define SGEN_CLR_EXCL(stp) \
#define SGEN_IS_EXCL(stp) \
/*
* These structures form the driver's database of binding information.
* Inquiry strings and device types from the inquiry-config-list and
* device-type-config-list properties are stored.
*/
typedef struct sgen_inq_node {
char *node_vendor; /* up to 8 character vendor */
char *node_product; /* up to 16 character product */
struct sgen_inq_node *node_next;
typedef struct sgen_type_node {
struct sgen_type_node *node_next;
struct sgen_binddb {
int sdb_init; /* has this been initialized? */
};
/*
* Time to wait before a retry for commands returning Busy Status
*/
/*
* sgen_callback action codes
*/
#define COMMAND_DONE 0 /* command completed, biodone it */
/* fetch */
#endif /* defined(_KERNEL) */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SCSI_TARGETS_SGENDEF_H */