smartmontools SVN Rev 3317
Utility to control and monitor storage systems with "S.M.A.R.T."
Classes | Defines | Typedefs | Functions | Variables
megaraid.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __attribute__
struct  __attribute__
union  ptr_t
struct  uioctl_t
struct  megasas_sge32
struct  megasas_sge64
union  megasas_sgl
struct  megasas_header
struct  megasas_pthru_frame
struct  megasas_dcmd_frame
struct  megasas_iocpacket
struct  megasas_pd_address
struct  megasas_pd_list

Defines

#define u8   uint8_t
#define u16   uint16_t
#define u32   uint32_t
#define u64   uint64_t
#define MEGAIOC_MAGIC   'm'
#define MEGAIOCCMD   _IOWR(MEGAIOC_MAGIC, 0, struct uioctl_t)
#define MKADAP(adapno)   (MEGAIOC_MAGIC << 8 | adapno)
#define MEGAIOC_QNADAP   'm'
#define MEGAIOC_QDRVRVER   'e'
#define MEGAIOC_QADAPINFO   'g'
#define MEGA_MBOXCMD_PASSTHRU   0x03
#define MAX_REQ_SENSE_LEN   0x20
#define MAX_CDB_LEN   10
#define MEGASAS_MAGIC   'M'
#define MEGASAS_IOC_FIRMWARE   _IOWR(MEGASAS_MAGIC, 1, struct megasas_iocpacket)
#define MFI_CMD_PD_SCSI_IO   0x04
#define MFI_CMD_DCMD   0x05
#define MFI_FRAME_SGL64   0x02
#define MFI_STAT_OK   0x00
#define MFI_DCMD_PD_GET_LIST   0x02010000
#define MFI_MBOX_SIZE   12
#define MAX_IOCTL_SGE   16
#define MFI_FRAME_DIR_NONE   0x0000
#define MFI_FRAME_DIR_WRITE   0x0008
#define MFI_FRAME_DIR_READ   0x0010
#define MFI_FRAME_DIR_BOTH   0x0018
#define MAX_SYS_PDS   240

Typedefs

typedef char assert_sizeof_ptr_t [sizeof(ptr_t)==8?1:-1]

Functions

int megaraid_io_interface (int device, int target, struct scsi_cmnd_io *, int)
struct {
   uint8_t   opcode
   uint8_t   subopcode
   uint16_t   adapno
   ptr_t   buffer
   uint32_t   length
__attribute__ ((packed)) fcs

Variables

uint8_t opcode
uint8_t subopcode
uint16_t adapno
ptr_t buffer
uint32_t length
uint8_t fca [16]
uint32_t inlen
uint32_t outlen
megacmd_t mbox
mega_passthru pthru
ptr_t data
u32 phys_addr
struct megasas_sge32 sge32 [1]
struct megasas_sge64 sge64 [1]
u8 cmd
u8 sense_len
u8 cmd_status
u8 scsi_status
u8 target_id
u8 lun
u8 cdb_len
u8 sge_count
u32 context
u32 pad_0
u16 flags
u16 timeout
u32 data_xferlen
u32 data_xfer_len
u32 sense_buf_phys_addr_lo
u32 sense_buf_phys_addr_hi
u8 cdb [16]
union megasas_sgl sgl
u8 reserved_0
u8 reserved_1 [4]
u16 host_no
u16 __pad1
u32 sgl_off
u32 sense_off
union {
   u8   raw [128]
   struct megasas_header   hdr
   struct megasas_pthru_frame   pthru
   struct megasas_dcmd_frame   dcmd
frame
u16 device_id
u16 encl_device_id
u8 encl_index
u8 slot_number
u8 scsi_dev_type
u8 connect_port_bitmap
u64 sas_addr [2]
u32 size
u32 count
struct megasas_pd_address addr [MAX_SYS_PDS]

Define Documentation

#define MAX_CDB_LEN   10

Definition at line 29 of file megaraid.h.

#define MAX_IOCTL_SGE   16

Definition at line 118 of file megaraid.h.

#define MAX_REQ_SENSE_LEN   0x20

Definition at line 28 of file megaraid.h.

#define MAX_SYS_PDS   240

Definition at line 124 of file megaraid.h.

#define MEGA_MBOXCMD_PASSTHRU   0x03

Definition at line 26 of file megaraid.h.

#define MEGAIOC_MAGIC   'm'

Definition at line 17 of file megaraid.h.

#define MEGAIOC_QADAPINFO   'g'

Definition at line 24 of file megaraid.h.

#define MEGAIOC_QDRVRVER   'e'

Definition at line 23 of file megaraid.h.

#define MEGAIOC_QNADAP   'm'

Definition at line 22 of file megaraid.h.

#define MEGAIOCCMD   _IOWR(MEGAIOC_MAGIC, 0, struct uioctl_t)

Definition at line 18 of file megaraid.h.

#define MEGASAS_IOC_FIRMWARE   _IOWR(MEGASAS_MAGIC, 1, struct megasas_iocpacket)

Definition at line 107 of file megaraid.h.

#define MEGASAS_MAGIC   'M'

Definition at line 106 of file megaraid.h.

#define MFI_CMD_DCMD   0x05

Definition at line 110 of file megaraid.h.

#define MFI_CMD_PD_SCSI_IO   0x04

Definition at line 109 of file megaraid.h.

#define MFI_DCMD_PD_GET_LIST   0x02010000

Definition at line 113 of file megaraid.h.

#define MFI_FRAME_DIR_BOTH   0x0018

Definition at line 122 of file megaraid.h.

#define MFI_FRAME_DIR_NONE   0x0000

Definition at line 119 of file megaraid.h.

#define MFI_FRAME_DIR_READ   0x0010

Definition at line 121 of file megaraid.h.

#define MFI_FRAME_DIR_WRITE   0x0008

Definition at line 120 of file megaraid.h.

#define MFI_FRAME_SGL64   0x02

Definition at line 111 of file megaraid.h.

#define MFI_MBOX_SIZE   12

Definition at line 117 of file megaraid.h.

#define MFI_STAT_OK   0x00

Definition at line 112 of file megaraid.h.

#define MKADAP (   adapno)    (MEGAIOC_MAGIC << 8 | adapno)

Definition at line 21 of file megaraid.h.

#define u16   uint16_t

Definition at line 6 of file megaraid.h.

#define u32   uint32_t

Definition at line 7 of file megaraid.h.

#define u64   uint64_t

Definition at line 8 of file megaraid.h.

#define u8   uint8_t

Definition at line 5 of file megaraid.h.


Typedef Documentation

typedef char assert_sizeof_ptr_t[sizeof(ptr_t)==8?1:-1]

Definition at line 78 of file megaraid.h.


Function Documentation

struct megasas_pd_list __attribute__ ( (packed)  )
int megaraid_io_interface ( int  device,
int  target,
struct scsi_cmnd_io ,
int   
)

Variable Documentation

u16 __pad1

Definition at line 239 of file megaraid.h.

uint16_t adapno

Definition at line 95 of file megaraid.h.

struct megasas_pd_address addr[MAX_SYS_PDS]

Definition at line 256 of file megaraid.h.

u8 b[12]

Definition at line 238 of file megaraid.h.

Definition at line 96 of file megaraid.h.

u8 cdb[16]

Definition at line 215 of file megaraid.h.

u8 cdb_len

Definition at line 175 of file megaraid.h.

u8 cmd

Definition at line 168 of file megaraid.h.

Definition at line 170 of file megaraid.h.

Definition at line 253 of file megaraid.h.

u32 context

Definition at line 178 of file megaraid.h.

u32 count

Definition at line 255 of file megaraid.h.

Definition at line 114 of file megaraid.h.

Definition at line 210 of file megaraid.h.

Definition at line 183 of file megaraid.h.

Definition at line 248 of file megaraid.h.

u16 device_id

Definition at line 248 of file megaraid.h.

Definition at line 249 of file megaraid.h.

Definition at line 250 of file megaraid.h.

uint8_t fca

Definition at line 94 of file megaraid.h.

u16 flags

Definition at line 181 of file megaraid.h.

union { ... } frame

Definition at line 246 of file megaraid.h.

u16 host_no

Definition at line 238 of file megaraid.h.

uint32_t inlen

Definition at line 99 of file megaraid.h.

u32 length

Definition at line 97 of file megaraid.h.

u8 lun

Definition at line 174 of file megaraid.h.

union { ... } mbox

Definition at line 112 of file megaraid.h.

u32 opcode

Definition at line 93 of file megaraid.h.

uint32_t outlen

Definition at line 100 of file megaraid.h.

u32 pad_0

Definition at line 179 of file megaraid.h.

u64 phys_addr

Definition at line 133 of file megaraid.h.

Definition at line 113 of file megaraid.h.

u8 raw[128]

Definition at line 245 of file megaraid.h.

Definition at line 223 of file megaraid.h.

u8 reserved_1[4]

Definition at line 225 of file megaraid.h.

u16 s[6]

Definition at line 239 of file megaraid.h.

u64 sas_addr[2]

Definition at line 254 of file megaraid.h.

Definition at line 252 of file megaraid.h.

Definition at line 171 of file megaraid.h.

Definition at line 213 of file megaraid.h.

Definition at line 212 of file megaraid.h.

u32 sense_len

Definition at line 169 of file megaraid.h.

u32 sense_off

Definition at line 242 of file megaraid.h.

struct megasas_sge32 sge32[1]

Definition at line 147 of file megaraid.h.

struct megasas_sge64 sge64[1]

Definition at line 148 of file megaraid.h.

u32 sge_count

Definition at line 176 of file megaraid.h.

struct iovec sgl

Definition at line 216 of file megaraid.h.

u32 sgl_off

Definition at line 240 of file megaraid.h.

u32 size

Definition at line 254 of file megaraid.h.

Definition at line 251 of file megaraid.h.

uint8_t subopcode

Definition at line 94 of file megaraid.h.

Definition at line 173 of file megaraid.h.

u16 timeout

Definition at line 182 of file megaraid.h.

u32 w[3]

Definition at line 240 of file megaraid.h.