|
|
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.17 Initial conversion from AMDPCSCSIDriver sources.
30: *
31: * Set tabs every 4 characters.
32: *
33: * Apple96BusState.h - Curio-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.18 MM Initial conversion from AMDPCSCSIDriver sources.
38: */
39:
40: #import "Apple96SCSI.h"
41:
42: @interface Apple96_SCSI(BusState)
43:
44: /*
45: * Methods invoked upon interrupt. One per legal gBusState.
46: * These are actually private and are only called by hardwareInterrupt.
47: */
48: - (void) fsmDisconnected;
49: - (void) fsmHandleReselectionInterrupt; /* Subroutine to fsmDisconnected */
50: - (void) fsmSelecting;
51: - (void) fsmReselecting;
52: - (void) fsmReselectionAction;
53: - (void) fsmInitiator;
54: - (void) fsmCompleting;
55: - (void) fsmWaitForBusFree;
56: - (void) fsmDMAComplete;
57: - (void) fsmSendingMsg;
58: - (void) fsmSelecting;
59: - (void) fsmGettingMsg;
60: - (IOReturn) fsmProcessMessage;
61: - (void) fsmSelecting;
62: - (void) fsmSendingCmd;
63: - (void) fsmStartErrorRecovery
64: : (sc_status_t) status
65: reason : (const char *) reason;
66: - (void) fsmErrorRecoveryInterruptService;
67: - (void) fsmContinueErrorRecovery;
68:
69: - (void) putMessageOutByte
70: : (UInt8) messageByte
71: setATN : (Boolean) setATN;
72:
73: /*
74: * This is called after an interrupt leaves us as SCS_RESELECTING
75: */
76: - (void) fsmReselectionAction;
77: /*
78: * This is is called after an interrupt leaves us as SCS_INITIATOR.
79: */
80: - (void) fsmPhaseChange;
81: /*
82: * Common code (from fsmPhaseChange) to start DATI or DATO transfer.
83: */
84: - (void) fsmStartDataPhase;
85: /*
86: * Disable specified mode for activeCmd's target.
87: */
88:
89: typedef enum {
90: kTargetModeCmdQueue
91: } TargetMode;
92:
93: - (void) disableMode
94: : (TargetMode) mode;
95:
96: /**
97: * Validate the target's reselection byte (put on the bus before
98: * reselecting us). Erase the initiator ID and convert the other
99: * bit into an index. The algorithm should be faster than a
100: * sequential search, but it probably doesn't matter much.
101: * @return IO_R_SUCCESS if successful (gCurrentTarget is now valid).
102: * SR_IOST_BV if the select byte is incorrect.
103: * This function does not check whether there actually
104: * is a command pending for this target.
105: */
106: - (IOReturn) getReselectionTargetID
107: : (UInt8) selectByte;
108:
109: @end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.