Annotation of kernel/bsd/dev/ppc/drvPPCATA/AtapiCntCmds.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
        !             7:  * Reserved.  This file contains Original Code and/or Modifications of
        !             8:  * Original Code as defined in and that are subject to the Apple Public
        !             9:  * Source License Version 1.1 (the "License").  You may not use this file
        !            10:  * except in compliance with the License.  Please obtain a copy of the
        !            11:  * License at http://www.apple.com/publicsource and read it before using
        !            12:  * this file.
        !            13:  * 
        !            14:  * The Original Code and all software distributed under the License are
        !            15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
        !            16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
        !            17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
        !            18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
        !            19:  * License for the specific language governing rights and limitations
        !            20:  * under the License.
        !            21:  * 
        !            22:  * @APPLE_LICENSE_HEADER_END@
        !            23:  */
        !            24: 
        !            25: // Copyright 1997 by Apple Computer, Inc., all rights reserved.
        !            26: /*
        !            27:  * Copyright (c) 1994-1997 NeXT Software, Inc.  All rights reserved. 
        !            28:  *
        !            29:  * AtapiCntCmds.h - ATAPI command interface for ATA. 
        !            30:  *
        !            31:  * HISTORY 
        !            32:  * 1-Sep-1994   Rakesh Dubey at NeXT
        !            33:  *     Created.
        !            34:  */
        !            35: 
        !            36: #import "atapi_extern.h"
        !            37: #import "IdeCnt.h"
        !            38: #import <driverkit/kernelDriver.h>
        !            39: #import <driverkit/interruptMsg.h>
        !            40: #import <mach/mach_interface.h>
        !            41: #import <driverkit/IODevice.h>
        !            42: #import <driverkit/align.h>
        !            43: #import <machkit/NXLock.h>
        !            44: #import "io_inline.h"
        !            45: #import <driverkit/scsiTypes.h>
        !            46: #import <string.h>
        !            47: 
        !            48: #define MAX_ATAPI_CMD_LEN      16
        !            49: 
        !            50: typedef struct {
        !            51:     unsigned char drive;
        !            52:     unsigned char lun;                         /* dream on */
        !            53:     unsigned char atapiCmd[MAX_ATAPI_CMD_LEN];
        !            54:     unsigned char cmdLen;
        !            55:     unsigned int maxTransfer;
        !            56:     BOOL  read;
        !            57:     esense_reply_t senseData;
        !            58:     unsigned int bytesTransferred;
        !            59:     unsigned char scsiStatus;
        !            60: } atapiIoReq_t;
        !            61: 
        !            62: 
        !            63: @interface IdeController(ATAPI)
        !            64: 
        !            65: -(unsigned char)atapiCommandPacketSize:(unsigned char)unit;
        !            66: 
        !            67: -(atapi_return_t)atapiWaitForNotBusy;
        !            68: 
        !            69: // only for ATAPI Identify Device
        !            70: - (ide_return_t)atapiIdentifyDeviceWaitForDataReady;   
        !            71: 
        !            72: -(atapi_return_t)atapiSoftReset:(unsigned char)unit;
        !            73: 
        !            74: -(void) printAtapiInfo:(ideIdentifyInfo_t *)ideIdentifyInfo
        !            75:                Device:(unsigned char)unit;
        !            76: 
        !            77: -(atapi_return_t)atapiIdentifyDevice:(struct vm_map *)client
        !            78:                                addr:(caddr_t)xferAddr
        !            79:                                unit:(unsigned char)unit;
        !            80:                                
        !            81: -(void)atapiInitParameters:(ideIdentifyInfo_t *)infoPtr 
        !            82:                Device:(unsigned char)unit;
        !            83:                
        !            84: -(atapi_return_t)atapiPacketCommand;
        !            85: 
        !            86: - (void) sendAtapiCommand:(unsigned char *)atapiCmd
        !            87:        cmdLen:(unsigned char)len;
        !            88:        
        !            89: - (void)dumpStatus:(atapiIoReq_t *)atapiIoReq;
        !            90: 
        !            91: - (sc_status_t) atapiExecuteCmd:(atapiIoReq_t *)atapiIoReq 
        !            92:                    buffer : (void *)buffer 
        !            93:                    client : (struct vm_map *)client;
        !            94: 
        !            95: - (sc_status_t) atapiXferPIO:(atapiIoReq_t *)atapiIoReq 
        !            96:                    buffer : (void *)buffer 
        !            97:                    client : (struct vm_map *)client;
        !            98: 
        !            99: - (sc_status_t) atapiXferDMA:(atapiIoReq_t *)atapiIoReq 
        !           100:                    buffer : (void *)buffer 
        !           101:                    client : (struct vm_map *)client;
        !           102: 
        !           103: - (BOOL) atapiDmaAllowed: (void *)buffer;
        !           104: 
        !           105: @end
        !           106: 
        !           107: /*
        !           108:  * So that we can use ATAPI naming convention and still use the ATA
        !           109:  * registers. 
        !           110:  */
        !           111: #define interruptReason                sectCnt
        !           112: #define byteCountLow           cylLow
        !           113: #define byteCountHigh          cylHigh
        !           114: #define driveSelect            drHead

unix.superglobalmegacorp.com

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