10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 50Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 60Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 70Sstevel@tonic-gate * with the License. 80Sstevel@tonic-gate * 90Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 100Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 110Sstevel@tonic-gate * See the License for the specific language governing permissions 120Sstevel@tonic-gate * and limitations under the License. 130Sstevel@tonic-gate * 140Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 150Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 160Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 170Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 180Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 190Sstevel@tonic-gate * 200Sstevel@tonic-gate * CDDL HEADER END 210Sstevel@tonic-gate */ 220Sstevel@tonic-gate /* 23*789Sahrens * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #ifndef _SYS_DADA_IMPL_IDENTIFY_H 280Sstevel@tonic-gate #define _SYS_DADA_IMPL_IDENTIFY_H 290Sstevel@tonic-gate 300Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 310Sstevel@tonic-gate 320Sstevel@tonic-gate #ifdef __cplusplus 330Sstevel@tonic-gate extern "C" { 340Sstevel@tonic-gate #endif 350Sstevel@tonic-gate 360Sstevel@tonic-gate /* 370Sstevel@tonic-gate * Implementation identify data. 380Sstevel@tonic-gate */ 390Sstevel@tonic-gate struct dcd_identify { 400Sstevel@tonic-gate ushort_t dcd_config; /* 0 general configuration bits */ 410Sstevel@tonic-gate ushort_t dcd_fixcyls; /* 1 # of fixed cylinders */ 420Sstevel@tonic-gate ushort_t dcd_remcyls; /* 2 # of removable cylinders */ 430Sstevel@tonic-gate ushort_t dcd_heads; /* 3 # of heads */ 440Sstevel@tonic-gate ushort_t dcd_trksiz; /* 4 # of unformatted bytes/track */ 450Sstevel@tonic-gate ushort_t dcd_secsiz; /* 5 # of unformatted bytes/sector */ 460Sstevel@tonic-gate ushort_t dcd_sectors; /* 6 # of sectors/track */ 470Sstevel@tonic-gate ushort_t dcd_resv1[3]; /* 7 "Vendor Unique" */ 480Sstevel@tonic-gate char dcd_drvser[20]; /* 10 Serial number */ 490Sstevel@tonic-gate ushort_t dcd_buftype; /* 20 Buffer type */ 500Sstevel@tonic-gate ushort_t dcd_bufsz; /* 21 Buffer size in 512 byte incr */ 510Sstevel@tonic-gate ushort_t dcd_ecc; /* 22 # of ecc bytes avail on rd/wr */ 520Sstevel@tonic-gate char dcd_fw[8]; /* 23 Firmware revision */ 530Sstevel@tonic-gate char dcd_model[40]; /* 27 Model # */ 540Sstevel@tonic-gate ushort_t dcd_mult1; /* 47 Multiple command flags */ 550Sstevel@tonic-gate ushort_t dcd_dwcap; /* 48 Doubleword capabilities */ 560Sstevel@tonic-gate ushort_t dcd_cap; /* 49 Capabilities */ 570Sstevel@tonic-gate ushort_t dcd_resv2; /* 50 Reserved */ 580Sstevel@tonic-gate ushort_t dcd_piomode; /* 51 PIO timing mode */ 590Sstevel@tonic-gate ushort_t dcd_dmamode; /* 52 DMA timing mode */ 600Sstevel@tonic-gate ushort_t dcd_validinfo; /* 53 bit0: wds 54-58, bit1: 64-70 */ 610Sstevel@tonic-gate ushort_t dcd_curcyls; /* 54 # of current cylinders */ 620Sstevel@tonic-gate ushort_t dcd_curheads; /* 55 # of current heads */ 630Sstevel@tonic-gate ushort_t dcd_cursectrk; /* 56 # of current sectors/track */ 640Sstevel@tonic-gate ushort_t dcd_cursccp[2]; /* 57 current sectors capacity */ 650Sstevel@tonic-gate ushort_t dcd_mult2; /* 59 multiple sectors info */ 660Sstevel@tonic-gate ushort_t dcd_addrsec[2]; /* 60 LBA only: no of addr secs */ 670Sstevel@tonic-gate ushort_t dcd_sworddma; /* 62 single word dma modes */ 680Sstevel@tonic-gate ushort_t dcd_dworddma; /* 63 double word dma modes */ 690Sstevel@tonic-gate ushort_t dcd_advpiomode; /* 64 advanced PIO modes supported */ 700Sstevel@tonic-gate ushort_t dcd_minmwdma; /* 65 min multi-word dma cycle info */ 710Sstevel@tonic-gate ushort_t dcd_recmwdma; /* 66 rec multi-word dma cycle info */ 720Sstevel@tonic-gate ushort_t dcd_minpio; /* 67 min PIO cycle info */ 730Sstevel@tonic-gate ushort_t dcd_minpioflow; /* 68 min PIO cycle info w/flow ctl */ 74*789Sahrens ushort_t dcd_padding1[11]; /* 69 pad to 79 */ 75*789Sahrens ushort_t dcd_majvers; /* 80 ATA major version supported */ 76*789Sahrens ushort_t dcd_padding2[4]; /* 81 pad to 84 */ 77*789Sahrens ushort_t dcd_features85; /* 85 feature enabled bits */ 78*789Sahrens ushort_t dcd_padding3[2]; /* 86 pad to 87 */ 790Sstevel@tonic-gate ushort_t dcd_ultra_dma; /* 88 Ultra dma capability */ 80*789Sahrens ushort_t dcd_padding4[37]; /* 89 pad to 125 */ 810Sstevel@tonic-gate ushort_t dcd_lastlun; /* 126 last logical unit number */ 82*789Sahrens ushort_t dcd_padding5[129]; /* pad to 255 */ 830Sstevel@tonic-gate }; 840Sstevel@tonic-gate 850Sstevel@tonic-gate 860Sstevel@tonic-gate /* 870Sstevel@tonic-gate * Indentify data size definition 880Sstevel@tonic-gate */ 890Sstevel@tonic-gate 900Sstevel@tonic-gate #define SUN_IDENTSIZE (sizeof (struct dcd_identify)) 910Sstevel@tonic-gate 920Sstevel@tonic-gate /* 930Sstevel@tonic-gate * The following are the bit for dcd_config field 940Sstevel@tonic-gate */ 950Sstevel@tonic-gate #define ATAPI_DEVICE (1 << 15) 960Sstevel@tonic-gate #define ATANON_REMOVABLE (1 << 6) 970Sstevel@tonic-gate 980Sstevel@tonic-gate /* 990Sstevel@tonic-gate * The following are the bit defined word 64 1000Sstevel@tonic-gate */ 1010Sstevel@tonic-gate #define PIO_MODE4_MASK 0x02 1020Sstevel@tonic-gate #define PIO_MODE3_MASK 0x01 1030Sstevel@tonic-gate 104*789Sahrens /* 105*789Sahrens * The following are bits for dcd_majvers, word 80 106*789Sahrens */ 107*789Sahrens #define IDENTIFY_80_ATAPI_4 0x0010 108*789Sahrens 109*789Sahrens /* 110*789Sahrens * The following are the bits for dcd_features85, word 85 111*789Sahrens */ 112*789Sahrens #define IDENTIFY_85_WCE (1 << 5) 113*789Sahrens 1140Sstevel@tonic-gate #ifdef __cplusplus 1150Sstevel@tonic-gate } 1160Sstevel@tonic-gate #endif 1170Sstevel@tonic-gate 1180Sstevel@tonic-gate #endif /* _SYS_DADA_IMPL_IDENTIFY_H */ 119