17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 57c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 67c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 77c478bd9Sstevel@tonic-gate * with the License. 87c478bd9Sstevel@tonic-gate * 97c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate * and limitations under the License. 137c478bd9Sstevel@tonic-gate * 147c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate * 207c478bd9Sstevel@tonic-gate * CDDL HEADER END 217c478bd9Sstevel@tonic-gate */ 227c478bd9Sstevel@tonic-gate /* 23*fa9e4066Sahrens * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #ifndef _SYS_DADA_IMPL_IDENTIFY_H 287c478bd9Sstevel@tonic-gate #define _SYS_DADA_IMPL_IDENTIFY_H 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #ifdef __cplusplus 337c478bd9Sstevel@tonic-gate extern "C" { 347c478bd9Sstevel@tonic-gate #endif 357c478bd9Sstevel@tonic-gate 367c478bd9Sstevel@tonic-gate /* 377c478bd9Sstevel@tonic-gate * Implementation identify data. 387c478bd9Sstevel@tonic-gate */ 397c478bd9Sstevel@tonic-gate struct dcd_identify { 407c478bd9Sstevel@tonic-gate ushort_t dcd_config; /* 0 general configuration bits */ 417c478bd9Sstevel@tonic-gate ushort_t dcd_fixcyls; /* 1 # of fixed cylinders */ 427c478bd9Sstevel@tonic-gate ushort_t dcd_remcyls; /* 2 # of removable cylinders */ 437c478bd9Sstevel@tonic-gate ushort_t dcd_heads; /* 3 # of heads */ 447c478bd9Sstevel@tonic-gate ushort_t dcd_trksiz; /* 4 # of unformatted bytes/track */ 457c478bd9Sstevel@tonic-gate ushort_t dcd_secsiz; /* 5 # of unformatted bytes/sector */ 467c478bd9Sstevel@tonic-gate ushort_t dcd_sectors; /* 6 # of sectors/track */ 477c478bd9Sstevel@tonic-gate ushort_t dcd_resv1[3]; /* 7 "Vendor Unique" */ 487c478bd9Sstevel@tonic-gate char dcd_drvser[20]; /* 10 Serial number */ 497c478bd9Sstevel@tonic-gate ushort_t dcd_buftype; /* 20 Buffer type */ 507c478bd9Sstevel@tonic-gate ushort_t dcd_bufsz; /* 21 Buffer size in 512 byte incr */ 517c478bd9Sstevel@tonic-gate ushort_t dcd_ecc; /* 22 # of ecc bytes avail on rd/wr */ 527c478bd9Sstevel@tonic-gate char dcd_fw[8]; /* 23 Firmware revision */ 537c478bd9Sstevel@tonic-gate char dcd_model[40]; /* 27 Model # */ 547c478bd9Sstevel@tonic-gate ushort_t dcd_mult1; /* 47 Multiple command flags */ 557c478bd9Sstevel@tonic-gate ushort_t dcd_dwcap; /* 48 Doubleword capabilities */ 567c478bd9Sstevel@tonic-gate ushort_t dcd_cap; /* 49 Capabilities */ 577c478bd9Sstevel@tonic-gate ushort_t dcd_resv2; /* 50 Reserved */ 587c478bd9Sstevel@tonic-gate ushort_t dcd_piomode; /* 51 PIO timing mode */ 597c478bd9Sstevel@tonic-gate ushort_t dcd_dmamode; /* 52 DMA timing mode */ 607c478bd9Sstevel@tonic-gate ushort_t dcd_validinfo; /* 53 bit0: wds 54-58, bit1: 64-70 */ 617c478bd9Sstevel@tonic-gate ushort_t dcd_curcyls; /* 54 # of current cylinders */ 627c478bd9Sstevel@tonic-gate ushort_t dcd_curheads; /* 55 # of current heads */ 637c478bd9Sstevel@tonic-gate ushort_t dcd_cursectrk; /* 56 # of current sectors/track */ 647c478bd9Sstevel@tonic-gate ushort_t dcd_cursccp[2]; /* 57 current sectors capacity */ 657c478bd9Sstevel@tonic-gate ushort_t dcd_mult2; /* 59 multiple sectors info */ 667c478bd9Sstevel@tonic-gate ushort_t dcd_addrsec[2]; /* 60 LBA only: no of addr secs */ 677c478bd9Sstevel@tonic-gate ushort_t dcd_sworddma; /* 62 single word dma modes */ 687c478bd9Sstevel@tonic-gate ushort_t dcd_dworddma; /* 63 double word dma modes */ 697c478bd9Sstevel@tonic-gate ushort_t dcd_advpiomode; /* 64 advanced PIO modes supported */ 707c478bd9Sstevel@tonic-gate ushort_t dcd_minmwdma; /* 65 min multi-word dma cycle info */ 717c478bd9Sstevel@tonic-gate ushort_t dcd_recmwdma; /* 66 rec multi-word dma cycle info */ 727c478bd9Sstevel@tonic-gate ushort_t dcd_minpio; /* 67 min PIO cycle info */ 737c478bd9Sstevel@tonic-gate ushort_t dcd_minpioflow; /* 68 min PIO cycle info w/flow ctl */ 74*fa9e4066Sahrens ushort_t dcd_padding1[11]; /* 69 pad to 79 */ 75*fa9e4066Sahrens ushort_t dcd_majvers; /* 80 ATA major version supported */ 76*fa9e4066Sahrens ushort_t dcd_padding2[4]; /* 81 pad to 84 */ 77*fa9e4066Sahrens ushort_t dcd_features85; /* 85 feature enabled bits */ 78*fa9e4066Sahrens ushort_t dcd_padding3[2]; /* 86 pad to 87 */ 797c478bd9Sstevel@tonic-gate ushort_t dcd_ultra_dma; /* 88 Ultra dma capability */ 80*fa9e4066Sahrens ushort_t dcd_padding4[37]; /* 89 pad to 125 */ 817c478bd9Sstevel@tonic-gate ushort_t dcd_lastlun; /* 126 last logical unit number */ 82*fa9e4066Sahrens ushort_t dcd_padding5[129]; /* pad to 255 */ 837c478bd9Sstevel@tonic-gate }; 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gate /* 877c478bd9Sstevel@tonic-gate * Indentify data size definition 887c478bd9Sstevel@tonic-gate */ 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate #define SUN_IDENTSIZE (sizeof (struct dcd_identify)) 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gate /* 937c478bd9Sstevel@tonic-gate * The following are the bit for dcd_config field 947c478bd9Sstevel@tonic-gate */ 957c478bd9Sstevel@tonic-gate #define ATAPI_DEVICE (1 << 15) 967c478bd9Sstevel@tonic-gate #define ATANON_REMOVABLE (1 << 6) 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gate /* 997c478bd9Sstevel@tonic-gate * The following are the bit defined word 64 1007c478bd9Sstevel@tonic-gate */ 1017c478bd9Sstevel@tonic-gate #define PIO_MODE4_MASK 0x02 1027c478bd9Sstevel@tonic-gate #define PIO_MODE3_MASK 0x01 1037c478bd9Sstevel@tonic-gate 104*fa9e4066Sahrens /* 105*fa9e4066Sahrens * The following are bits for dcd_majvers, word 80 106*fa9e4066Sahrens */ 107*fa9e4066Sahrens #define IDENTIFY_80_ATAPI_4 0x0010 108*fa9e4066Sahrens 109*fa9e4066Sahrens /* 110*fa9e4066Sahrens * The following are the bits for dcd_features85, word 85 111*fa9e4066Sahrens */ 112*fa9e4066Sahrens #define IDENTIFY_85_WCE (1 << 5) 113*fa9e4066Sahrens 1147c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1157c478bd9Sstevel@tonic-gate } 1167c478bd9Sstevel@tonic-gate #endif 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate #endif /* _SYS_DADA_IMPL_IDENTIFY_H */ 119