Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
mthca_cmd.h File Reference
#include <rdma/ib_verbs.h>

Go to the source code of this file.

Data Structures

struct  mthca_mailbox
 
struct  mthca_dev_lim
 
struct  mthca_adapter
 
struct  mthca_init_hca_param
 
struct  mthca_init_ib_param
 
struct  mthca_set_ib_param
 

Macros

#define MTHCA_MAILBOX_SIZE   4096
 

Enumerations

enum  {
  MTHCA_CMD_STAT_OK = 0x00, MTHCA_CMD_STAT_INTERNAL_ERR = 0x01, MTHCA_CMD_STAT_BAD_OP = 0x02, MTHCA_CMD_STAT_BAD_PARAM = 0x03,
  MTHCA_CMD_STAT_BAD_SYS_STATE = 0x04, MTHCA_CMD_STAT_BAD_RESOURCE = 0x05, MTHCA_CMD_STAT_RESOURCE_BUSY = 0x06, MTHCA_CMD_STAT_DDR_MEM_ERR = 0x07,
  MTHCA_CMD_STAT_EXCEED_LIM = 0x08, MTHCA_CMD_STAT_BAD_RES_STATE = 0x09, MTHCA_CMD_STAT_BAD_INDEX = 0x0a, MTHCA_CMD_STAT_BAD_NVMEM = 0x0b,
  MTHCA_CMD_STAT_BAD_QPEE_STATE = 0x10, MTHCA_CMD_STAT_BAD_SEG_PARAM = 0x20, MTHCA_CMD_STAT_REG_BOUND = 0x21, MTHCA_CMD_STAT_LAM_NOT_PRE = 0x22,
  MTHCA_CMD_STAT_BAD_PKT = 0x30, MTHCA_CMD_STAT_BAD_SIZE = 0x40
}
 
enum  {
  MTHCA_TRANS_INVALID = 0, MTHCA_TRANS_RST2INIT, MTHCA_TRANS_INIT2INIT, MTHCA_TRANS_INIT2RTR,
  MTHCA_TRANS_RTR2RTS, MTHCA_TRANS_RTS2RTS, MTHCA_TRANS_SQERR2RTS, MTHCA_TRANS_ANY2ERR,
  MTHCA_TRANS_RTS2SQD, MTHCA_TRANS_SQD2SQD, MTHCA_TRANS_SQD2RTS, MTHCA_TRANS_ANY2RST
}
 
enum  {
  DEV_LIM_FLAG_RC = 1 << 0, DEV_LIM_FLAG_UC = 1 << 1, DEV_LIM_FLAG_UD = 1 << 2, DEV_LIM_FLAG_RD = 1 << 3,
  DEV_LIM_FLAG_RAW_IPV6 = 1 << 4, DEV_LIM_FLAG_RAW_ETHER = 1 << 5, DEV_LIM_FLAG_SRQ = 1 << 6, DEV_LIM_FLAG_IPOIB_CSUM = 1 << 7,
  DEV_LIM_FLAG_BAD_PKEY_CNTR = 1 << 8, DEV_LIM_FLAG_BAD_QKEY_CNTR = 1 << 9, DEV_LIM_FLAG_MW = 1 << 16, DEV_LIM_FLAG_AUTO_PATH_MIG = 1 << 17,
  DEV_LIM_FLAG_ATOMIC = 1 << 18, DEV_LIM_FLAG_RAW_MULTI = 1 << 19, DEV_LIM_FLAG_UD_AV_PORT_ENFORCE = 1 << 20, DEV_LIM_FLAG_UD_MULTI = 1 << 21
}
 

Functions

int mthca_cmd_init (struct mthca_dev *dev)
 
void mthca_cmd_cleanup (struct mthca_dev *dev)
 
int mthca_cmd_use_events (struct mthca_dev *dev)
 
void mthca_cmd_use_polling (struct mthca_dev *dev)
 
void mthca_cmd_event (struct mthca_dev *dev, u16 token, u8 status, u64 out_param)
 
struct mthca_mailboxmthca_alloc_mailbox (struct mthca_dev *dev, gfp_t gfp_mask)
 
void mthca_free_mailbox (struct mthca_dev *dev, struct mthca_mailbox *mailbox)
 
int mthca_SYS_EN (struct mthca_dev *dev)
 
int mthca_SYS_DIS (struct mthca_dev *dev)
 
int mthca_MAP_FA (struct mthca_dev *dev, struct mthca_icm *icm)
 
int mthca_UNMAP_FA (struct mthca_dev *dev)
 
int mthca_RUN_FW (struct mthca_dev *dev)
 
int mthca_QUERY_FW (struct mthca_dev *dev)
 
int mthca_ENABLE_LAM (struct mthca_dev *dev)
 
int mthca_DISABLE_LAM (struct mthca_dev *dev)
 
int mthca_QUERY_DDR (struct mthca_dev *dev)
 
int mthca_QUERY_DEV_LIM (struct mthca_dev *dev, struct mthca_dev_lim *dev_lim)
 
int mthca_QUERY_ADAPTER (struct mthca_dev *dev, struct mthca_adapter *adapter)
 
int mthca_INIT_HCA (struct mthca_dev *dev, struct mthca_init_hca_param *param)
 
int mthca_INIT_IB (struct mthca_dev *dev, struct mthca_init_ib_param *param, int port)
 
int mthca_CLOSE_IB (struct mthca_dev *dev, int port)
 
int mthca_CLOSE_HCA (struct mthca_dev *dev, int panic)
 
int mthca_SET_IB (struct mthca_dev *dev, struct mthca_set_ib_param *param, int port)
 
int mthca_MAP_ICM (struct mthca_dev *dev, struct mthca_icm *icm, u64 virt)
 
int mthca_MAP_ICM_page (struct mthca_dev *dev, u64 dma_addr, u64 virt)
 
int mthca_UNMAP_ICM (struct mthca_dev *dev, u64 virt, u32 page_count)
 
int mthca_MAP_ICM_AUX (struct mthca_dev *dev, struct mthca_icm *icm)
 
int mthca_UNMAP_ICM_AUX (struct mthca_dev *dev)
 
int mthca_SET_ICM_SIZE (struct mthca_dev *dev, u64 icm_size, u64 *aux_pages)
 
int mthca_SW2HW_MPT (struct mthca_dev *dev, struct mthca_mailbox *mailbox, int mpt_index)
 
int mthca_HW2SW_MPT (struct mthca_dev *dev, struct mthca_mailbox *mailbox, int mpt_index)
 
int mthca_WRITE_MTT (struct mthca_dev *dev, struct mthca_mailbox *mailbox, int num_mtt)
 
int mthca_SYNC_TPT (struct mthca_dev *dev)
 
int mthca_MAP_EQ (struct mthca_dev *dev, u64 event_mask, int unmap, int eq_num)
 
int mthca_SW2HW_EQ (struct mthca_dev *dev, struct mthca_mailbox *mailbox, int eq_num)
 
int mthca_HW2SW_EQ (struct mthca_dev *dev, struct mthca_mailbox *mailbox, int eq_num)
 
int mthca_SW2HW_CQ (struct mthca_dev *dev, struct mthca_mailbox *mailbox, int cq_num)
 
int mthca_HW2SW_CQ (struct mthca_dev *dev, struct mthca_mailbox *mailbox, int cq_num)
 
int mthca_RESIZE_CQ (struct mthca_dev *dev, int cq_num, u32 lkey, u8 log_size)
 
int mthca_SW2HW_SRQ (struct mthca_dev *dev, struct mthca_mailbox *mailbox, int srq_num)
 
int mthca_HW2SW_SRQ (struct mthca_dev *dev, struct mthca_mailbox *mailbox, int srq_num)
 
int mthca_QUERY_SRQ (struct mthca_dev *dev, u32 num, struct mthca_mailbox *mailbox)
 
int mthca_ARM_SRQ (struct mthca_dev *dev, int srq_num, int limit)
 
int mthca_MODIFY_QP (struct mthca_dev *dev, enum ib_qp_state cur, enum ib_qp_state next, u32 num, int is_ee, struct mthca_mailbox *mailbox, u32 optmask)
 
int mthca_QUERY_QP (struct mthca_dev *dev, u32 num, int is_ee, struct mthca_mailbox *mailbox)
 
int mthca_CONF_SPECIAL_QP (struct mthca_dev *dev, int type, u32 qpn)
 
int mthca_MAD_IFC (struct mthca_dev *dev, int ignore_mkey, int ignore_bkey, int port, struct ib_wc *in_wc, struct ib_grh *in_grh, void *in_mad, void *response_mad)
 
int mthca_READ_MGM (struct mthca_dev *dev, int index, struct mthca_mailbox *mailbox)
 
int mthca_WRITE_MGM (struct mthca_dev *dev, int index, struct mthca_mailbox *mailbox)
 
int mthca_MGID_HASH (struct mthca_dev *dev, struct mthca_mailbox *mailbox, u16 *hash)
 
int mthca_NOP (struct mthca_dev *dev)
 

Macro Definition Documentation

#define MTHCA_MAILBOX_SIZE   4096

Definition at line 40 of file mthca_cmd.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
MTHCA_CMD_STAT_OK 
MTHCA_CMD_STAT_INTERNAL_ERR 
MTHCA_CMD_STAT_BAD_OP 
MTHCA_CMD_STAT_BAD_PARAM 
MTHCA_CMD_STAT_BAD_SYS_STATE 
MTHCA_CMD_STAT_BAD_RESOURCE 
MTHCA_CMD_STAT_RESOURCE_BUSY 
MTHCA_CMD_STAT_DDR_MEM_ERR 
MTHCA_CMD_STAT_EXCEED_LIM 
MTHCA_CMD_STAT_BAD_RES_STATE 
MTHCA_CMD_STAT_BAD_INDEX 
MTHCA_CMD_STAT_BAD_NVMEM 
MTHCA_CMD_STAT_BAD_QPEE_STATE 
MTHCA_CMD_STAT_BAD_SEG_PARAM 
MTHCA_CMD_STAT_REG_BOUND 
MTHCA_CMD_STAT_LAM_NOT_PRE 
MTHCA_CMD_STAT_BAD_PKT 
MTHCA_CMD_STAT_BAD_SIZE 

Definition at line 42 of file mthca_cmd.h.

anonymous enum
Enumerator:
MTHCA_TRANS_INVALID 
MTHCA_TRANS_RST2INIT 
MTHCA_TRANS_INIT2INIT 
MTHCA_TRANS_INIT2RTR 
MTHCA_TRANS_RTR2RTS 
MTHCA_TRANS_RTS2RTS 
MTHCA_TRANS_SQERR2RTS 
MTHCA_TRANS_ANY2ERR 
MTHCA_TRANS_RTS2SQD 
MTHCA_TRANS_SQD2SQD 
MTHCA_TRANS_SQD2RTS 
MTHCA_TRANS_ANY2RST 

Definition at line 81 of file mthca_cmd.h.

anonymous enum
Enumerator:
DEV_LIM_FLAG_RC 
DEV_LIM_FLAG_UC 
DEV_LIM_FLAG_UD 
DEV_LIM_FLAG_RD 
DEV_LIM_FLAG_RAW_IPV6 
DEV_LIM_FLAG_RAW_ETHER 
DEV_LIM_FLAG_SRQ 
DEV_LIM_FLAG_IPOIB_CSUM 
DEV_LIM_FLAG_BAD_PKEY_CNTR 
DEV_LIM_FLAG_BAD_QKEY_CNTR 
DEV_LIM_FLAG_MW 
DEV_LIM_FLAG_AUTO_PATH_MIG 
DEV_LIM_FLAG_ATOMIC 
DEV_LIM_FLAG_RAW_MULTI 
DEV_LIM_FLAG_UD_AV_PORT_ENFORCE 
DEV_LIM_FLAG_UD_MULTI 

Definition at line 96 of file mthca_cmd.h.

Function Documentation

struct mthca_mailbox* mthca_alloc_mailbox ( struct mthca_dev dev,
gfp_t  gfp_mask 
)
read

Definition at line 607 of file mthca_cmd.c.

int mthca_ARM_SRQ ( struct mthca_dev dev,
int  srq_num,
int  limit 
)

Definition at line 1719 of file mthca_cmd.c.

int mthca_CLOSE_HCA ( struct mthca_dev dev,
int  panic 
)

Definition at line 1491 of file mthca_cmd.c.

int mthca_CLOSE_IB ( struct mthca_dev dev,
int  port 
)

Definition at line 1486 of file mthca_cmd.c.

void mthca_cmd_cleanup ( struct mthca_dev dev)

Definition at line 544 of file mthca_cmd.c.

void mthca_cmd_event ( struct mthca_dev dev,
u16  token,
u8  status,
u64  out_param 
)

Definition at line 389 of file mthca_cmd.c.

int mthca_cmd_init ( struct mthca_dev dev)

Definition at line 520 of file mthca_cmd.c.

int mthca_cmd_use_events ( struct mthca_dev dev)

Definition at line 556 of file mthca_cmd.c.

void mthca_cmd_use_polling ( struct mthca_dev dev)

Definition at line 593 of file mthca_cmd.c.

int mthca_CONF_SPECIAL_QP ( struct mthca_dev dev,
int  type,
u32  qpn 
)

Definition at line 1835 of file mthca_cmd.c.

int mthca_DISABLE_LAM ( struct mthca_dev dev)

Definition at line 931 of file mthca_cmd.c.

int mthca_ENABLE_LAM ( struct mthca_dev dev)

Definition at line 881 of file mthca_cmd.c.

void mthca_free_mailbox ( struct mthca_dev dev,
struct mthca_mailbox mailbox 
)

Definition at line 625 of file mthca_cmd.c.

int mthca_HW2SW_CQ ( struct mthca_dev dev,
struct mthca_mailbox mailbox,
int  cq_num 
)

Definition at line 1659 of file mthca_cmd.c.

int mthca_HW2SW_EQ ( struct mthca_dev dev,
struct mthca_mailbox mailbox,
int  eq_num 
)

Definition at line 1644 of file mthca_cmd.c.

int mthca_HW2SW_MPT ( struct mthca_dev dev,
struct mthca_mailbox mailbox,
int  mpt_index 
)

Definition at line 1607 of file mthca_cmd.c.

int mthca_HW2SW_SRQ ( struct mthca_dev dev,
struct mthca_mailbox mailbox,
int  srq_num 
)

Definition at line 1704 of file mthca_cmd.c.

int mthca_INIT_HCA ( struct mthca_dev dev,
struct mthca_init_hca_param param 
)

Definition at line 1309 of file mthca_cmd.c.

int mthca_INIT_IB ( struct mthca_dev dev,
struct mthca_init_ib_param param,
int  port 
)

Definition at line 1434 of file mthca_cmd.c.

int mthca_MAD_IFC ( struct mthca_dev dev,
int  ignore_mkey,
int  ignore_bkey,
int  port,
struct ib_wc in_wc,
struct ib_grh in_grh,
void in_mad,
void response_mad 
)

Definition at line 1860 of file mthca_cmd.c.

int mthca_MAP_EQ ( struct mthca_dev dev,
u64  event_mask,
int  unmap,
int  eq_num 
)

Definition at line 1627 of file mthca_cmd.c.

int mthca_MAP_FA ( struct mthca_dev dev,
struct mthca_icm icm 
)

Definition at line 734 of file mthca_cmd.c.

int mthca_MAP_ICM ( struct mthca_dev dev,
struct mthca_icm icm,
u64  virt 
)

Definition at line 1532 of file mthca_cmd.c.

int mthca_MAP_ICM_AUX ( struct mthca_dev dev,
struct mthca_icm icm 
)

Definition at line 1572 of file mthca_cmd.c.

int mthca_MAP_ICM_page ( struct mthca_dev dev,
u64  dma_addr,
u64  virt 
)

Definition at line 1537 of file mthca_cmd.c.

int mthca_MGID_HASH ( struct mthca_dev dev,
struct mthca_mailbox mailbox,
u16 hash 
)

Definition at line 1953 of file mthca_cmd.c.

int mthca_MODIFY_QP ( struct mthca_dev dev,
enum ib_qp_state  cur,
enum ib_qp_state  next,
u32  num,
int  is_ee,
struct mthca_mailbox mailbox,
u32  optmask 
)

Definition at line 1725 of file mthca_cmd.c.

int mthca_NOP ( struct mthca_dev dev)

Definition at line 1966 of file mthca_cmd.c.

int mthca_QUERY_ADAPTER ( struct mthca_dev dev,
struct mthca_adapter adapter 
)

Definition at line 1266 of file mthca_cmd.c.

int mthca_QUERY_DDR ( struct mthca_dev dev)

Definition at line 936 of file mthca_cmd.c.

int mthca_QUERY_DEV_LIM ( struct mthca_dev dev,
struct mthca_dev_lim dev_lim 
)

Definition at line 986 of file mthca_cmd.c.

int mthca_QUERY_FW ( struct mthca_dev dev)

Definition at line 775 of file mthca_cmd.c.

int mthca_QUERY_QP ( struct mthca_dev dev,
u32  num,
int  is_ee,
struct mthca_mailbox mailbox 
)

Definition at line 1828 of file mthca_cmd.c.

int mthca_QUERY_SRQ ( struct mthca_dev dev,
u32  num,
struct mthca_mailbox mailbox 
)

Definition at line 1712 of file mthca_cmd.c.

int mthca_READ_MGM ( struct mthca_dev dev,
int  index,
struct mthca_mailbox mailbox 
)

Definition at line 1939 of file mthca_cmd.c.

int mthca_RESIZE_CQ ( struct mthca_dev dev,
int  cq_num,
u32  lkey,
u8  log_size 
)

Definition at line 1667 of file mthca_cmd.c.

int mthca_RUN_FW ( struct mthca_dev dev)

Definition at line 744 of file mthca_cmd.c.

int mthca_SET_IB ( struct mthca_dev dev,
struct mthca_set_ib_param param,
int  port 
)

Definition at line 1496 of file mthca_cmd.c.

int mthca_SET_ICM_SIZE ( struct mthca_dev dev,
u64  icm_size,
u64 aux_pages 
)

Definition at line 1582 of file mthca_cmd.c.

int mthca_SW2HW_CQ ( struct mthca_dev dev,
struct mthca_mailbox mailbox,
int  cq_num 
)

Definition at line 1652 of file mthca_cmd.c.

int mthca_SW2HW_EQ ( struct mthca_dev dev,
struct mthca_mailbox mailbox,
int  eq_num 
)

Definition at line 1637 of file mthca_cmd.c.

int mthca_SW2HW_MPT ( struct mthca_dev dev,
struct mthca_mailbox mailbox,
int  mpt_index 
)

Definition at line 1600 of file mthca_cmd.c.

int mthca_SW2HW_SRQ ( struct mthca_dev dev,
struct mthca_mailbox mailbox,
int  srq_num 
)

Definition at line 1697 of file mthca_cmd.c.

int mthca_SYNC_TPT ( struct mthca_dev dev)

Definition at line 1622 of file mthca_cmd.c.

int mthca_SYS_DIS ( struct mthca_dev dev)

Definition at line 650 of file mthca_cmd.c.

int mthca_SYS_EN ( struct mthca_dev dev)

Definition at line 634 of file mthca_cmd.c.

int mthca_UNMAP_FA ( struct mthca_dev dev)

Definition at line 739 of file mthca_cmd.c.

int mthca_UNMAP_ICM ( struct mthca_dev dev,
u64  virt,
u32  page_count 
)

Definition at line 1563 of file mthca_cmd.c.

int mthca_UNMAP_ICM_AUX ( struct mthca_dev dev)

Definition at line 1577 of file mthca_cmd.c.

int mthca_WRITE_MGM ( struct mthca_dev dev,
int  index,
struct mthca_mailbox mailbox 
)

Definition at line 1946 of file mthca_cmd.c.

int mthca_WRITE_MTT ( struct mthca_dev dev,
struct mthca_mailbox mailbox,
int  num_mtt 
)

Definition at line 1615 of file mthca_cmd.c.