Annotation of XNU/iokit/IOKit/ata/ATACommand.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * The contents of this file constitute Original Code as defined in and
                      7:  * are subject to the Apple Public Source License Version 1.1 (the
                      8:  * "License").  You may not use this file except in compliance with the
                      9:  * License.  Please obtain a copy of the License at
                     10:  * http://www.apple.com/publicsource and read it before using this file.
                     11:  * 
                     12:  * This Original Code and all software distributed under the License are
                     13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     17:  * License for the specific language governing rights and limitations
                     18:  * under the License.
                     19:  * 
                     20:  * @APPLE_LICENSE_HEADER_END@
                     21:  */
                     22: /*
                     23:  *
                     24:  * ATACommand.h
                     25:  *
                     26:  */
                     27: 
                     28: enum ATADeviceType
                     29: {
                     30:     ataDeviceNone,
                     31:     ataDeviceATA,
                     32:     ataDeviceATAPI,
                     33: };
                     34: 
                     35: 
                     36: enum ATATimingProtocol
                     37: {
                     38:     ataTimingPIO               = (1 << 0),
                     39:     ataTimingDMA               = (1 << 1),
                     40:     ataTimingUltraDMA33                = (1 << 2),
    ataTimingUltraDMA66             = (1 << 3),
                     41:     ataMaxTimings              = 4,
                     42: };
                     43: 
                     44: enum ATAProtocol
                     45: {
                     46:    ataProtocolSetRegs          = (1 << 0),
                     47:    ataProtocolPIO              = (1 << 1),
                     48:    ataProtocolPIOMultiple      = (1 << 2),
                     49:    ataProtocolDMA              = (1 << 3),
                     50:    ataProtocolDMAQueued                = (1 << 4),
                     51:    ataProtocolDMAQueuedRelease = (1 << 5),
                     52: 
                     53:    atapiProtocolPIO            = (1 << 16),
                     54:    atapiProtocolDMA            = (1 << 17),
                     55: };
                     56: 
                     57: typedef struct ATATiming
                     58: {
                     59:     ATATimingProtocol  timingProtocol;
                     60: 
                     61:     UInt32             featureSetting;
                     62: 
                     63:     UInt32             mode;
    UInt32                minDataAccess;
    UInt32               minDataCycle;
    UInt32                minCmdAccess;
    UInt32                minCmdCycle;
                     64:     UInt32             reserved_3[9];
} ATATiming;
                     65: 
                     66: 
                     67: enum ATAReturnCode
                     68: {
                     69:     ataReturnNoError,
                     70:     ataReturnNotSupported,
                     71:     ataReturnNoResource,
                     72:     ataReturnErrorRetryPIO,
                     73:     ataReturnErrorBusy,
                     74:     ataReturnErrorInterruptTimeout,
                     75:     ataReturnErrorStatus,
                     76:     ataReturnErrorProtocol,
                     77:     ataReturnErrorDMA,
                     78:     ataReturnBusReset,
                     79: };
                     80: 
                     81: #define ATARegtoMask(reg) (1<<(reg))
                     82: 
                     83: typedef struct ATATaskfile     
{
                     84:     ATAProtocol                protocol;
                     85: 
                     86:     UInt32             resultmask;
                     87: 
    UInt32            regmask;
                     88:     UInt32              ataRegs[MAX_ATA_REGS];
                     89: 
} ATATaskfile;
                     90: 
                     91: typedef struct ATAResults
                     92: {
                     93:     ATAReturnCode      returnCode;
                     94: 
                     95:     UInt32             bytesTransferred;
                     96:     UInt32              ataRegs[MAX_ATA_REGS];
                     97: 
                     98:     UInt32             senseLength;
                     99: } ATAResults;
                    100: 
                    101: 
                    102: typedef struct ATAPICmd
                    103: {
                    104:     UInt32             cdbLength;
                    105:     UInt8              cdb[16];
                    106: } ATAPICmd;
                    107: 
                    108: enum ATAMessages
                    109: {
                    110:     ataMessageInitDevice       = 1,
                    111:     ataMessageResetStarted     = 2,            
                    112:     ataMessageResetComplete    = 3,
                    113: };     
                    114: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.