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