uscsi.h revision 602ca9ea8f9ce0933f0944601cc5d230e91a950d
/*
* 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.
*/
/*
* Defines for user SCSI commands *
*/
#ifndef _SYS_SCSI_IMPL_USCSI_H
#define _SYS_SCSI_IMPL_USCSI_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* definition for user-scsi command structure
*/
struct uscsi_cmd {
int uscsi_flags; /* read, write, etc. see below */
short uscsi_status; /* resulting status */
short uscsi_timeout; /* Command Timeout */
};
#if defined(_SYSCALL32)
struct uscsi_cmd32 {
int uscsi_flags; /* read, write, etc. see below */
short uscsi_status; /* resulting status */
short uscsi_timeout; /* Command Timeout */
};
#endif /* _SYSCALL32 */
/*
* flags for uscsi_flags field
*/
/*
* generic flags
*/
#define USCSI_RESET_TARGET \
USCSI_RESET /* Reset target */
#define USCSI_PATH_INSTANCE \
0x00080000 /* use path instance for transport */
/*
* suitable for parallel SCSI bus only
*/
/*
* the following flags should not be used at user level but may
* be used by a scsi target driver for internal commands
*/
/*
* generic flags
*/
/*
* suitable for parallel SCSI bus only
*/
struct uscsi_rqs {
int rqs_flags; /* see below */
};
#if defined(_SYSCALL32)
struct uscsi_rqs32 {
int rqs_flags; /* see below */
};
#endif /* _SYSCALL32 */
/*
* uscsi_rqs flags
*/
/*
* User SCSI io control command
*/
#ifdef _KERNEL
int scsi_uscsi_alloc_and_copyin(intptr_t, int,
struct scsi_address *, struct uscsi_cmd **);
struct buf *, void *);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SCSI_IMPL_USCSI_H */