mode.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) 1996-1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_SCSI_IMPL_MODE_H
#define _SYS_SCSI_IMPL_MODE_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
*
* Implementation Specific variations
*/
/*
* Variations to Sequential Access device mode header
*/
struct modeheader_seq {
#if defined(_BIT_FIELDS_LTOH)
#elif defined(_BIT_FIELDS_HTOL)
#else
#endif /* _BIT_FIELDS_LTOH */
struct block_descriptor blk_desc;
};
/*
* Variations to Direct Access device pages
*/
/*
* Page 1: CCS error recovery page was a little different than SCSI-2/3
*/
#define PAGELENGTH_DAD_MODE_ERR_RECOV_CCS 0x06
struct mode_err_recov_ccs {
#if defined(_BIT_FIELDS_LTOH)
#elif defined(_BIT_FIELDS_HTOL)
#else
#endif /* _BIT_FIELDS_LTOH */
};
/*
* Page 3: CCS Direct Access Device Format Parameters
*
* The 0x8 bit in the Drive Type byte is used in CCS
* as an INHIBIT SAVE bit. This bit is not in SCSI-2/3.
*/
#define _reserved_ins ins
/*
* Page 8: SCSI-2 Cache page was a little different than SCSI-3
*/
#define PAGELENGTH_DAD_MODE_CACHE 0x0A
struct mode_cache {
#if defined(_BIT_FIELDS_LTOH)
: 5;
#elif defined(_BIT_FIELDS_HTOL)
uchar_t : 5,
#else
#endif /* _BIT_FIELDS_LTOH */
};
/*
* Page 0x38 - This is the CCS Cache Page
*/
struct mode_cache_ccs {
};
/*
* Page A: SCSI-2 control page was a little different than SCSI-3
*/
#define PAGELENGTH_MODE_CONTROL 0x06
struct mode_control {
#if defined(_BIT_FIELDS_LTOH)
: 7;
: 2,
uaaenp : 1,
raenp : 1,
: 4,
eeca : 1;
#elif defined(_BIT_FIELDS_HTOL)
uchar_t : 7,
: 2,
: 4,
raenp : 1,
uaaenp : 1,
eanp : 1;
#else
#endif /* _BIT_FIELDS_LTOH */
};
/*
* This is apparently not used, although the MD21
* documentation refers to it.
*
* The medium_type in the mode header must be 0x80
* to indicate a vendor unique format. There is then
* a standard block descriptor page, which must be
* zeros (although the block descriptor length is set
* appropriately in the mode header).
*
* After this stuff, comes the vendor unique ESDI
* format parameters for the MD21.
*
* Notes:
*
*
* 2) The logical number of cylinders should be the
* number of physical cylinders less three (3) reserved
* for use by the drive, and less any alternate cylinders
* allocated.
*
* 3) head skew- see MD21 manual.
*/
struct emulex_format_params {
#if defined(_BIT_FIELDS_LTOH)
uchar_t : 1,
#elif defined(_BIT_FIELDS_HTOL)
: 1;
#else
#endif /* _BIT_FIELDS_LTOH */
};
/*
* Page 0x31: CD-ROM speed page
*/
#define CDROM_MODE_SPEED 0x31
struct mode_speed {
};
/*
* Definitions for drive speed supported are in cdio.h
*/
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SCSI_IMPL_MODE_H */