1507c3241Smlf /* 2507c3241Smlf * CDDL HEADER START 3507c3241Smlf * 4507c3241Smlf * The contents of this file are subject to the terms of the 5*2df1fe9cSrandyf * Common Development and Distribution License (the "License"). 6507c3241Smlf * You may not use this file except in compliance with the License. 7507c3241Smlf * 8507c3241Smlf * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9507c3241Smlf * or http://www.opensolaris.org/os/licensing. 10507c3241Smlf * See the License for the specific language governing permissions 11507c3241Smlf * and limitations under the License. 12507c3241Smlf * 13507c3241Smlf * When distributing Covered Code, include this CDDL HEADER in each 14507c3241Smlf * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15507c3241Smlf * If applicable, add the following below this CDDL HEADER, with the 16507c3241Smlf * fields enclosed by brackets "[]" replaced with your own identifying 17507c3241Smlf * information: Portions Copyright [yyyy] [name of copyright owner] 18507c3241Smlf * 19507c3241Smlf * CDDL HEADER END 20507c3241Smlf */ 21507c3241Smlf 22507c3241Smlf /* 23*2df1fe9cSrandyf * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 24507c3241Smlf * Use is subject to license terms. 25507c3241Smlf */ 26507c3241Smlf 27507c3241Smlf #ifndef _ATA_CMD_H 28507c3241Smlf #define _ATA_CMD_H 29507c3241Smlf 30507c3241Smlf #ifdef __cplusplus 31507c3241Smlf extern "C" { 32507c3241Smlf #endif 33507c3241Smlf 34507c3241Smlf /* 35507c3241Smlf * Common ATA commands. 36507c3241Smlf */ 37507c3241Smlf #define ATC_DIAG 0x90 /* diagnose command */ 38507c3241Smlf #define ATC_RECAL 0x10 /* restore cmd, bottom 4 bits step rate */ 39507c3241Smlf #define ATC_FORMAT 0x50 /* format track command */ 40507c3241Smlf #define ATC_SET_FEAT 0xef /* set features */ 41507c3241Smlf #define ATC_IDLE_IMMED 0xe1 /* idle immediate */ 42507c3241Smlf #define ATC_STANDBY_IM 0xe0 /* standby immediate */ 43507c3241Smlf #define ATC_DOOR_LOCK 0xde /* door lock */ 44507c3241Smlf #define ATC_DOOR_UNLOCK 0xdf /* door unlock */ 45507c3241Smlf #define ATC_IDLE 0xe3 /* idle */ 46*2df1fe9cSrandyf #define ATC_SLEEP 0xe6 /* sleep */ 47507c3241Smlf 48507c3241Smlf /* 49507c3241Smlf * ATA/ATAPI-4 disk commands. 50507c3241Smlf */ 51507c3241Smlf #define ATC_DEVICE_RESET 0x08 /* ATAPI device reset */ 52507c3241Smlf #define ATC_EJECT 0xed /* media eject */ 53507c3241Smlf #define ATC_FLUSH_CACHE 0xe7 /* flush write-cache */ 54507c3241Smlf #define ATC_ID_DEVICE 0xec /* IDENTIFY DEVICE */ 55507c3241Smlf #define ATC_ID_PACKET_DEVICE 0xa1 /* ATAPI identify packet device */ 56507c3241Smlf #define ATC_INIT_DEVPARMS 0x91 /* initialize device parameters */ 57507c3241Smlf #define ATC_PACKET 0xa0 /* ATAPI packet */ 58507c3241Smlf #define ATC_RDMULT 0xc4 /* read multiple */ 59507c3241Smlf #define ATC_RDSEC 0x20 /* read sector */ 60507c3241Smlf #define ATC_RDVER 0x40 /* read verify */ 61507c3241Smlf #define ATC_READ_DMA 0xc8 /* read (multiple) w/DMA */ 62507c3241Smlf #define ATC_SEEK 0x70 /* seek */ 63507c3241Smlf #define ATC_SERVICE 0xa2 /* queued/overlap service */ 64507c3241Smlf #define ATC_SETMULT 0xc6 /* set multiple mode */ 65507c3241Smlf #define ATC_WRITE_DMA 0xca /* write (multiple) w/DMA */ 66507c3241Smlf #define ATC_WRMULT 0xc5 /* write multiple */ 67507c3241Smlf #define ATC_WRSEC 0x30 /* write sector */ 68507c3241Smlf 69507c3241Smlf /* 70507c3241Smlf * Low bits for Read/Write commands... 71507c3241Smlf */ 72507c3241Smlf #define ATCM_ECCRETRY 0x01 /* Enable ECC and RETRY by controller */ 73507c3241Smlf /* enabled if bit is CLEARED!!! */ 74507c3241Smlf #define ATCM_LONGMODE 0x02 /* Use Long Mode (get/send data & ECC) */ 75507c3241Smlf 76507c3241Smlf 77507c3241Smlf /* 78507c3241Smlf * Obsolete ATA commands. 79507c3241Smlf */ 80507c3241Smlf 81507c3241Smlf #define ATC_RDLONG 0x23 /* read long without retry */ 82507c3241Smlf #define ATC_ACK_MC 0xdb /* acknowledge media change */ 83507c3241Smlf 84507c3241Smlf #ifdef __cplusplus 85507c3241Smlf } 86507c3241Smlf #endif 87507c3241Smlf 88507c3241Smlf #endif /* _ATA_CMD_H */ 89