Go to the documentation of this file.
32 #ifndef _MEGARAID_SAS_FUSION_H_
33 #define _MEGARAID_SAS_FUSION_H_
36 #define MEGASAS_MAX_SZ_CHAIN_FRAME 1024
37 #define MFI_FUSION_ENABLE_INTERRUPT_MASK (0x00000009)
38 #define MEGA_MPI2_RAID_DEFAULT_IO_FRAME_SIZE 256
39 #define MEGASAS_MPI2_FUNCTION_PASSTHRU_IO_REQUEST 0xF0
40 #define MEGASAS_MPI2_FUNCTION_LD_IO_REQUEST 0xF1
41 #define MEGASAS_LOAD_BALANCE_FLAG 0x1
42 #define MEGASAS_DCMD_MBOX_PEND_FLAG 0x1
43 #define HOST_DIAG_WRITE_ENABLE 0x80
44 #define HOST_DIAG_RESET_ADAPTER 0x4
45 #define MEGASAS_FUSION_MAX_RESET_TRIES 3
46 #define MAX_MSIX_QUEUES_FUSION 16
49 #define MPI2_TYPE_CUDA 0x2
50 #define MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH 0x4000
51 #define MR_RL_FLAGS_GRANT_DESTINATION_CPU0 0x00
52 #define MR_RL_FLAGS_GRANT_DESTINATION_CPU1 0x10
53 #define MR_RL_FLAGS_GRANT_DESTINATION_CUDA 0x80
54 #define MR_RL_FLAGS_SEQ_NUM_ENABLE 0x8
57 #define MR_PROT_INFO_TYPE_CONTROLLER 0x8
58 #define MEGASAS_SCSI_VARIABLE_LENGTH_CMD 0x7f
59 #define MEGASAS_SCSI_SERVICE_ACTION_READ32 0x9
60 #define MEGASAS_SCSI_SERVICE_ACTION_WRITE32 0xB
61 #define MEGASAS_SCSI_ADDL_CDB_LEN 0x18
62 #define MEGASAS_RD_WR_PROTECT_CHECK_ALL 0x20
63 #define MEGASAS_RD_WR_PROTECT_CHECK_NONE 0x60
64 #define MEGASAS_EEDPBLOCKSIZE 512
70 #define MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_SHIFT 0x4
71 #define MR_RAID_CTX_RAID_FLAGS_IO_SUB_TYPE_MASK 0x30
80 #define MEGASAS_REQ_DESCRIPT_FLAGS_LD_IO 0x7
81 #define MEGASAS_REQ_DESCRIPT_FLAGS_MFA 0x1
82 #define MEGASAS_REQ_DESCRIPT_FLAGS_NO_LOCK 0x2
83 #define MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT 1
85 #define MEGASAS_FP_CMD_LEN 16
86 #define MEGASAS_FUSION_IN_RESET 0
113 #define RAID_CTX_SPANARM_ARM_SHIFT (0)
114 #define RAID_CTX_SPANARM_ARM_MASK (0x1f)
116 #define RAID_CTX_SPANARM_SPAN_SHIFT (5)
117 #define RAID_CTX_SPANARM_SPAN_MASK (0xE0)
130 #define MPI2_FUNCTION_IOC_INIT (0x02)
131 #define MPI2_WHOINIT_HOST_DRIVER (0x04)
132 #define MPI2_VERSION_MAJOR (0x02)
133 #define MPI2_VERSION_MINOR (0x00)
134 #define MPI2_VERSION_MAJOR_MASK (0xFF00)
135 #define MPI2_VERSION_MAJOR_SHIFT (8)
136 #define MPI2_VERSION_MINOR_MASK (0x00FF)
137 #define MPI2_VERSION_MINOR_SHIFT (0)
138 #define MPI2_VERSION ((MPI2_VERSION_MAJOR << MPI2_VERSION_MAJOR_SHIFT) | \
140 #define MPI2_HEADER_VERSION_UNIT (0x10)
141 #define MPI2_HEADER_VERSION_DEV (0x00)
142 #define MPI2_HEADER_VERSION_UNIT_MASK (0xFF00)
143 #define MPI2_HEADER_VERSION_UNIT_SHIFT (8)
144 #define MPI2_HEADER_VERSION_DEV_MASK (0x00FF)
145 #define MPI2_HEADER_VERSION_DEV_SHIFT (0)
146 #define MPI2_HEADER_VERSION ((MPI2_HEADER_VERSION_UNIT << 8) | \
147 MPI2_HEADER_VERSION_DEV)
148 #define MPI2_IEEE_SGE_FLAGS_IOCPLBNTA_ADDR (0x03)
149 #define MPI2_SCSIIO_EEDPFLAGS_INC_PRI_REFTAG (0x8000)
150 #define MPI2_SCSIIO_EEDPFLAGS_CHECK_REFTAG (0x0400)
151 #define MPI2_SCSIIO_EEDPFLAGS_CHECK_REMOVE_OP (0x0003)
152 #define MPI2_SCSIIO_EEDPFLAGS_CHECK_APPTAG (0x0200)
153 #define MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD (0x0100)
154 #define MPI2_SCSIIO_EEDPFLAGS_INSERT_OP (0x0004)
155 #define MPI2_FUNCTION_SCSI_IO_REQUEST (0x00)
156 #define MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY (0x06)
157 #define MPI2_REQ_DESCRIPT_FLAGS_SCSI_IO (0x00)
158 #define MPI2_SGE_FLAGS_64_BIT_ADDRESSING (0x02)
159 #define MPI2_SCSIIO_CONTROL_WRITE (0x01000000)
160 #define MPI2_SCSIIO_CONTROL_READ (0x02000000)
161 #define MPI2_REQ_DESCRIPT_FLAGS_TYPE_MASK (0x0E)
162 #define MPI2_RPY_DESCRIPT_FLAGS_UNUSED (0x0F)
163 #define MPI2_RPY_DESCRIPT_FLAGS_SCSI_IO_SUCCESS (0x00)
164 #define MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK (0x0F)
165 #define MPI2_WRSEQ_FLUSH_KEY_VALUE (0x0)
166 #define MPI2_WRITE_SEQUENCE_OFFSET (0x00000004)
167 #define MPI2_WRSEQ_1ST_KEY_VALUE (0xF)
168 #define MPI2_WRSEQ_2ND_KEY_VALUE (0x4)
169 #define MPI2_WRSEQ_3RD_KEY_VALUE (0xB)
170 #define MPI2_WRSEQ_4TH_KEY_VALUE (0x2)
171 #define MPI2_WRSEQ_5TH_KEY_VALUE (0x7)
172 #define MPI2_WRSEQ_6TH_KEY_VALUE (0xD)
462 #define MR_PD_INVALID 0xFFFF
463 #define MAX_SPAN_DEPTH 8
464 #define MAX_RAIDMAP_SPAN_DEPTH (MAX_SPAN_DEPTH)
465 #define MAX_ROW_SIZE 32
466 #define MAX_RAIDMAP_ROW_SIZE (MAX_ROW_SIZE)
467 #define MAX_LOGICAL_DRIVES 64
468 #define MAX_RAIDMAP_LOGICAL_DRIVES (MAX_LOGICAL_DRIVES)
469 #define MAX_RAIDMAP_VIEWS (MAX_LOGICAL_DRIVES)
470 #define MAX_ARRAYS 128
471 #define MAX_RAIDMAP_ARRAYS (MAX_ARRAYS)
472 #define MAX_PHYSICAL_DEVICES 256
473 #define MAX_RAIDMAP_PHYSICAL_DEVICES (MAX_PHYSICAL_DEVICES)
474 #define MR_DCMD_LD_MAP_GET_INFO 0x0300e101
599 #define IEEE_SGE_FLAGS_ADDR_MASK (0x03)
600 #define IEEE_SGE_FLAGS_SYSTEM_ADDR (0x00)
601 #define IEEE_SGE_FLAGS_IOCDDR_ADDR (0x01)
602 #define IEEE_SGE_FLAGS_IOCPLB_ADDR (0x02)
603 #define IEEE_SGE_FLAGS_IOCPLBNTA_ADDR (0x03)
604 #define IEEE_SGE_FLAGS_CHAIN_ELEMENT (0x80)
605 #define IEEE_SGE_FLAGS_END_OF_LIST (0x40)