Go to the documentation of this file.
27 #define MAX_BASE_ADDRESS 6
32 #define VER_BUILD 1500
34 #define MV_DRIVER_NAME "mvumi"
35 #define PCI_VENDOR_ID_MARVELL_2 0x1b4b
36 #define PCI_DEVICE_ID_MARVELL_MV9143 0x9143
37 #define PCI_DEVICE_ID_MARVELL_MV9580 0x9580
39 #define MVUMI_INTERNAL_CMD_WAIT_TIME 45
40 #define MVUMI_INQUIRY_LENGTH 44
41 #define MVUMI_INQUIRY_UUID_OFF 36
42 #define MVUMI_INQUIRY_UUID_LEN 8
44 #define IS_DMA64 (sizeof(dma_addr_t) == 8)
113 #define SCSI_CMD_MARVELL_SPECIFIC 0xE1
114 #define CDB_CORE_MODULE 0x1
115 #define CDB_CORE_SHUTDOWN 0xB
139 #define APICDB0_EVENT 0xF4
140 #define APICDB1_EVENT_GETEVENT 0
141 #define APICDB1_HOST_GETEVENT 1
142 #define MAX_EVENTS_RETURNED 6
144 #define DEVICE_OFFLINE 0
145 #define DEVICE_ONLINE 1
179 #define HS_CAPABILITY_SUPPORT_COMPACT_SG (1U << 4)
180 #define HS_CAPABILITY_SUPPORT_PRD_HOST (1U << 5)
181 #define HS_CAPABILITY_SUPPORT_DYN_SRC (1U << 6)
182 #define HS_CAPABILITY_NEW_PAGE_IO_DEPTH_DEF (1U << 14)
184 #define MVUMI_MAX_SG_ENTRY 32
185 #define SGD_EOT (1L << 27)
186 #define SGD_EOT_CP (1L << 22)
200 #define GET_COMPACT_SGD_SIZE(sgd) \
201 ((((struct mvumi_compact_sgl *)(sgd))->flags) & 0x3FFFFFL)
203 #define SET_COMPACT_SGD_SIZE(sgd, sz) do { \
204 (((struct mvumi_compact_sgl *)(sgd))->flags) &= ~0x3FFFFFL; \
205 (((struct mvumi_compact_sgl *)(sgd))->flags) |= (sz); \
207 #define sgd_getsz(_mhba, sgd, sz) do { \
208 if (_mhba->hba_capability & HS_CAPABILITY_SUPPORT_COMPACT_SG) \
209 (sz) = GET_COMPACT_SGD_SIZE(sgd); \
211 (sz) = (sgd)->size; \
214 #define sgd_setsz(_mhba, sgd, sz) do { \
215 if (_mhba->hba_capability & HS_CAPABILITY_SUPPORT_COMPACT_SG) \
216 SET_COMPACT_SGD_SIZE(sgd, sz); \
218 (sgd)->size = (sz); \
221 #define sgd_inc(_mhba, sgd) do { \
222 if (_mhba->hba_capability & HS_CAPABILITY_SUPPORT_COMPACT_SG) \
223 sgd = (struct mvumi_sgl *)(((unsigned char *) (sgd)) + 12); \
225 sgd = (struct mvumi_sgl *)(((unsigned char *) (sgd)) + 16); \
261 #define REQ_STATUS_PENDING 0x80
277 #define CL_FUN_SCSI_CMD 0x1
296 #define CL_RSP_FLAG_NODATA 0x0
297 #define CL_RSP_FLAG_SENSEDATA 0x1
320 #define FW_MAX_DELAY 30
321 #define MVUMI_FW_BUSY (1U << 0)
322 #define MVUMI_FW_ATTACH (1U << 1)
323 #define MVUMI_FW_ALLOC (1U << 2)
328 #define FW_STATE_IDLE 0
329 #define FW_STATE_STARTING 1
330 #define FW_STATE_HANDSHAKING 2
331 #define FW_STATE_STARTED 3
332 #define FW_STATE_ABORT 4
334 #define HANDSHAKE_SIGNATURE 0x5A5A5A5AL
335 #define HANDSHAKE_READYSTATE 0x55AA5AA5L
336 #define HANDSHAKE_DONESTATE 0x55AAA55AL
339 #define HS_STATUS_OK 1
340 #define HS_STATUS_ERR 2
341 #define HS_STATUS_INVALID 3
346 #define HS_S_PAGE_ADDR 3
347 #define HS_S_QUERY_PAGE 4
348 #define HS_S_SEND_PAGE 5
351 #define HS_PAGE_VERIFY_SIZE 128
353 #define HS_GET_STATE(a) (a & 0xFFFF)
354 #define HS_GET_STATUS(a) ((a & 0xFFFF0000) >> 16)
355 #define HS_SET_STATE(a, b) (a |= (b & 0xFFFF))
356 #define HS_SET_STATUS(a, b) (a |= ((b & 0xFFFF) << 16))
397 #define HS_PAGE_FIRM_CAP 0x1
398 #define HS_PAGE_HOST_INFO 0x2
399 #define HS_PAGE_FIRM_CTL 0x3
400 #define HS_PAGE_CL_INFO 0x4
401 #define HS_PAGE_TOTAL 0x5
403 #define HSP_SIZE(i) sizeof(struct mvumi_hs_page##i)
405 #define HSP_MAX_SIZE ({ \
407 m1 = max(HSP_SIZE(1), HSP_SIZE(3)); \
408 m2 = max(HSP_SIZE(2), HSP_SIZE(4)); \
409 size = max(m1, m2); \