Deleted Added
full compact
aacreg.h (95350) aacreg.h (95536)
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2000-2001 Scott Long
4 * Copyright (c) 2000 BSDi
5 * Copyright (c) 2001 Adaptec, Inc.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2000-2001 Scott Long
4 * Copyright (c) 2000 BSDi
5 * Copyright (c) 2001 Adaptec, Inc.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 12 unchanged lines hidden (view full) ---

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/dev/aac/aacreg.h 95350 2002-04-24 05:12:50Z scottl $
29 * $FreeBSD: head/sys/dev/aac/aacreg.h 95536 2002-04-27 01:31:17Z scottl $
30 */
31
32/*
33 * Data structures defining the interface between the driver and the Adaptec
34 * 'FSA' adapters. Note that many field names and comments here are taken
35 * verbatim from the Adaptec driver source in order to make comparing the
36 * two slightly easier.
37 */

--- 959 unchanged lines hidden (view full) ---

997 * Container shutdown command.
998 */
999struct aac_closecommand {
1000 u_int32_t Command;
1001 u_int32_t ContainerId;
1002} __attribute__ ((packed));
1003
1004/*
30 */
31
32/*
33 * Data structures defining the interface between the driver and the Adaptec
34 * 'FSA' adapters. Note that many field names and comments here are taken
35 * verbatim from the Adaptec driver source in order to make comparing the
36 * two slightly easier.
37 */

--- 959 unchanged lines hidden (view full) ---

997 * Container shutdown command.
998 */
999struct aac_closecommand {
1000 u_int32_t Command;
1001 u_int32_t ContainerId;
1002} __attribute__ ((packed));
1003
1004/*
1005 * Container Config Command
1006 */
1007#define CT_GET_SCSI_METHOD 64
1008struct aac_ctcfg {
1009 AAC_VMCommand Command;
1010 u_int32_t cmd;
1011 u_int32_t param;
1012} __attribute__ ((packed));
1013
1014struct aac_ctcfg_resp {
1015 AAC_FSAStatus Status;
1016 u_int32_t resp;
1017 u_int32_t param;
1018} __attribute__ ((packed));
1019
1020/*
1021 * 'Ioctl' commads
1022 */
1023#define AAC_SCSI_MAX_PORTS 10
1024#define AAC_BUS_NO_EXIST 0
1025#define AAC_BUS_VALID 1
1026#define AAC_BUS_FAULTED 2
1027#define AAC_BUS_DISABLED 3
1028#define GetBusInfo 0x9
1029
1030struct aac_getbusinf {
1031 u_int32_t ProbeComplete;
1032 u_int32_t BusCount;
1033 u_int32_t TargetsPerBus;
1034 u_int8_t InitiatorBusId[AAC_SCSI_MAX_PORTS];
1035 u_int8_t BusValid[AAC_SCSI_MAX_PORTS];
1036} __attribute__ ((packed));
1037
1038struct aac_vmioctl {
1039 AAC_VMCommand Command;
1040 AAC_FType ObjType;
1041 u_int32_t MethId;
1042 u_int32_t ObjId;
1043 u_int32_t IoctlCmd;
1044 u_int32_t IoctlBuf[1]; /* Placeholder? */
1045} __attribute__ ((packed));
1046
1047struct aac_vmi_businf_resp {
1048 AAC_FSAStatus Status;
1049 AAC_FType ObjType;
1050 u_int32_t MethId;
1051 u_int32_t ObjId;
1052 u_int32_t IoctlCmd;
1053 struct aac_getbusinf BusInf;
1054} __attribute__ ((packed));
1055
1056#define AAC_BTL_TO_HANDLE(b, t, l) \
1057 (((b & 0x3f) << 7) | ((l & 0x7) << 4) | (t & 0xf))
1058#define GetDeviceProbeInfo 0x5
1059
1060struct aac_vmi_devinfo_resp {
1061 AAC_FSAStatus Status;
1062 AAC_FType ObjType;
1063 u_int32_t MethId;
1064 u_int32_t ObjId;
1065 u_int32_t IoctlCmd;
1066 u_int8_t VendorId[8];
1067 u_int8_t ProductId[16];
1068 u_int8_t ProductRev[4];
1069 u_int32_t Inquiry7;
1070 u_int32_t align1;
1071 u_int32_t Inquiry0;
1072 u_int32_t align2;
1073 u_int32_t Inquiry1;
1074 u_int32_t align3;
1075 u_int32_t reserved[2];
1076 u_int8_t VendorSpecific[20];
1077 u_int32_t Smart:1;
1078 u_int32_t AAC_Managed:1;
1079 u_int32_t align4;
1080 u_int32_t reserved2:6;
1081 u_int32_t Bus;
1082 u_int32_t Target;
1083 u_int32_t Lun;
1084 u_int32_t ultraEnable:1,
1085 disconnectEnable:1,
1086 fast20EnabledW:1,
1087 scamDevice:1,
1088 scamTolerant:1,
1089 setForSync:1,
1090 setForWide:1,
1091 syncDevice:1,
1092 wideDevice:1,
1093 reserved1:7,
1094 ScsiRate:8,
1095 ScsiOffset:8;
1096}; /* Do not pack */
1097
1098#define ResetBus 0x16
1099struct aac_resetbus {
1100 u_int32_t BusNumber;
1101};
1102
1103/*
1005 * Write 'stability' options.
1006 */
1007typedef enum {
1008 CSTABLE = 1,
1009 CUNSTABLE
1010} AAC_CacheLevel;
1011
1012/*

--- 44 unchanged lines hidden (view full) ---

1057 * Container shutdown command.
1058 */
1059struct aac_close_command {
1060 AAC_VMCommand Command;
1061 u_int32_t ContainerId;
1062};
1063
1064/*
1104 * Write 'stability' options.
1105 */
1106typedef enum {
1107 CSTABLE = 1,
1108 CUNSTABLE
1109} AAC_CacheLevel;
1110
1111/*

--- 44 unchanged lines hidden (view full) ---

1156 * Container shutdown command.
1157 */
1158struct aac_close_command {
1159 AAC_VMCommand Command;
1160 u_int32_t ContainerId;
1161};
1162
1163/*
1164 * SCSI Passthrough structures
1165 */
1166struct aac_srb32 {
1167 u_int32_t function;
1168 u_int32_t bus;
1169 u_int32_t target;
1170 u_int32_t lun;
1171 u_int32_t timeout;
1172 u_int32_t flags;
1173 u_int32_t data_len;
1174 u_int32_t retry_limit;
1175 u_int32_t cdb_len;
1176 u_int8_t cdb[16];
1177 struct aac_sg_table sg_map32;
1178};
1179
1180enum {
1181 AAC_SRB_FUNC_EXECUTE_SCSI = 0x00,
1182 AAC_SRB_FUNC_CLAIM_DEVICE,
1183 AAC_SRB_FUNC_IO_CONTROL,
1184 AAC_SRB_FUNC_RECEIVE_EVENT,
1185 AAC_SRB_FUNC_RELEASE_QUEUE,
1186 AAC_SRB_FUNC_ATTACH_DEVICE,
1187 AAC_SRB_FUNC_RELEASE_DEVICE,
1188 AAC_SRB_FUNC_SHUTDOWN,
1189 AAC_SRB_FUNC_FLUSH,
1190 AAC_SRB_FUNC_ABORT_COMMAND = 0x10,
1191 AAC_SRB_FUNC_RELEASE_RECOVERY,
1192 AAC_SRB_FUNC_RESET_BUS,
1193 AAC_SRB_FUNC_RESET_DEVICE,
1194 AAC_SRB_FUNC_TERMINATE_IO,
1195 AAC_SRB_FUNC_FLUSH_QUEUE,
1196 AAC_SRB_FUNC_REMOVE_DEVICE,
1197 AAC_SRB_FUNC_DOMAIN_VALIDATION
1198};
1199
1200#define AAC_SRB_FLAGS_NO_DATA_XFER 0x0000
1201#define AAC_SRB_FLAGS_DISABLE_DISCONNECT 0x0004
1202#define AAC_SRB_FLAGS_DISABLE_SYNC_TRANSFER 0x0008
1203#define AAC_SRB_FLAGS_BYPASS_FROZEN_QUEUE 0x0010
1204#define AAC_SRB_FLAGS_DISABLE_AUTOSENSE 0x0020
1205#define AAC_SRB_FLAGS_DATA_IN 0x0040
1206#define AAC_SRB_FLAGS_DATA_OUT 0x0080
1207#define AAC_SRB_FLAGS_UNSPECIFIED_DIRECTION \
1208 (AAC_SRB_FLAGS_DATA_IN | AAC_SRB_FLAGS_DATA_OUT)
1209
1210#define AAC_HOST_SENSE_DATA_MAX 30
1211
1212struct aac_srb_response {
1213 u_int32_t fib_status;
1214 u_int32_t srb_status;
1215 u_int32_t scsi_status;
1216 u_int32_t data_len;
1217 u_int32_t sense_len;
1218 u_int8_t sense[AAC_HOST_SENSE_DATA_MAX];
1219};
1220
1221enum {
1222 AAC_SRB_STS_PENDING = 0x00,
1223 AAC_SRB_STS_SUCCESS,
1224 AAC_SRB_STS_ABORTED,
1225 AAC_SRB_STS_ABORT_FAILED,
1226 AAC_SRB_STS_ERROR,
1227 AAC_SRB_STS_BUSY,
1228 AAC_SRB_STS_INVALID_REQUEST,
1229 AAC_SRB_STS_INVALID_PATH_ID,
1230 AAC_SRB_STS_NO_DEVICE,
1231 AAC_SRB_STS_TIMEOUT,
1232 AAC_SRB_STS_SELECTION_TIMEOUT,
1233 AAC_SRB_STS_COMMAND_TIMEOUT,
1234 AAC_SRB_STS_MESSAGE_REJECTED = 0x0D,
1235 AAC_SRB_STS_BUS_RESET,
1236 AAC_SRB_STS_PARITY_ERROR,
1237 AAC_SRB_STS_REQUEST_SENSE_FAILED,
1238 AAC_SRB_STS_NO_HBA,
1239 AAC_SRB_STS_DATA_OVERRUN,
1240 AAC_SRB_STS_UNEXPECTED_BUS_FREE,
1241 AAC_SRB_STS_PHASE_SEQUENCE_FAILURE,
1242 AAC_SRB_STS_BAD_SRB_BLOCK_LENGTH,
1243 AAC_SRB_STS_REQUEST_FLUSHED,
1244 AAC_SRB_STS_INVALID_LUN = 0x20,
1245 AAC_SRB_STS_INVALID_TARGET_ID,
1246 AAC_SRB_STS_BAD_FUNCTION,
1247 AAC_SRB_STS_ERROR_RECOVERY
1248};
1249
1250/*
1065 * Register set for adapters based on the Falcon bridge and PPC core
1066 */
1067
1068#define AAC_FA_DOORBELL0_CLEAR 0x00
1069#define AAC_FA_DOORBELL1_CLEAR 0x02
1070#define AAC_FA_DOORBELL0 0x04
1071#define AAC_FA_DOORBELL1 0x06
1072#define AAC_FA_MASK0_CLEAR 0x08

--- 74 unchanged lines hidden ---
1251 * Register set for adapters based on the Falcon bridge and PPC core
1252 */
1253
1254#define AAC_FA_DOORBELL0_CLEAR 0x00
1255#define AAC_FA_DOORBELL1_CLEAR 0x02
1256#define AAC_FA_DOORBELL0 0x04
1257#define AAC_FA_DOORBELL1 0x06
1258#define AAC_FA_MASK0_CLEAR 0x08

--- 74 unchanged lines hidden ---