Home | History | Annotate | Line # | Download | only in scsipi
scsi_disk.h revision 1.32.16.1
      1  1.32.16.1    martin /*	$NetBSD: scsi_disk.h,v 1.32.16.1 2020/04/08 14:08:12 martin Exp $	*/
      2        1.5       cgd 
      3        1.1       cgd /*
      4       1.11    bouyer  * SCSI-specific interface description
      5        1.4   mycroft  */
      6        1.4   mycroft 
      7        1.4   mycroft /*
      8        1.4   mycroft  * Some lines of this file come from a file of the name "scsi.h"
      9        1.1       cgd  * distributed by OSF as part of mach2.5,
     10        1.1       cgd  *  so the following disclaimer has been kept.
     11        1.1       cgd  *
     12        1.1       cgd  * Copyright 1990 by Open Software Foundation,
     13        1.1       cgd  * Grenoble, FRANCE
     14        1.1       cgd  *
     15        1.1       cgd  * 		All Rights Reserved
     16       1.12     enami  *
     17        1.1       cgd  *   Permission to use, copy, modify, and distribute this software and
     18        1.1       cgd  * its documentation for any purpose and without fee is hereby granted,
     19        1.1       cgd  * provided that the above copyright notice appears in all copies and
     20        1.1       cgd  * that both the copyright notice and this permission notice appear in
     21        1.1       cgd  * supporting documentation, and that the name of OSF or Open Software
     22        1.1       cgd  * Foundation not be used in advertising or publicity pertaining to
     23        1.1       cgd  * distribution of the software without specific, written prior
     24        1.1       cgd  * permission.
     25       1.12     enami  *
     26        1.1       cgd  *   OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
     27        1.1       cgd  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
     28        1.1       cgd  * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
     29        1.1       cgd  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
     30        1.1       cgd  * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
     31        1.1       cgd  * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
     32        1.1       cgd  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     33        1.1       cgd  */
     34        1.1       cgd 
     35        1.1       cgd /*
     36        1.1       cgd  * Largely written by Julian Elischer (julian (at) tfs.com)
     37        1.1       cgd  * for TRW Financial Systems.
     38        1.1       cgd  *
     39        1.1       cgd  * TRW Financial Systems, in accordance with their agreement with Carnegie
     40        1.1       cgd  * Mellon University, makes this software available to CMU to distribute
     41       1.12     enami  * or use in any manner that they see fit as long as this message is kept with
     42        1.1       cgd  * the software. For this reason TFS also grants any other persons or
     43        1.1       cgd  * organisations permission to use or modify this software.
     44        1.1       cgd  *
     45        1.1       cgd  * TFS supplies this software to be publicly redistributed
     46        1.1       cgd  * on the understanding that TFS is not responsible for the correct
     47        1.1       cgd  * functioning of this software in any circumstances.
     48        1.1       cgd  *
     49        1.1       cgd  * Ported to run under 386BSD by Julian Elischer (julian (at) tfs.com) Sept 1992
     50        1.1       cgd  */
     51        1.1       cgd 
     52        1.1       cgd /*
     53        1.1       cgd  * SCSI command format
     54        1.1       cgd  */
     55       1.22      matt #ifndef _DEV_SCSIPI_SCSI_DISK_H_
     56       1.22      matt #define _DEV_SCSIPI_SCSI_DISK_H_
     57       1.17   thorpej 
     58       1.17   thorpej /*
     59       1.17   thorpej  * XXX Is this also used by ATAPI?
     60       1.17   thorpej  */
     61       1.17   thorpej #define	SCSI_FORMAT_UNIT		0x04
     62       1.17   thorpej struct scsi_format_unit {
     63       1.30   reinoud 	u_int8_t opcode;
     64       1.30   reinoud 	u_int8_t flags;
     65       1.17   thorpej #define	SFU_DLF_MASK	0x07
     66       1.17   thorpej #define	SFU_CMPLST	0x08
     67       1.17   thorpej #define	SFU_FMTDATA	0x10
     68       1.30   reinoud 	u_int8_t vendor_specific;
     69       1.30   reinoud 	u_int8_t interleave[2];
     70       1.30   reinoud 	u_int8_t control;
     71       1.17   thorpej };
     72       1.17   thorpej 
     73       1.17   thorpej /*
     74  1.32.16.1    martin  * If the FmtData bit is set, a FORMAT UNIT parameter list is transferred
     75       1.17   thorpej  * to the target during the DATA OUT phase.  The parameter list includes
     76       1.17   thorpej  *
     77       1.17   thorpej  *	Defect list header
     78       1.17   thorpej  *	Initialization pattern descriptor (if any)
     79       1.17   thorpej  *	Defect descriptor(s) (if any)
     80       1.17   thorpej  */
     81       1.17   thorpej 
     82       1.17   thorpej struct scsi_format_unit_defect_list_header {
     83       1.30   reinoud 	u_int8_t reserved;
     84       1.30   reinoud 	u_int8_t flags;
     85       1.17   thorpej #define	DLH_VS		0x01		/* vendor specific */
     86       1.17   thorpej #define	DLH_IMMED	0x02		/* immediate return */
     87       1.17   thorpej #define	DLH_DSP		0x04		/* disable saving parameters */
     88       1.17   thorpej #define	DLH_IP		0x08		/* initialization pattern */
     89       1.17   thorpej #define	DLH_STPF	0x10		/* stop format */
     90       1.17   thorpej #define	DLH_DCRT	0x20		/* disable certification */
     91       1.17   thorpej #define	DLH_DPRY	0x40		/* disable primary */
     92       1.17   thorpej #define	DLH_FOV		0x80		/* format options valid */
     93       1.30   reinoud 	u_int8_t defect_lst_len[2];
     94       1.17   thorpej };
     95       1.17   thorpej 
     96       1.17   thorpej /*
     97       1.17   thorpej  * See Table 117 of the SCSI-2 specification for a description of
     98       1.17   thorpej  * the IP modifier.
     99       1.17   thorpej  */
    100       1.17   thorpej struct scsi_initialization_pattern_descriptor {
    101       1.30   reinoud 	u_int8_t ip_modifier;
    102       1.30   reinoud 	u_int8_t pattern_type;
    103       1.17   thorpej #define	IP_TYPE_DEFAULT		0x01
    104       1.17   thorpej #define	IP_TYPE_REPEAT		0x01
    105       1.17   thorpej 				/* 0x02 -> 0x7f: reserved */
    106       1.17   thorpej 				/* 0x80 -> 0xff: vendor-specific */
    107       1.30   reinoud 	u_int8_t pattern_length[2];
    108       1.17   thorpej #if 0
    109       1.30   reinoud 	u_int8_t pattern[...];
    110       1.17   thorpej #endif
    111       1.17   thorpej };
    112       1.17   thorpej 
    113       1.17   thorpej /*
    114       1.17   thorpej  * Defect desciptors.  These are used as the defect lists in the FORMAT UNIT
    115       1.17   thorpej  * and READ DEFECT DATA commands, and as the translate page of the
    116       1.17   thorpej  * SEND DIAGNOSTIC and RECEIVE DIAGNOSTIC RESULTS commands.
    117       1.17   thorpej  */
    118       1.17   thorpej 
    119       1.17   thorpej /* Block format */
    120       1.17   thorpej struct scsi_defect_descriptor_bf {
    121       1.30   reinoud 	u_int8_t block_address[4];
    122       1.17   thorpej };
    123       1.17   thorpej 
    124       1.17   thorpej /* Bytes from index format */
    125       1.17   thorpej struct scsi_defect_descriptor_bfif {
    126       1.30   reinoud 	u_int8_t cylinder[3];
    127       1.30   reinoud 	u_int8_t head;
    128       1.30   reinoud 	u_int8_t bytes_from_index[4];
    129       1.17   thorpej };
    130       1.17   thorpej 
    131       1.17   thorpej /* Physical sector format */
    132       1.17   thorpej struct scsi_defect_descriptor_psf {
    133       1.30   reinoud 	u_int8_t cylinder[3];
    134       1.30   reinoud 	u_int8_t head;
    135       1.30   reinoud 	u_int8_t sector[4];
    136       1.17   thorpej };
    137        1.1       cgd 
    138       1.11    bouyer /*
    139       1.11    bouyer  * XXX for now this isn't in the ATAPI specs, but if there are on day
    140       1.11    bouyer  * ATAPI hard disks, it is likely that they implement this command (or a
    141       1.11    bouyer  * command like this ?
    142       1.11    bouyer  */
    143       1.11    bouyer #define	SCSI_REASSIGN_BLOCKS		0x07
    144        1.7   mycroft struct scsi_reassign_blocks {
    145       1.30   reinoud 	u_int8_t opcode;
    146       1.30   reinoud 	u_int8_t byte2;
    147       1.30   reinoud 	u_int8_t unused[3];
    148       1.30   reinoud 	u_int8_t control;
    149       1.13   thorpej };
    150       1.13   thorpej 
    151       1.13   thorpej /*
    152       1.13   thorpej  * XXX Is this also used by ATAPI?
    153       1.13   thorpej  */
    154       1.13   thorpej #define	SCSI_REZERO_UNIT		0x01
    155       1.13   thorpej struct scsi_rezero_unit {
    156       1.30   reinoud 	u_int8_t opcode;
    157       1.30   reinoud 	u_int8_t byte2;
    158       1.30   reinoud 	u_int8_t reserved[3];
    159       1.30   reinoud 	u_int8_t control;
    160        1.1       cgd };
    161        1.1       cgd 
    162       1.25   thorpej #define	SCSI_READ_6_COMMAND		0x08
    163       1.25   thorpej #define SCSI_WRITE_6_COMMAND		0x0a
    164       1.25   thorpej struct scsi_rw_6 {
    165       1.30   reinoud 	u_int8_t opcode;
    166       1.30   reinoud 	u_int8_t addr[3];
    167        1.4   mycroft #define	SRW_TOPADDR	0x1F	/* only 5 bits here */
    168       1.30   reinoud 	u_int8_t length;
    169       1.30   reinoud 	u_int8_t control;
    170       1.16   thorpej };
    171       1.16   thorpej 
    172       1.16   thorpej /*
    173       1.16   thorpej  * XXX Does ATAPI have an equivalent?
    174       1.16   thorpej  */
    175       1.26   thorpej #define	SCSI_SYNCHRONIZE_CACHE_10	0x35
    176       1.26   thorpej struct scsi_synchronize_cache_10 {
    177       1.30   reinoud 	u_int8_t opcode;
    178       1.30   reinoud 	u_int8_t flags;
    179       1.27   thorpej #define	SSC_RELADR	0x01		/* obsolete */
    180       1.16   thorpej #define	SSC_IMMED	0x02
    181       1.27   thorpej #define	SSC_SYNC_NV	0x04
    182       1.30   reinoud 	u_int8_t addr[4];
    183       1.30   reinoud 	u_int8_t byte7;
    184       1.30   reinoud 	u_int8_t length[2];
    185       1.30   reinoud 	u_int8_t control;
    186        1.1       cgd };
    187        1.1       cgd 
    188       1.28  ginsbach /*
    189       1.28  ginsbach  * XXX Does ATAPI have an equivalent?
    190       1.28  ginsbach  */
    191       1.28  ginsbach #define SCSI_READ_DEFECT_DATA		0x37
    192       1.28  ginsbach struct scsi_read_defect_data {
    193       1.30   reinoud 	 u_int8_t opcode;
    194       1.30   reinoud 	 u_int8_t byte2;
    195       1.28  ginsbach #define RDD_PRIMARY	0x10
    196       1.28  ginsbach #define RDD_GROWN	0x08
    197       1.28  ginsbach #define RDD_BF		0x00
    198       1.28  ginsbach #define RDD_BFIF	0x04
    199       1.28  ginsbach #define RDD_PSF		0x05
    200       1.30   reinoud 	 u_int8_t flags;
    201       1.30   reinoud 	 u_int8_t reserved[4];
    202       1.30   reinoud 	 u_int8_t length[2];
    203       1.30   reinoud 	 u_int8_t control;
    204       1.28  ginsbach };
    205       1.28  ginsbach 
    206       1.27   thorpej #define	SCSI_SYNCHRONIZE_CACHE_16	0x91
    207       1.27   thorpej struct scsi_synchronize_cache_16 {
    208       1.30   reinoud 	u_int8_t opcode;
    209       1.30   reinoud 	u_int8_t flags;			/* see SYNCHRONIZE CACHE (10) */
    210       1.30   reinoud 	u_int8_t addr[8];
    211       1.30   reinoud 	u_int8_t length[4];
    212       1.30   reinoud 	u_int8_t byte15;
    213       1.30   reinoud 	u_int8_t control;
    214       1.27   thorpej };
    215       1.27   thorpej 
    216       1.11    bouyer /* DATAs definitions for the above commands */
    217        1.1       cgd 
    218        1.7   mycroft struct scsi_reassign_blocks_data {
    219       1.30   reinoud 	u_int8_t reserved[2];
    220       1.30   reinoud 	u_int8_t length[2];
    221        1.7   mycroft 	struct {
    222       1.30   reinoud 		u_int8_t dlbaddr[4];
    223        1.1       cgd 	} defect_descriptor[1];
    224        1.1       cgd };
    225        1.1       cgd 
    226       1.28  ginsbach struct scsi_read_defect_data_data {
    227       1.30   reinoud 	u_int8_t reserved;
    228       1.30   reinoud 	u_int8_t flags;
    229       1.30   reinoud 	u_int8_t length[2];
    230       1.28  ginsbach 	union scsi_defect_descriptor {
    231       1.28  ginsbach 		struct scsi_defect_descriptor_bf bf;
    232       1.28  ginsbach 		struct scsi_defect_descriptor_bfif bfif;
    233       1.28  ginsbach 		struct scsi_defect_descriptor_psf psf;
    234       1.28  ginsbach 	} defect_descriptor[1];
    235       1.28  ginsbach };
    236       1.28  ginsbach 
    237       1.11    bouyer union scsi_disk_pages {
    238        1.9   mycroft #define	DISK_PGCODE	0x3F	/* only 6 bits valid */
    239       1.32      flxd 	struct page_err_recov {
    240       1.32      flxd 		u_int8_t pg_code;	/* page code (should be 1) */
    241       1.32      flxd 		u_int8_t pg_length;	/* page length (should be 0x0a) */
    242       1.32      flxd 		u_int8_t flags;		/* error recovery flags */
    243       1.32      flxd #define	ERR_RECOV_DCR	0x01		/* disable correction */
    244       1.32      flxd #define	ERR_RECOV_DTE	0x02		/* disable transfer on error */
    245       1.32      flxd #define	ERR_RECOV_PER	0x04		/* post error */
    246       1.32      flxd #define	ERR_RECOV_EER	0x08		/* enable early recovery */
    247       1.32      flxd #define	ERR_RECOV_RC	0x10		/* read continuous */
    248       1.32      flxd #define	ERR_RECOV_TB	0x20		/* transfer block */
    249       1.32      flxd #define	ERR_RECOV_ARRE	0x40		/* autom. read reallocation enable */
    250       1.32      flxd #define	ERR_RECOV_AWRE	0x80		/* autom. write reallocation enable */
    251       1.32      flxd 		u_int8_t rd_retry_ct;	/* read retry count */
    252       1.32      flxd 		u_int8_t corr_span;	/* correction span */
    253       1.32      flxd 		u_int8_t hd_off_ct;	/* head offset count */
    254       1.32      flxd 		u_int8_t dat_strb_off_ct; /* data strobe offset count */
    255       1.32      flxd 		u_int8_t reserved1;
    256       1.32      flxd 		u_int8_t wr_retry_ct;	/* write retry count */
    257       1.32      flxd 		u_int8_t reserved2;
    258       1.32      flxd 		u_int8_t recov_tm_lim[2]; /* recovery time limit */
    259       1.32      flxd 	} err_recov_params;
    260        1.1       cgd 	struct page_disk_format {
    261       1.30   reinoud 		u_int8_t pg_code;	/* page code (should be 3) */
    262       1.30   reinoud 		u_int8_t pg_length;	/* page length (should be 0x16) */
    263       1.30   reinoud 		u_int8_t trk_z[2];	/* tracks per zone */
    264       1.30   reinoud 		u_int8_t alt_sec[2];	/* alternate sectors per zone */
    265       1.30   reinoud 		u_int8_t alt_trk_z[2];	/* alternate tracks per zone */
    266       1.30   reinoud 		u_int8_t alt_trk_v[2];	/* alternate tracks per volume */
    267       1.30   reinoud 		u_int8_t ph_sec_t[2];	/* physical sectors per track */
    268       1.30   reinoud 		u_int8_t bytes_s[2];	/* bytes per sector */
    269       1.30   reinoud 		u_int8_t interleave[2];	/* interleave */
    270       1.30   reinoud 		u_int8_t trk_skew[2];	/* track skew factor */
    271       1.30   reinoud 		u_int8_t cyl_skew[2];	/* cylinder skew */
    272       1.30   reinoud 		u_int8_t flags;		/* various */
    273        1.9   mycroft #define	DISK_FMT_SURF	0x10
    274        1.9   mycroft #define	DISK_FMT_RMB	0x20
    275        1.9   mycroft #define	DISK_FMT_HSEC	0x40
    276        1.9   mycroft #define	DISK_FMT_SSEC	0x80
    277       1.32      flxd 		u_int8_t reserved1;
    278       1.30   reinoud 		u_int8_t reserved2;
    279       1.30   reinoud 		u_int8_t reserved3;
    280        1.1       cgd 	} disk_format;
    281        1.1       cgd 	struct page_rigid_geometry {
    282       1.30   reinoud 		u_int8_t pg_code;	/* page code (should be 4) */
    283       1.30   reinoud 		u_int8_t pg_length;	/* page length (should be 0x16)	*/
    284       1.30   reinoud 		u_int8_t ncyl[3];	/* number of cylinders */
    285       1.30   reinoud 		u_int8_t nheads;	/* number of heads */
    286       1.30   reinoud 		u_int8_t st_cyl_wp[3];	/* starting cyl., write precomp */
    287       1.30   reinoud 		u_int8_t st_cyl_rwc[3];	/* starting cyl., red. write cur */
    288       1.30   reinoud 		u_int8_t driv_step[2];	/* drive step rate */
    289       1.30   reinoud 		u_int8_t land_zone[3];	/* landing zone cylinder */
    290       1.30   reinoud 		u_int8_t sp_sync_ctl;	/* spindle synch control */
    291        1.8   thorpej #define SPINDLE_SYNCH_MASK	0x03	/* mask of valid bits */
    292        1.8   thorpej #define SPINDLE_SYNCH_NONE	0x00	/* synch disabled or not supported */
    293        1.8   thorpej #define SPINDLE_SYNCH_SLAVE	0x01	/* disk is a slave */
    294        1.8   thorpej #define SPINDLE_SYNCH_MASTER	0x02	/* disk is a master */
    295        1.8   thorpej #define SPINDLE_SYNCH_MCONTROL	0x03	/* disk is a master control */
    296       1.30   reinoud 		u_int8_t rot_offset;	/* rotational offset (for spindle synch) */
    297       1.30   reinoud 		u_int8_t reserved1;
    298       1.30   reinoud 		u_int8_t rpm[2];	/* media rotation speed */
    299       1.30   reinoud 		u_int8_t reserved2;
    300       1.30   reinoud 		u_int8_t reserved3;
    301        1.1       cgd     	} rigid_geometry;
    302       1.10  christos 	struct page_flex_geometry {
    303       1.30   reinoud 		u_int8_t pg_code;	/* page code (should be 5) */
    304       1.30   reinoud 		u_int8_t pg_length;	/* page length (should be 0x1e) */
    305       1.30   reinoud 		u_int8_t xfr_rate[2];
    306       1.30   reinoud 		u_int8_t nheads;	/* number of heads */
    307       1.30   reinoud 		u_int8_t ph_sec_tr;	/* physical sectors per track */
    308       1.30   reinoud 		u_int8_t bytes_s[2];	/* bytes per sector */
    309       1.30   reinoud 		u_int8_t ncyl[2];	/* number of cylinders */
    310       1.30   reinoud 		u_int8_t st_cyl_wp[2];	/* start cyl., write precomp */
    311       1.30   reinoud 		u_int8_t st_cyl_rwc[2];	/* start cyl., red. write cur */
    312       1.30   reinoud 		u_int8_t driv_step[2];	/* drive step rate */
    313       1.30   reinoud 		u_int8_t driv_step_w;	/* drive step pulse width */
    314       1.30   reinoud 		u_int8_t head_settle[2];/* head settle delay */
    315       1.30   reinoud 		u_int8_t motor_on;	/* motor on delay */
    316       1.30   reinoud 		u_int8_t motor_off;	/* motor off delay */
    317       1.30   reinoud 		u_int8_t flags;		/* various flags */
    318       1.10  christos #define MOTOR_ON		0x20	/* motor on (pin 16)? */
    319       1.10  christos #define START_AT_SECTOR_1	0x40	/* start at sector 1  */
    320       1.10  christos #define READY_VALID		0x20	/* RDY (pin 34) valid */
    321       1.30   reinoud 		u_int8_t step_p_cyl;	/* step pulses per cylinder */
    322       1.30   reinoud 		u_int8_t write_pre;	/* write precompensation */
    323       1.30   reinoud 		u_int8_t head_load;	/* head load delay */
    324       1.30   reinoud 		u_int8_t head_unload;	/* head unload delay */
    325       1.30   reinoud 		u_int8_t pin_34_2;	/* pin 34 (6) pin 2 (7/11) definition */
    326       1.30   reinoud 		u_int8_t pin_4_1;	/* pin 4 (8/9) pin 1 (13) definition */
    327       1.30   reinoud 		u_int8_t rpm[2];	/* rotational rate */
    328       1.32      flxd 		u_int8_t reserved1;
    329       1.32      flxd 		u_int8_t reserved2;
    330       1.10  christos 	} flex_geometry;
    331       1.18   thorpej 	struct page_caching {
    332       1.30   reinoud 		u_int8_t pg_code;	/* page code (should be 8) */
    333       1.30   reinoud 		u_int8_t pg_length;	/* page length (should be 0x0a) */
    334       1.30   reinoud 		u_int8_t flags;		/* cache parameter flags */
    335       1.18   thorpej #define	CACHING_RCD	0x01		/* read cache disable */
    336       1.18   thorpej #define	CACHING_MF	0x02		/* multiplcation factor */
    337       1.18   thorpej #define	CACHING_WCE	0x04		/* write cache enable (write-back) */
    338       1.20   thorpej #define	CACHING_SIZE	0x08		/* use CACHE SEGMENT SIZE */
    339       1.20   thorpej #define	CACHING_DISC	0x10		/* pftch across time discontinuities */
    340       1.20   thorpej #define	CACHING_CAP	0x20		/* caching analysis permitted */
    341       1.20   thorpej #define	CACHING_ABPF	0x40		/* abort prefetch */
    342       1.20   thorpej #define	CACHING_IC	0x80		/* initiator control */
    343       1.30   reinoud 		u_int8_t ret_prio;	/* retention priority */
    344       1.18   thorpej #define	READ_RET_PRIO_SHIFT 4
    345       1.18   thorpej #define	RET_PRIO_DONT_DISTINGUISH	0x0
    346       1.18   thorpej #define	RET_PRIO_REPLACE_READ_WRITE	0x1
    347       1.18   thorpej #define	RET_PRIO_REPLACE_PREFETCH	0xf
    348       1.30   reinoud 		u_int8_t dis_prefetch_xfer_len[2];
    349       1.30   reinoud 		u_int8_t min_prefetch[2];
    350       1.30   reinoud 		u_int8_t max_prefetch[2];
    351       1.30   reinoud 		u_int8_t max_prefetch_ceiling[2];
    352       1.30   reinoud 		u_int8_t flags2;	/* additional cache param flags */
    353       1.20   thorpej #define	CACHING2_VS0	0x08		/* vendor specific bit */
    354       1.20   thorpej #define	CACHING2_VS1	0x10		/* vendor specific bit */
    355       1.20   thorpej #define	CACHING2_DRA	0x20		/* disable read ahead */
    356       1.20   thorpej #define	CACHING2_LBCSS	0x40		/* CACHE SEGMENT SIZE is blocks */
    357       1.20   thorpej #define	CACHING2_FSW	0x80		/* force sequential write */
    358       1.30   reinoud 		u_int8_t num_cache_segments;
    359       1.30   reinoud 		u_int8_t cache_segment_size[2];
    360       1.30   reinoud 		u_int8_t reserved1;
    361       1.30   reinoud 		u_int8_t non_cache_segment_size[2];
    362       1.19   thorpej 	} caching_params;
    363       1.23  wrstuden 	struct page_control {
    364       1.30   reinoud 		u_int8_t pg_code;	/* page code (should be 0x0a) */
    365       1.30   reinoud 		u_int8_t pg_length;	/* page length (should be 0x0a) */
    366       1.30   reinoud 		u_int8_t ctl_flags1;	/* First set of flags */
    367       1.23  wrstuden #define CTL1_TST_PER_INTR 	0x40	/* Task set per initiator */
    368       1.23  wrstuden #define CTL1_TST_FIELD		0xe0	/* Full field */
    369       1.23  wrstuden #define CTL1_D_SENSE		0x04	/* Descriptor-format sense return */
    370       1.23  wrstuden #define CTL1_GLTSD		0x02	/* Glob. Log Targ. Save Disable */
    371       1.23  wrstuden #define CTL1_RLEC		0x01	/* Rpt Logging Exception Condition */
    372       1.30   reinoud 		u_int8_t ctl_flags2;	/* Second set of flags */
    373       1.23  wrstuden #define CTL2_QAM_UNRESTRICT 0x10	/* Unrestricted reordering allowed */
    374       1.23  wrstuden #define CTL2_QAM_FIELD		0xf0	/* Full Queue alogo. modifier field */
    375       1.23  wrstuden #define CTL2_QERR_ABRT		0x02	/* Queue error - abort all */
    376       1.23  wrstuden #define CTL2_QERR_ABRT_SELF	0x06	/* Queue error - abort intr's */
    377       1.23  wrstuden #define CTL2_QERR_FIELD		0x06	/* Full field */
    378       1.23  wrstuden #define CTL2_DQUE		0x01	/* Disable queuing */
    379       1.30   reinoud 		u_int8_t ctl_flags3;	/* Third set of flags */
    380       1.23  wrstuden #define CTL3_TAS		0x80	/* other-intr aborts generate status */
    381       1.23  wrstuden #define CTL3_RAC		0x40	/* Report A Check */
    382       1.23  wrstuden #define CTL3_UAIC_RET		0x10	/* retain UA, see SPC-3 */
    383       1.23  wrstuden #define CTL3_UAIC_RET_EST	0x30	/* retain UA and establish UA */
    384       1.23  wrstuden #define CTL3_UA_INTRLOCKS	0x30	/* UA Interlock control field */
    385       1.23  wrstuden #define CTL3_SWP		0x08	/* Software write protect */
    386       1.23  wrstuden #define CTL3_RAERP		0x04	/* (unit) Ready AER Permission */
    387       1.23  wrstuden #define CTL3_UAAERP		0x02	/* Unit Attention AER Permission */
    388       1.23  wrstuden #define CTL3_EAERP		0x01	/* Error AER Permission */
    389       1.30   reinoud 		u_int8_t ctl_autoload;	/* autoload mode control */
    390       1.23  wrstuden #define CTL_AUTOLOAD_FIELD	0x07	/* autoload field */
    391       1.30   reinoud 		u_int8_t ctl_r_hld[2];	/* RAERP holdoff period */
    392       1.30   reinoud 		u_int8_t ctl_busy[2];	/* busy timeout period */
    393       1.30   reinoud 		u_int8_t ctl_selt[2];	/* extended self-test completion time */
    394       1.23  wrstuden 	} control_params;
    395        1.7   mycroft };
    396       1.22      matt 
    397       1.22      matt #endif /* _DEV_SCSIPI_SCSI_DISK_H_ */
    398