scdk.h revision 7c70629e029d553bf3c4b18894d5fe1b224f420d
/*
* 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-1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_DKTP_SCDK_H
#define _SYS_DKTP_SCDK_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
struct scdk {
short scd_secshf;
short scd_blkshf;
unsigned scd_resv : 3;
unsigned char scd_type; /* device type */
unsigned char scd_ctype; /* controller type */
unsigned char scd_options; /* drive options */
long scd_pktflag; /* scsi packet flag option */
int (*scd_cdioctl)(); /* indirect func for cdioctl */
int scd_drvready; /* drive has been started */
void (*scd_cbfunc)(); /* ptr to cmdk_devstatus() */
void *scd_cbarg; /* ptr to (struct cmdk *) */
};
/*
* Local definitions, for clarity of code
*/
/*
* Parameters
*/
#define SD_IO_TIME 60
#define SD_RETRY_COUNT 5
#define SD_OPEN_RETRY_COUNT 2
#define SCDK_IOSTART 0
#define SCDK_IOCONT 1
#define SCDK_RTYCNT 3
#define SCDK_GETGEOM_SEC(X) ((X) & 0xff)
}
/* use 10 byte cdbs */
#define SCDK_OPTION_CDB10_FLAG 1
#define SCDK_OPTION_CDB10(scdkp) \
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_DKTP_SCDK_H */