|
|
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: /* Sym8xxSRB.h created by russb2 on Sat 30-May-1998 */ ! 26: ! 27: /* ! 28: * The SRB is the main per-request data structure used by the driver. ! 29: * ! 30: * It contains an embedded Nexus structure which is used as a per-request ! 31: * communication area between the script and the driver. ! 32: */ ! 33: ! 34: typedef struct SRB SRB; ! 35: ! 36: struct SRB ! 37: { ! 38: queue_chain_t srbQ; ! 39: ! 40: SRB *srbPhys; ! 41: ! 42: NXConditionLock *srbCmdLock; ! 43: ! 44: u_int32_t srbTimeout; ! 45: ! 46: u_int32_t srbSeqNum; ! 47: ! 48: u_int8_t srbCmd; ! 49: u_int8_t srbState; ! 50: u_int8_t srbRequestFlags; ! 51: ! 52: u_int8_t srbSCSIResult; ! 53: u_int8_t srbSCSIStatus; ! 54: ! 55: u_int8_t srbMsgResid; ! 56: u_int8_t srbMsgLength; ! 57: ! 58: u_int8_t target; ! 59: u_int8_t lun; ! 60: u_int8_t tag; ! 61: ! 62: u_int32_t directionMask; ! 63: ! 64: vm_task_t xferClient; ! 65: vm_offset_t xferBuffer; ! 66: u_int32_t xferOffset; ! 67: u_int32_t xferOffsetPrev; ! 68: u_int32_t xferCount; ! 69: u_int32_t xferDone; ! 70: ! 71: vm_offset_t senseData; ! 72: u_int32_t senseDataLength; ! 73: ! 74: Nexus nexus; ! 75: ! 76: }; ! 77: ! 78: enum srbCmdLock ! 79: { ! 80: ksrbCmdPending = 1, ! 81: ksrbCmdComplete ! 82: }; ! 83: ! 84: enum srbState ! 85: { ! 86: ksrbStateCDBDone = 1, ! 87: ksrbStateReqSenseDone, ! 88: }; ! 89: ! 90: enum srbQCmd ! 91: { ! 92: ksrbCmdExecuteReq = 0x01, ! 93: ksrbCmdResetSCSIBus = 0x02, ! 94: ksrbCmdAbortReq = 0x03, ! 95: ksrbCmdBusDevReset = 0x04, ! 96: ksrbCmdProcessTimeout = 0x05, ! 97: }; ! 98: ! 99: enum srbRequestFlags ! 100: { ! 101: ksrbRFCmdQueueAllowed = 0x01, ! 102: ksrbRFDisconnectAllowed = 0x02, ! 103: ksrbRFXferSyncAllowed = 0x04, ! 104: ! 105: ksrbRFNegotiateWide = 0x40, ! 106: ksrbRFNegotiateSync = 0x80, ! 107: }; ! 108: ! 109: ! 110: typedef struct SRBPool ! 111: { ! 112: queue_chain_t nextPage; ! 113: u_int32_t pagePhysAddr; ! 114: queue_head_t freeSRBList; ! 115: u_int32_t srbInUseCount; ! 116: u_int32_t reserved[2]; ! 117: } SRBPool; ! 118: ! 119: enum ! 120: { ! 121: kSRBGrowPoolRunning = 1, ! 122: kSRBGrowPoolIdle, ! 123: }; ! 124: ! 125: enum ! 126: { ! 127: kSRBPoolMaxFreePages = 2, ! 128: }; ! 129: ! 130: typedef struct Target ! 131: { ! 132: u_int32_t flags; ! 133: NXLock *targetTagSem; ! 134: } Target; ! 135: ! 136: enum ! 137: { ! 138: kTFCmdQueueSupported = 0x00000001, ! 139: kTFCmdQueueAllowed = 0x00000002, ! 140: ! 141: kTFXferSyncSupported = 0x00000004, ! 142: kTFXferSyncAllowed = 0x00000008, ! 143: kTFXferSync = 0x00000010, ! 144: ! 145: kTFXferWide16Supported = 0x00000020, ! 146: kTFXferWide16Allowed = 0x00000040, ! 147: kTFXferWide16 = 0x00000080, ! 148: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.