mpi_init.h (102599) | mpi_init.h (115778) |
---|---|
1/* $FreeBSD: head/sys/dev/mpt/mpilib/mpi_init.h 102599 2002-08-30 03:36:50Z mjacob $ */ | 1/* $FreeBSD: head/sys/dev/mpt/mpilib/mpi_init.h 115778 2003-06-03 17:47:48Z mjacob $ */ |
2/* 3 * Copyright (c) 2000, 2001 by LSI Logic Corporation 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice immediately at the beginning of the file, without modification, --- 13 unchanged lines hidden (view full) --- 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * 27 * Name: MPI_INIT.H 28 * Title: MPI initiator mode messages and structures 29 * Creation Date: June 8, 2000 30 * | 2/* 3 * Copyright (c) 2000, 2001 by LSI Logic Corporation 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice immediately at the beginning of the file, without modification, --- 13 unchanged lines hidden (view full) --- 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * 27 * Name: MPI_INIT.H 28 * Title: MPI initiator mode messages and structures 29 * Creation Date: June 8, 2000 30 * |
31 * MPI Version: 01.02.04 | 31 * MPI_INIT.H Version: 01.02.06 |
32 * 33 * Version History 34 * --------------- 35 * 36 * Date Version Description 37 * -------- -------- ------------------------------------------------------ 38 * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000. 39 * 05-24-00 00.10.02 Added SenseBufferLength to _MSG_SCSI_IO_REPLY. --- 6 unchanged lines hidden (view full) --- 46 * 04-10-01 01.01.05 Added new MsgFlag for MSG_SCSI_TASK_MGMT. 47 * 08-08-01 01.02.01 Original release for v1.2 work. 48 * 08-29-01 01.02.02 Added MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET. 49 * Added MPI_SCSI_STATE_QUEUE_TAG_REJECTED for 50 * MSG_SCSI_IO_REPLY. 51 * 09-28-01 01.02.03 Added structures and defines for SCSI Enclosure 52 * Processor messages. 53 * 10-04-01 01.02.04 Added defines for SEP request Action field. | 32 * 33 * Version History 34 * --------------- 35 * 36 * Date Version Description 37 * -------- -------- ------------------------------------------------------ 38 * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000. 39 * 05-24-00 00.10.02 Added SenseBufferLength to _MSG_SCSI_IO_REPLY. --- 6 unchanged lines hidden (view full) --- 46 * 04-10-01 01.01.05 Added new MsgFlag for MSG_SCSI_TASK_MGMT. 47 * 08-08-01 01.02.01 Original release for v1.2 work. 48 * 08-29-01 01.02.02 Added MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET. 49 * Added MPI_SCSI_STATE_QUEUE_TAG_REJECTED for 50 * MSG_SCSI_IO_REPLY. 51 * 09-28-01 01.02.03 Added structures and defines for SCSI Enclosure 52 * Processor messages. 53 * 10-04-01 01.02.04 Added defines for SEP request Action field. |
54 * 05-31-02 01.02.05 Added MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR define 55 * for SCSI IO requests. 56 * 11-15-02 01.02.06 Added special extended SCSI Status defines for FCP. |
|
54 * -------------------------------------------------------------------------- 55 */ 56 57#ifndef MPI_INIT_H 58#define MPI_INIT_H 59 60 61/***************************************************************************** --- 22 unchanged lines hidden (view full) --- 84 U8 CDB[16]; /* 18h */ 85 U32 DataLength; /* 28h */ 86 U32 SenseBufferLowAddr; /* 2Ch */ 87 SGE_IO_UNION SGL; /* 30h */ 88} MSG_SCSI_IO_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_REQUEST, 89 SCSIIORequest_t, MPI_POINTER pSCSIIORequest_t; 90 91 | 57 * -------------------------------------------------------------------------- 58 */ 59 60#ifndef MPI_INIT_H 61#define MPI_INIT_H 62 63 64/***************************************************************************** --- 22 unchanged lines hidden (view full) --- 87 U8 CDB[16]; /* 18h */ 88 U32 DataLength; /* 28h */ 89 U32 SenseBufferLowAddr; /* 2Ch */ 90 SGE_IO_UNION SGL; /* 30h */ 91} MSG_SCSI_IO_REQUEST, MPI_POINTER PTR_MSG_SCSI_IO_REQUEST, 92 SCSIIORequest_t, MPI_POINTER pSCSIIORequest_t; 93 94 |
92/* SCSIO MsgFlags bits */ | 95/* SCSI IO MsgFlags bits */ |
93 | 96 |
94#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH (0x01) 95#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32 (0x00) 96#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 (0x01) 97#define MPI_SCSIIO_MSGFLGS_SENSE_LOCATION (0x02) 98#define MPI_SCSIIO_MSGFLGS_SENSE_LOC_HOST (0x00) 99#define MPI_SCSIIO_MSGFLGS_SENSE_LOC_IOC (0x02) | 97#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH (0x01) 98#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32 (0x00) 99#define MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 (0x01) 100#define MPI_SCSIIO_MSGFLGS_SENSE_LOCATION (0x02) 101#define MPI_SCSIIO_MSGFLGS_SENSE_LOC_HOST (0x00) 102#define MPI_SCSIIO_MSGFLGS_SENSE_LOC_IOC (0x02) 103#define MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR (0x04) |
100 | 104 |
101/* SCSIIO LUN fields */ | 105/* SCSI IO LUN fields */ |
102 103#define MPI_SCSIIO_LUN_FIRST_LEVEL_ADDRESSING (0x0000FFFF) 104#define MPI_SCSIIO_LUN_SECOND_LEVEL_ADDRESSING (0xFFFF0000) 105#define MPI_SCSIIO_LUN_THIRD_LEVEL_ADDRESSING (0x0000FFFF) 106#define MPI_SCSIIO_LUN_FOURTH_LEVEL_ADDRESSING (0xFFFF0000) 107#define MPI_SCSIIO_LUN_LEVEL_1_WORD (0xFF00) 108#define MPI_SCSIIO_LUN_LEVEL_1_DWORD (0x0000FF00) 109 | 106 107#define MPI_SCSIIO_LUN_FIRST_LEVEL_ADDRESSING (0x0000FFFF) 108#define MPI_SCSIIO_LUN_SECOND_LEVEL_ADDRESSING (0xFFFF0000) 109#define MPI_SCSIIO_LUN_THIRD_LEVEL_ADDRESSING (0x0000FFFF) 110#define MPI_SCSIIO_LUN_FOURTH_LEVEL_ADDRESSING (0xFFFF0000) 111#define MPI_SCSIIO_LUN_LEVEL_1_WORD (0xFF00) 112#define MPI_SCSIIO_LUN_LEVEL_1_DWORD (0x0000FF00) 113 |
110/* SCSIO Control bits */ | 114/* SCSI IO Control bits */ |
111 112#define MPI_SCSIIO_CONTROL_DATADIRECTION_MASK (0x03000000) 113#define MPI_SCSIIO_CONTROL_NODATATRANSFER (0x00000000) 114#define MPI_SCSIIO_CONTROL_WRITE (0x01000000) 115#define MPI_SCSIIO_CONTROL_READ (0x02000000) 116 117#define MPI_SCSIIO_CONTROL_ADDCDBLEN_MASK (0x3C000000) 118#define MPI_SCSIIO_CONTROL_ADDCDBLEN_SHIFT (26) --- 12 unchanged lines hidden (view full) --- 131#define MPI_SCSIIO_CONTROL_TARGET_RESET (0x00200000) 132#define MPI_SCSIIO_CONTROL_LUN_RESET_RSV (0x00100000) 133#define MPI_SCSIIO_CONTROL_RESERVED (0x00080000) 134#define MPI_SCSIIO_CONTROL_CLR_TASK_SET_RSV (0x00040000) 135#define MPI_SCSIIO_CONTROL_ABORT_TASK_SET (0x00020000) 136#define MPI_SCSIIO_CONTROL_RESERVED2 (0x00010000) 137 138 | 115 116#define MPI_SCSIIO_CONTROL_DATADIRECTION_MASK (0x03000000) 117#define MPI_SCSIIO_CONTROL_NODATATRANSFER (0x00000000) 118#define MPI_SCSIIO_CONTROL_WRITE (0x01000000) 119#define MPI_SCSIIO_CONTROL_READ (0x02000000) 120 121#define MPI_SCSIIO_CONTROL_ADDCDBLEN_MASK (0x3C000000) 122#define MPI_SCSIIO_CONTROL_ADDCDBLEN_SHIFT (26) --- 12 unchanged lines hidden (view full) --- 135#define MPI_SCSIIO_CONTROL_TARGET_RESET (0x00200000) 136#define MPI_SCSIIO_CONTROL_LUN_RESET_RSV (0x00100000) 137#define MPI_SCSIIO_CONTROL_RESERVED (0x00080000) 138#define MPI_SCSIIO_CONTROL_CLR_TASK_SET_RSV (0x00040000) 139#define MPI_SCSIIO_CONTROL_ABORT_TASK_SET (0x00020000) 140#define MPI_SCSIIO_CONTROL_RESERVED2 (0x00010000) 141 142 |
139/* SCSIIO reply structure */ | 143/* SCSI IO reply structure */ |
140typedef struct _MSG_SCSI_IO_REPLY 141{ 142 U8 TargetID; /* 00h */ 143 U8 Bus; /* 01h */ 144 U8 MsgLength; /* 02h */ 145 U8 Function; /* 03h */ 146 U8 CDBLength; /* 04h */ 147 U8 SenseBufferLength; /* 05h */ --- 6 unchanged lines hidden (view full) --- 154 U32 IOCLogInfo; /* 10h */ 155 U32 TransferCount; /* 14h */ 156 U32 SenseCount; /* 18h */ 157 U32 ResponseInfo; /* 1Ch */ 158} MSG_SCSI_IO_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_REPLY, 159 SCSIIOReply_t, MPI_POINTER pSCSIIOReply_t; 160 161 | 144typedef struct _MSG_SCSI_IO_REPLY 145{ 146 U8 TargetID; /* 00h */ 147 U8 Bus; /* 01h */ 148 U8 MsgLength; /* 02h */ 149 U8 Function; /* 03h */ 150 U8 CDBLength; /* 04h */ 151 U8 SenseBufferLength; /* 05h */ --- 6 unchanged lines hidden (view full) --- 158 U32 IOCLogInfo; /* 10h */ 159 U32 TransferCount; /* 14h */ 160 U32 SenseCount; /* 18h */ 161 U32 ResponseInfo; /* 1Ch */ 162} MSG_SCSI_IO_REPLY, MPI_POINTER PTR_MSG_SCSI_IO_REPLY, 163 SCSIIOReply_t, MPI_POINTER pSCSIIOReply_t; 164 165 |
162/* SCSIIO Reply SCSIStatus values (SAM-2 status codes) */ | 166/* SCSI IO Reply SCSIStatus values (SAM-2 status codes) */ |
163 164#define MPI_SCSI_STATUS_SUCCESS (0x00) 165#define MPI_SCSI_STATUS_CHECK_CONDITION (0x02) 166#define MPI_SCSI_STATUS_CONDITION_MET (0x04) 167#define MPI_SCSI_STATUS_BUSY (0x08) 168#define MPI_SCSI_STATUS_INTERMEDIATE (0x10) 169#define MPI_SCSI_STATUS_INTERMEDIATE_CONDMET (0x14) 170#define MPI_SCSI_STATUS_RESERVATION_CONFLICT (0x18) 171#define MPI_SCSI_STATUS_COMMAND_TERMINATED (0x22) 172#define MPI_SCSI_STATUS_TASK_SET_FULL (0x28) 173#define MPI_SCSI_STATUS_ACA_ACTIVE (0x30) 174 | 167 168#define MPI_SCSI_STATUS_SUCCESS (0x00) 169#define MPI_SCSI_STATUS_CHECK_CONDITION (0x02) 170#define MPI_SCSI_STATUS_CONDITION_MET (0x04) 171#define MPI_SCSI_STATUS_BUSY (0x08) 172#define MPI_SCSI_STATUS_INTERMEDIATE (0x10) 173#define MPI_SCSI_STATUS_INTERMEDIATE_CONDMET (0x14) 174#define MPI_SCSI_STATUS_RESERVATION_CONFLICT (0x18) 175#define MPI_SCSI_STATUS_COMMAND_TERMINATED (0x22) 176#define MPI_SCSI_STATUS_TASK_SET_FULL (0x28) 177#define MPI_SCSI_STATUS_ACA_ACTIVE (0x30) 178 |
179#define MPI_SCSI_STATUS_FCPEXT_DEVICE_LOGGED_OUT (0x80) 180#define MPI_SCSI_STATUS_FCPEXT_NO_LINK (0x81) |
|
175 | 181 |
176/* SCSIIO Reply SCSIState values */ | |
177 | 182 |
183/* SCSI IO Reply SCSIState values */ 184 |
|
178#define MPI_SCSI_STATE_AUTOSENSE_VALID (0x01) 179#define MPI_SCSI_STATE_AUTOSENSE_FAILED (0x02) 180#define MPI_SCSI_STATE_NO_SCSI_STATUS (0x04) 181#define MPI_SCSI_STATE_TERMINATED (0x08) 182#define MPI_SCSI_STATE_RESPONSE_INFO_VALID (0x10) 183#define MPI_SCSI_STATE_QUEUE_TAG_REJECTED (0x20) 184 | 185#define MPI_SCSI_STATE_AUTOSENSE_VALID (0x01) 186#define MPI_SCSI_STATE_AUTOSENSE_FAILED (0x02) 187#define MPI_SCSI_STATE_NO_SCSI_STATUS (0x04) 188#define MPI_SCSI_STATE_TERMINATED (0x08) 189#define MPI_SCSI_STATE_RESPONSE_INFO_VALID (0x10) 190#define MPI_SCSI_STATE_QUEUE_TAG_REJECTED (0x20) 191 |
185/* SCSIIO Reply ResponseInfo values */ | 192/* SCSI IO Reply ResponseInfo values */ |
186/* (FCP-1 RSP_CODE values and SPI-3 Packetized Failure codes) */ 187 188#define MPI_SCSI_RSP_INFO_FUNCTION_COMPLETE (0x00000000) 189#define MPI_SCSI_RSP_INFO_FCP_BURST_LEN_ERROR (0x01000000) 190#define MPI_SCSI_RSP_INFO_CMND_FIELDS_INVALID (0x02000000) 191#define MPI_SCSI_RSP_INFO_FCP_DATA_RO_ERROR (0x03000000) 192#define MPI_SCSI_RSP_INFO_TASK_MGMT_UNSUPPORTED (0x04000000) 193#define MPI_SCSI_RSP_INFO_TASK_MGMT_FAILED (0x05000000) --- 144 unchanged lines hidden --- | 193/* (FCP-1 RSP_CODE values and SPI-3 Packetized Failure codes) */ 194 195#define MPI_SCSI_RSP_INFO_FUNCTION_COMPLETE (0x00000000) 196#define MPI_SCSI_RSP_INFO_FCP_BURST_LEN_ERROR (0x01000000) 197#define MPI_SCSI_RSP_INFO_CMND_FIELDS_INVALID (0x02000000) 198#define MPI_SCSI_RSP_INFO_FCP_DATA_RO_ERROR (0x03000000) 199#define MPI_SCSI_RSP_INFO_TASK_MGMT_UNSUPPORTED (0x04000000) 200#define MPI_SCSI_RSP_INFO_TASK_MGMT_FAILED (0x05000000) --- 144 unchanged lines hidden --- |