|
|
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: /** ! 26: * Copyright (c) 1994-1996 NeXT Software, Inc. All rights reserved. ! 27: * Copyright 1997 Apple Computer Inc. All Rights Reserved. ! 28: * @author Martin Minow mailto:[email protected] ! 29: * @revision 1997.02.13 Initial conversion from AMDPCSCSIDriver sources. ! 30: * ! 31: * Set tabs every 4 characters. ! 32: * ! 33: * Apple96PCISCSI.h - Architecture-specific methods for Apple96 SCSI driver. ! 34: * Apple96SCSI is closely based on Doug Mitchell's AMD 53C974/79C974 driver. ! 35: * ! 36: * Edit History ! 37: * 1997.02.13 MM Initial conversion from AMDPCSCSIDriver sources. ! 38: */ ! 39: ! 40: #import "Apple96SCSI.h" ! 41: ! 42: /* ! 43: * Return values from -hardwareStart. ! 44: */ ! 45: typedef enum { ! 46: kHardwareStartOK, /* command started successfully */ ! 47: kHardwareStartRejected, /* command rejected, try another */ ! 48: kHardwareStartBusy /* hardware not ready for command */ ! 49: } HardwareStartResult; ! 50: ! 51: @interface Apple96_SCSI(Hardware) ! 52: ! 53: /** ! 54: * Perform one-time-only architecture-specific init. ! 55: * Return self on success, nil on failure. ! 56: */ ! 57: - hardwareInitialization ! 58: : deviceDescription; ! 59: ! 60: ! 61: ! 62: /** ! 63: * Reusable hardware initization function. This includes a SCSI reset. ! 64: * Handling of ioComplete of active and disconnected commands must be done ! 65: * elsewhere. Returns IO_R_SUCCESS if successful. This is called ! 66: * from a Task thread. It will disable and re-enable interrupts. ! 67: * Reason is for error logging. ! 68: */ ! 69: - (IOReturn) hardwareReset ! 70: : (Boolean) resetSCSIBus ! 71: reason : (const char *) reason; ! 72: ! 73: /** ! 74: * Initialize volatile target options at start and ! 75: * after bus reset. This initializes synchronous transfer ! 76: * It does not reset disable command queue or disable select ! 77: * with ATN states. ! 78: */ ! 79: - (void) initializePerTargetData; ! 80: /** ! 81: * Initialize the synchronous data transfer state for a target. ! 82: */ ! 83: - (void) renegotiateSyncMode ! 84: : (UInt8) target; ! 85: ! 86: /* ! 87: * Start a SCSI transaction for the command in cmdBuf. gActiveCommand must be ! 88: * NULL. A return of kHardwareStartRejected indicates that caller may try ! 89: * again with another command; kHardwareStartBusy indicates a condition ! 90: * other than (gActiveCommand != NULL) which prevents the processing of ! 91: * the command. The command will have been enqueued on gPendingCommandQueue ! 92: * in the latter case. The command will have been ioComplete'd in the ! 93: * kHardwareStartRejected case. ! 94: */ ! 95: - (HardwareStartResult) hardwareStart ! 96: : (CommandBuffer *) cmdBuf; ! 97: ! 98: @end /* Apple96_SCSI(Hardware) */ ! 99:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.