]> git.saurik.com Git - apple/xnu.git/blob - iokit/IOKit/scsi/scsi-parallel/SCSIParallelController.h
xnu-123.5.tar.gz
[apple/xnu.git] / iokit / IOKit / scsi / scsi-parallel / SCSIParallelController.h
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 * SCSIParallelController.h
24 *
25 */
26
27 #ifndef _SCSIPARALLELCONTROLLER_H
28 #define _SCSIPARALLELCONTROLLER_H
29
30 class IOSyncer;
31
32 typedef struct SCSIControllerInfo
33 {
34 UInt32 initiatorId;
35
36 UInt32 maxTargetsSupported;
37 UInt32 maxLunsSupported;
38
39 UInt32 minTransferPeriodpS;
40 UInt32 maxTransferOffset;
41 UInt32 maxTransferWidth;
42
43 UInt32 maxCommandsPerController;
44 UInt32 maxCommandsPerTarget;
45 UInt32 maxCommandsPerLun;
46
47 UInt32 tagAllocationMethod;
48 UInt32 maxTags;
49
50 UInt32 targetPrivateDataSize;
51 UInt32 lunPrivateDataSize;
52 UInt32 commandPrivateDataSize;
53
54 bool disableCancelCommands;
55
56 UInt32 reserved[64];
57
58 } SCSIControllerInfo;
59
60 enum SCSITagAllocation
61 {
62 kTagAllocationNone = 0,
63 kTagAllocationPerLun,
64 kTagAllocationPerTarget,
65 kTagAllocationPerController,
66 };
67
68 /*
69 * Private for IOSCSIClass
70 */
71 enum WorkLoopReqType
72 {
73 kWorkLoopInitTarget = 1,
74 kWorkLoopReleaseTarget,
75 kWorkLoopInitDevice,
76 kWorkLoopReleaseDevice,
77 };
78
79 enum DispatchAction
80 {
81 kDispatchNextCommand = 1,
82 kDispatchNextLun,
83 kDispatchNextTarget,
84 kDispatchStop,
85 };
86
87 typedef struct WorkLoopRequest
88 {
89 WorkLoopReqType type;
90 IOSyncer * sync;
91 bool rc;
92 } WorkLoopRequest;
93
94 #endif
95