1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24*0Sstevel@tonic-gate * Use is subject to license terms. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate #ifndef _SYS_DADA_IMPL_IDENTIFY_H 28*0Sstevel@tonic-gate #define _SYS_DADA_IMPL_IDENTIFY_H 29*0Sstevel@tonic-gate 30*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*0Sstevel@tonic-gate 32*0Sstevel@tonic-gate #ifdef __cplusplus 33*0Sstevel@tonic-gate extern "C" { 34*0Sstevel@tonic-gate #endif 35*0Sstevel@tonic-gate 36*0Sstevel@tonic-gate /* 37*0Sstevel@tonic-gate * Implementation identify data. 38*0Sstevel@tonic-gate */ 39*0Sstevel@tonic-gate struct dcd_identify { 40*0Sstevel@tonic-gate ushort_t dcd_config; /* 0 general configuration bits */ 41*0Sstevel@tonic-gate ushort_t dcd_fixcyls; /* 1 # of fixed cylinders */ 42*0Sstevel@tonic-gate ushort_t dcd_remcyls; /* 2 # of removable cylinders */ 43*0Sstevel@tonic-gate ushort_t dcd_heads; /* 3 # of heads */ 44*0Sstevel@tonic-gate ushort_t dcd_trksiz; /* 4 # of unformatted bytes/track */ 45*0Sstevel@tonic-gate ushort_t dcd_secsiz; /* 5 # of unformatted bytes/sector */ 46*0Sstevel@tonic-gate ushort_t dcd_sectors; /* 6 # of sectors/track */ 47*0Sstevel@tonic-gate ushort_t dcd_resv1[3]; /* 7 "Vendor Unique" */ 48*0Sstevel@tonic-gate char dcd_drvser[20]; /* 10 Serial number */ 49*0Sstevel@tonic-gate ushort_t dcd_buftype; /* 20 Buffer type */ 50*0Sstevel@tonic-gate ushort_t dcd_bufsz; /* 21 Buffer size in 512 byte incr */ 51*0Sstevel@tonic-gate ushort_t dcd_ecc; /* 22 # of ecc bytes avail on rd/wr */ 52*0Sstevel@tonic-gate char dcd_fw[8]; /* 23 Firmware revision */ 53*0Sstevel@tonic-gate char dcd_model[40]; /* 27 Model # */ 54*0Sstevel@tonic-gate ushort_t dcd_mult1; /* 47 Multiple command flags */ 55*0Sstevel@tonic-gate ushort_t dcd_dwcap; /* 48 Doubleword capabilities */ 56*0Sstevel@tonic-gate ushort_t dcd_cap; /* 49 Capabilities */ 57*0Sstevel@tonic-gate ushort_t dcd_resv2; /* 50 Reserved */ 58*0Sstevel@tonic-gate ushort_t dcd_piomode; /* 51 PIO timing mode */ 59*0Sstevel@tonic-gate ushort_t dcd_dmamode; /* 52 DMA timing mode */ 60*0Sstevel@tonic-gate ushort_t dcd_validinfo; /* 53 bit0: wds 54-58, bit1: 64-70 */ 61*0Sstevel@tonic-gate ushort_t dcd_curcyls; /* 54 # of current cylinders */ 62*0Sstevel@tonic-gate ushort_t dcd_curheads; /* 55 # of current heads */ 63*0Sstevel@tonic-gate ushort_t dcd_cursectrk; /* 56 # of current sectors/track */ 64*0Sstevel@tonic-gate ushort_t dcd_cursccp[2]; /* 57 current sectors capacity */ 65*0Sstevel@tonic-gate ushort_t dcd_mult2; /* 59 multiple sectors info */ 66*0Sstevel@tonic-gate ushort_t dcd_addrsec[2]; /* 60 LBA only: no of addr secs */ 67*0Sstevel@tonic-gate ushort_t dcd_sworddma; /* 62 single word dma modes */ 68*0Sstevel@tonic-gate ushort_t dcd_dworddma; /* 63 double word dma modes */ 69*0Sstevel@tonic-gate ushort_t dcd_advpiomode; /* 64 advanced PIO modes supported */ 70*0Sstevel@tonic-gate ushort_t dcd_minmwdma; /* 65 min multi-word dma cycle info */ 71*0Sstevel@tonic-gate ushort_t dcd_recmwdma; /* 66 rec multi-word dma cycle info */ 72*0Sstevel@tonic-gate ushort_t dcd_minpio; /* 67 min PIO cycle info */ 73*0Sstevel@tonic-gate ushort_t dcd_minpioflow; /* 68 min PIO cycle info w/flow ctl */ 74*0Sstevel@tonic-gate ushort_t dcd_padding1[19]; /* 69 pad to 87 */ 75*0Sstevel@tonic-gate ushort_t dcd_ultra_dma; /* 88 Ultra dma capability */ 76*0Sstevel@tonic-gate ushort_t dcd_padding2[37]; /* 89 pad to 125 */ 77*0Sstevel@tonic-gate ushort_t dcd_lastlun; /* 126 last logical unit number */ 78*0Sstevel@tonic-gate ushort_t dcd_padding3[129]; /* pad to 255 */ 79*0Sstevel@tonic-gate }; 80*0Sstevel@tonic-gate 81*0Sstevel@tonic-gate 82*0Sstevel@tonic-gate /* 83*0Sstevel@tonic-gate * Indentify data size definition 84*0Sstevel@tonic-gate */ 85*0Sstevel@tonic-gate 86*0Sstevel@tonic-gate #define SUN_IDENTSIZE (sizeof (struct dcd_identify)) 87*0Sstevel@tonic-gate 88*0Sstevel@tonic-gate /* 89*0Sstevel@tonic-gate * The following are the bit for dcd_config field 90*0Sstevel@tonic-gate */ 91*0Sstevel@tonic-gate #define ATAPI_DEVICE (1 << 15) 92*0Sstevel@tonic-gate #define ATANON_REMOVABLE (1 << 6) 93*0Sstevel@tonic-gate 94*0Sstevel@tonic-gate /* 95*0Sstevel@tonic-gate * The following are the bit defined word 64 96*0Sstevel@tonic-gate */ 97*0Sstevel@tonic-gate #define PIO_MODE4_MASK 0x02 98*0Sstevel@tonic-gate #define PIO_MODE3_MASK 0x01 99*0Sstevel@tonic-gate 100*0Sstevel@tonic-gate #ifdef __cplusplus 101*0Sstevel@tonic-gate } 102*0Sstevel@tonic-gate #endif 103*0Sstevel@tonic-gate 104*0Sstevel@tonic-gate #endif /* _SYS_DADA_IMPL_IDENTIFY_H */ 105