Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Variables
mvumi.h File Reference

Go to the source code of this file.

Data Structures

struct  mvumi_hw_regs
 
struct  mvumi_dyn_list_entry
 
struct  mvumi_hotplug_event
 
struct  mvumi_driver_event
 
struct  mvumi_event_req
 
struct  mvumi_events_wq
 
struct  mvumi_sgl
 
struct  mvumi_compact_sgl
 
struct  mvumi_res
 
struct  mvumi_sense_data
 
struct  mvumi_cmd
 
struct  mvumi_msg_frame
 
struct  mvumi_rsp_frame
 
struct  mvumi_ob_data
 
struct  version_info
 
struct  mvumi_hs_frame
 
struct  mvumi_hs_header
 
struct  mvumi_hs_page1
 
struct  mvumi_hs_page2
 
struct  mvumi_hs_page3
 
struct  mvumi_hs_page4
 
struct  mvumi_tag
 
struct  mvumi_device
 
struct  mvumi_hba
 
struct  mvumi_instance_template
 

Macros

#define MAX_BASE_ADDRESS   6
 
#define VER_MAJOR   1
 
#define VER_MINOR   1
 
#define VER_OEM   0
 
#define VER_BUILD   1500
 
#define MV_DRIVER_NAME   "mvumi"
 
#define PCI_VENDOR_ID_MARVELL_2   0x1b4b
 
#define PCI_DEVICE_ID_MARVELL_MV9143   0x9143
 
#define PCI_DEVICE_ID_MARVELL_MV9580   0x9580
 
#define MVUMI_INTERNAL_CMD_WAIT_TIME   45
 
#define MVUMI_INQUIRY_LENGTH   44
 
#define MVUMI_INQUIRY_UUID_OFF   36
 
#define MVUMI_INQUIRY_UUID_LEN   8
 
#define IS_DMA64   (sizeof(dma_addr_t) == 8)
 
#define SCSI_CMD_MARVELL_SPECIFIC   0xE1
 
#define CDB_CORE_MODULE   0x1
 
#define CDB_CORE_SHUTDOWN   0xB
 
#define APICDB0_EVENT   0xF4
 
#define APICDB1_EVENT_GETEVENT   0
 
#define APICDB1_HOST_GETEVENT   1
 
#define MAX_EVENTS_RETURNED   6
 
#define DEVICE_OFFLINE   0
 
#define DEVICE_ONLINE   1
 
#define HS_CAPABILITY_SUPPORT_COMPACT_SG   (1U << 4)
 
#define HS_CAPABILITY_SUPPORT_PRD_HOST   (1U << 5)
 
#define HS_CAPABILITY_SUPPORT_DYN_SRC   (1U << 6)
 
#define HS_CAPABILITY_NEW_PAGE_IO_DEPTH_DEF   (1U << 14)
 
#define MVUMI_MAX_SG_ENTRY   32
 
#define SGD_EOT   (1L << 27)
 
#define SGD_EOT_CP   (1L << 22)
 
#define GET_COMPACT_SGD_SIZE(sgd)   ((((struct mvumi_compact_sgl *)(sgd))->flags) & 0x3FFFFFL)
 
#define SET_COMPACT_SGD_SIZE(sgd, sz)
 
#define sgd_getsz(_mhba, sgd, sz)
 
#define sgd_setsz(_mhba, sgd, sz)
 
#define sgd_inc(_mhba, sgd)
 
#define REQ_STATUS_PENDING   0x80
 
#define CL_FUN_SCSI_CMD   0x1
 
#define CL_RSP_FLAG_NODATA   0x0
 
#define CL_RSP_FLAG_SENSEDATA   0x1
 
#define FW_MAX_DELAY   30
 
#define MVUMI_FW_BUSY   (1U << 0)
 
#define MVUMI_FW_ATTACH   (1U << 1)
 
#define MVUMI_FW_ALLOC   (1U << 2)
 
#define FW_STATE_IDLE   0
 
#define FW_STATE_STARTING   1
 
#define FW_STATE_HANDSHAKING   2
 
#define FW_STATE_STARTED   3
 
#define FW_STATE_ABORT   4
 
#define HANDSHAKE_SIGNATURE   0x5A5A5A5AL
 
#define HANDSHAKE_READYSTATE   0x55AA5AA5L
 
#define HANDSHAKE_DONESTATE   0x55AAA55AL
 
#define HS_STATUS_OK   1
 
#define HS_STATUS_ERR   2
 
#define HS_STATUS_INVALID   3
 
#define HS_S_START   1
 
#define HS_S_RESET   2
 
#define HS_S_PAGE_ADDR   3
 
#define HS_S_QUERY_PAGE   4
 
#define HS_S_SEND_PAGE   5
 
#define HS_S_END   6
 
#define HS_S_ABORT   7
 
#define HS_PAGE_VERIFY_SIZE   128
 
#define HS_GET_STATE(a)   (a & 0xFFFF)
 
#define HS_GET_STATUS(a)   ((a & 0xFFFF0000) >> 16)
 
#define HS_SET_STATE(a, b)   (a |= (b & 0xFFFF))
 
#define HS_SET_STATUS(a, b)   (a |= ((b & 0xFFFF) << 16))
 
#define HS_PAGE_FIRM_CAP   0x1
 
#define HS_PAGE_HOST_INFO   0x2
 
#define HS_PAGE_FIRM_CTL   0x3
 
#define HS_PAGE_CL_INFO   0x4
 
#define HS_PAGE_TOTAL   0x5
 
#define HSP_SIZE(i)   sizeof(struct mvumi_hs_page##i)
 
#define HSP_MAX_SIZE
 

Enumerations

enum  mvumi_qc_result { MV_QUEUE_COMMAND_RESULT_SENT = 0, MV_QUEUE_COMMAND_RESULT_NO_RESOURCE }
 
enum  {
  DRBL_HANDSHAKE = 1 << 0, DRBL_SOFT_RESET = 1 << 1, DRBL_BUS_CHANGE = 1 << 2, DRBL_EVENT_NOTIFY = 1 << 3,
  DRBL_MU_RESET = 1 << 4, DRBL_HANDSHAKE_ISR = DRBL_HANDSHAKE, CMD_FLAG_NON_DATA = 1 << 0, CMD_FLAG_DMA = 1 << 1,
  CMD_FLAG_PIO = 1 << 2, CMD_FLAG_DATA_IN = 1 << 3, CMD_FLAG_DATA_OUT = 1 << 4, CMD_FLAG_PRDT_IN_HOST = 1 << 5
}
 
enum  resource_type { RESOURCE_CACHED_MEMORY = 0, RESOURCE_UNCACHED_MEMORY }
 

Variables

struct timezone sys_tz
 

Macro Definition Documentation

#define APICDB0_EVENT   0xF4

Definition at line 139 of file mvumi.h.

#define APICDB1_EVENT_GETEVENT   0

Definition at line 140 of file mvumi.h.

#define APICDB1_HOST_GETEVENT   1

Definition at line 141 of file mvumi.h.

#define CDB_CORE_MODULE   0x1

Definition at line 114 of file mvumi.h.

#define CDB_CORE_SHUTDOWN   0xB

Definition at line 115 of file mvumi.h.

#define CL_FUN_SCSI_CMD   0x1

Definition at line 277 of file mvumi.h.

#define CL_RSP_FLAG_NODATA   0x0

Definition at line 296 of file mvumi.h.

#define CL_RSP_FLAG_SENSEDATA   0x1

Definition at line 297 of file mvumi.h.

#define DEVICE_OFFLINE   0

Definition at line 144 of file mvumi.h.

#define DEVICE_ONLINE   1

Definition at line 145 of file mvumi.h.

#define FW_MAX_DELAY   30

Definition at line 320 of file mvumi.h.

#define FW_STATE_ABORT   4

Definition at line 332 of file mvumi.h.

#define FW_STATE_HANDSHAKING   2

Definition at line 330 of file mvumi.h.

#define FW_STATE_IDLE   0

Definition at line 328 of file mvumi.h.

#define FW_STATE_STARTED   3

Definition at line 331 of file mvumi.h.

#define FW_STATE_STARTING   1

Definition at line 329 of file mvumi.h.

#define GET_COMPACT_SGD_SIZE (   sgd)    ((((struct mvumi_compact_sgl *)(sgd))->flags) & 0x3FFFFFL)

Definition at line 200 of file mvumi.h.

#define HANDSHAKE_DONESTATE   0x55AAA55AL

Definition at line 336 of file mvumi.h.

#define HANDSHAKE_READYSTATE   0x55AA5AA5L

Definition at line 335 of file mvumi.h.

#define HANDSHAKE_SIGNATURE   0x5A5A5A5AL

Definition at line 334 of file mvumi.h.

#define HS_CAPABILITY_NEW_PAGE_IO_DEPTH_DEF   (1U << 14)

Definition at line 182 of file mvumi.h.

#define HS_CAPABILITY_SUPPORT_COMPACT_SG   (1U << 4)

Definition at line 179 of file mvumi.h.

#define HS_CAPABILITY_SUPPORT_DYN_SRC   (1U << 6)

Definition at line 181 of file mvumi.h.

#define HS_CAPABILITY_SUPPORT_PRD_HOST   (1U << 5)

Definition at line 180 of file mvumi.h.

#define HS_GET_STATE (   a)    (a & 0xFFFF)

Definition at line 353 of file mvumi.h.

#define HS_GET_STATUS (   a)    ((a & 0xFFFF0000) >> 16)

Definition at line 354 of file mvumi.h.

#define HS_PAGE_CL_INFO   0x4

Definition at line 400 of file mvumi.h.

#define HS_PAGE_FIRM_CAP   0x1

Definition at line 397 of file mvumi.h.

#define HS_PAGE_FIRM_CTL   0x3

Definition at line 399 of file mvumi.h.

#define HS_PAGE_HOST_INFO   0x2

Definition at line 398 of file mvumi.h.

#define HS_PAGE_TOTAL   0x5

Definition at line 401 of file mvumi.h.

#define HS_PAGE_VERIFY_SIZE   128

Definition at line 351 of file mvumi.h.

#define HS_S_ABORT   7

Definition at line 350 of file mvumi.h.

#define HS_S_END   6

Definition at line 349 of file mvumi.h.

#define HS_S_PAGE_ADDR   3

Definition at line 346 of file mvumi.h.

#define HS_S_QUERY_PAGE   4

Definition at line 347 of file mvumi.h.

#define HS_S_RESET   2

Definition at line 345 of file mvumi.h.

#define HS_S_SEND_PAGE   5

Definition at line 348 of file mvumi.h.

#define HS_S_START   1

Definition at line 344 of file mvumi.h.

#define HS_SET_STATE (   a,
  b 
)    (a |= (b & 0xFFFF))

Definition at line 355 of file mvumi.h.

#define HS_SET_STATUS (   a,
  b 
)    (a |= ((b & 0xFFFF) << 16))

Definition at line 356 of file mvumi.h.

#define HS_STATUS_ERR   2

Definition at line 340 of file mvumi.h.

#define HS_STATUS_INVALID   3

Definition at line 341 of file mvumi.h.

#define HS_STATUS_OK   1

Definition at line 339 of file mvumi.h.

#define HSP_MAX_SIZE
Value:
({ \
int size, m1, m2; \
m1 = max(HSP_SIZE(1), HSP_SIZE(3)); \
m2 = max(HSP_SIZE(2), HSP_SIZE(4)); \
size = max(m1, m2); \
size; \
})

Definition at line 405 of file mvumi.h.

#define HSP_SIZE (   i)    sizeof(struct mvumi_hs_page##i)

Definition at line 403 of file mvumi.h.

#define IS_DMA64   (sizeof(dma_addr_t) == 8)

Definition at line 44 of file mvumi.h.

#define MAX_BASE_ADDRESS   6

Definition at line 27 of file mvumi.h.

#define MAX_EVENTS_RETURNED   6

Definition at line 142 of file mvumi.h.

#define MV_DRIVER_NAME   "mvumi"

Definition at line 34 of file mvumi.h.

#define MVUMI_FW_ALLOC   (1U << 2)

Definition at line 323 of file mvumi.h.

#define MVUMI_FW_ATTACH   (1U << 1)

Definition at line 322 of file mvumi.h.

#define MVUMI_FW_BUSY   (1U << 0)

Definition at line 321 of file mvumi.h.

#define MVUMI_INQUIRY_LENGTH   44

Definition at line 40 of file mvumi.h.

#define MVUMI_INQUIRY_UUID_LEN   8

Definition at line 42 of file mvumi.h.

#define MVUMI_INQUIRY_UUID_OFF   36

Definition at line 41 of file mvumi.h.

#define MVUMI_INTERNAL_CMD_WAIT_TIME   45

Definition at line 39 of file mvumi.h.

#define MVUMI_MAX_SG_ENTRY   32

Definition at line 184 of file mvumi.h.

#define PCI_DEVICE_ID_MARVELL_MV9143   0x9143

Definition at line 36 of file mvumi.h.

#define PCI_DEVICE_ID_MARVELL_MV9580   0x9580

Definition at line 37 of file mvumi.h.

#define PCI_VENDOR_ID_MARVELL_2   0x1b4b

Definition at line 35 of file mvumi.h.

#define REQ_STATUS_PENDING   0x80

Definition at line 261 of file mvumi.h.

#define SCSI_CMD_MARVELL_SPECIFIC   0xE1

Definition at line 113 of file mvumi.h.

#define SET_COMPACT_SGD_SIZE (   sgd,
  sz 
)
Value:
do { \
(((struct mvumi_compact_sgl *)(sgd))->flags) &= ~0x3FFFFFL; \
(((struct mvumi_compact_sgl *)(sgd))->flags) |= (sz); \
} while (0)

Definition at line 203 of file mvumi.h.

#define SGD_EOT   (1L << 27)

Definition at line 185 of file mvumi.h.

#define SGD_EOT_CP   (1L << 22)

Definition at line 186 of file mvumi.h.

#define sgd_getsz (   _mhba,
  sgd,
  sz 
)
Value:
do { \
if (_mhba->hba_capability & HS_CAPABILITY_SUPPORT_COMPACT_SG) \
else \
(sz) = (sgd)->size; \
} while (0)

Definition at line 207 of file mvumi.h.

#define sgd_inc (   _mhba,
  sgd 
)
Value:
do { \
if (_mhba->hba_capability & HS_CAPABILITY_SUPPORT_COMPACT_SG) \
sgd = (struct mvumi_sgl *)(((unsigned char *) (sgd)) + 12); \
else \
sgd = (struct mvumi_sgl *)(((unsigned char *) (sgd)) + 16); \
} while (0)

Definition at line 221 of file mvumi.h.

#define sgd_setsz (   _mhba,
  sgd,
  sz 
)
Value:
do { \
if (_mhba->hba_capability & HS_CAPABILITY_SUPPORT_COMPACT_SG) \
SET_COMPACT_SGD_SIZE(sgd, sz); \
else \
(sgd)->size = (sz); \
} while (0)

Definition at line 214 of file mvumi.h.

#define VER_BUILD   1500

Definition at line 32 of file mvumi.h.

#define VER_MAJOR   1

Definition at line 29 of file mvumi.h.

#define VER_MINOR   1

Definition at line 30 of file mvumi.h.

#define VER_OEM   0

Definition at line 31 of file mvumi.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
DRBL_HANDSHAKE 
DRBL_SOFT_RESET 
DRBL_BUS_CHANGE 
DRBL_EVENT_NOTIFY 
DRBL_MU_RESET 
DRBL_HANDSHAKE_ISR 
CMD_FLAG_NON_DATA 
CMD_FLAG_DMA 
CMD_FLAG_PIO 
CMD_FLAG_DATA_IN 
CMD_FLAG_DATA_OUT 
CMD_FLAG_PRDT_IN_HOST 

Definition at line 117 of file mvumi.h.

Enumerator:
MV_QUEUE_COMMAND_RESULT_SENT 
MV_QUEUE_COMMAND_RESULT_NO_RESOURCE 

Definition at line 46 of file mvumi.h.

Enumerator:
RESOURCE_CACHED_MEMORY 
RESOURCE_UNCACHED_MEMORY 

Definition at line 237 of file mvumi.h.

Variable Documentation

struct timezone sys_tz

Definition at line 50 of file time.c.