Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
cxio_hal.h File Reference
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/kfifo.h>
#include "t3_cpl.h"
#include "t3cdev.h"
#include "cxgb3_ctl_defs.h"
#include "cxio_wr.h"

Go to the source code of this file.

Data Structures

struct  cxio_hal_ctrl_qp
 
struct  cxio_hal_resource
 
struct  cxio_qpid_list
 
struct  cxio_ucontext
 
struct  cxio_rdev
 
struct  respQ_msg_t
 

Macros

#define T3_CTRL_QP_ID   FW_RI_SGEEC_START
 
#define T3_CTL_QP_TID   FW_RI_TID_START
 
#define T3_CTRL_QP_SIZE_LOG2   8
 
#define T3_CTRL_CQ_ID   0
 
#define T3_MAX_NUM_RI   (1<<15)
 
#define T3_MAX_NUM_QP   (1<<15)
 
#define T3_MAX_NUM_CQ   (1<<15)
 
#define T3_MAX_NUM_PD   (1<<15)
 
#define T3_MAX_PBL_SIZE   256
 
#define T3_MAX_RQ_SIZE   1024
 
#define T3_MAX_QP_DEPTH   (T3_MAX_RQ_SIZE-1)
 
#define T3_MAX_CQ_DEPTH   65536
 
#define T3_MAX_NUM_STAG   (1<<15)
 
#define T3_MAX_MR_SIZE   0x100000000ULL
 
#define T3_PAGESIZE_MASK   0xffff000 /* 4KB-128MB */
 
#define T3_STAG_UNSET   0xffffffff
 
#define T3_MAX_DEV_NAME_LEN   32
 
#define CXIO_FW_MAJ   7
 
#define CXIO_ERROR_FATAL   1
 
#define RSPQ_CQID(rsp)   (be32_to_cpu(rsp->cq_ptrid) & 0xffff)
 
#define RSPQ_CQPTR(rsp)   ((be32_to_cpu(rsp->cq_ptrid) >> 16) & 0xffff)
 
#define RSPQ_GENBIT(rsp)   ((be32_to_cpu(rsp->flags) >> 16) & 1)
 
#define RSPQ_OVERFLOW(rsp)   ((be32_to_cpu(rsp->flags) >> 17) & 1)
 
#define RSPQ_AN(rsp)   ((be32_to_cpu(rsp->flags) >> 18) & 1)
 
#define RSPQ_SE(rsp)   ((be32_to_cpu(rsp->flags) >> 19) & 1)
 
#define RSPQ_NOTIFY(rsp)   ((be32_to_cpu(rsp->flags) >> 20) & 1)
 
#define RSPQ_CQBRANCH(rsp)   ((be32_to_cpu(rsp->flags) >> 21) & 1)
 
#define RSPQ_CREDIT_THRESH(rsp)   ((be32_to_cpu(rsp->flags) >> 22) & 1)
 
#define MOD   "iw_cxgb3: "
 
#define PDBG(fmt, args...)   pr_debug(MOD fmt, ## args)
 

Typedefs

typedef void(* cxio_hal_ev_callback_func_t )(struct cxio_rdev *rdev_p, struct sk_buff *skb)
 

Enumerations

enum  t3_cq_opcode { CQ_ARM_AN = 0x2, CQ_ARM_SE = 0x6, CQ_FORCE_AN = 0x3, CQ_CREDIT_UPDATE = 0x7 }
 

Functions

int cxio_rdev_open (struct cxio_rdev *rdev)
 
void cxio_rdev_close (struct cxio_rdev *rdev)
 
int cxio_hal_cq_op (struct cxio_rdev *rdev, struct t3_cq *cq, enum t3_cq_opcode op, u32 credit)
 
int cxio_create_cq (struct cxio_rdev *rdev, struct t3_cq *cq, int kernel)
 
int cxio_destroy_cq (struct cxio_rdev *rdev, struct t3_cq *cq)
 
int cxio_resize_cq (struct cxio_rdev *rdev, struct t3_cq *cq)
 
void cxio_release_ucontext (struct cxio_rdev *rdev, struct cxio_ucontext *uctx)
 
void cxio_init_ucontext (struct cxio_rdev *rdev, struct cxio_ucontext *uctx)
 
int cxio_create_qp (struct cxio_rdev *rdev, u32 kernel_domain, struct t3_wq *wq, struct cxio_ucontext *uctx)
 
int cxio_destroy_qp (struct cxio_rdev *rdev, struct t3_wq *wq, struct cxio_ucontext *uctx)
 
int cxio_peek_cq (struct t3_wq *wr, struct t3_cq *cq, int opcode)
 
int cxio_write_pbl (struct cxio_rdev *rdev_p, __be64 *pbl, u32 pbl_addr, u32 pbl_size)
 
int cxio_register_phys_mem (struct cxio_rdev *rdev, u32 *stag, u32 pdid, enum tpt_mem_perm perm, u32 zbva, u64 to, u32 len, u8 page_size, u32 pbl_size, u32 pbl_addr)
 
int cxio_reregister_phys_mem (struct cxio_rdev *rdev, u32 *stag, u32 pdid, enum tpt_mem_perm perm, u32 zbva, u64 to, u32 len, u8 page_size, u32 pbl_size, u32 pbl_addr)
 
int cxio_dereg_mem (struct cxio_rdev *rdev, u32 stag, u32 pbl_size, u32 pbl_addr)
 
int cxio_allocate_window (struct cxio_rdev *rdev, u32 *stag, u32 pdid)
 
int cxio_allocate_stag (struct cxio_rdev *rdev, u32 *stag, u32 pdid, u32 pbl_size, u32 pbl_addr)
 
int cxio_deallocate_window (struct cxio_rdev *rdev, u32 stag)
 
int cxio_rdma_init (struct cxio_rdev *rdev, struct t3_rdma_init_attr *attr)
 
void cxio_register_ev_cb (cxio_hal_ev_callback_func_t ev_cb)
 
void cxio_unregister_ev_cb (cxio_hal_ev_callback_func_t ev_cb)
 
u32 cxio_hal_get_pdid (struct cxio_hal_resource *rscp)
 
void cxio_hal_put_pdid (struct cxio_hal_resource *rscp, u32 pdid)
 
int __init cxio_hal_init (void)
 
void __exit cxio_hal_exit (void)
 
int cxio_flush_rq (struct t3_wq *wq, struct t3_cq *cq, int count)
 
int cxio_flush_sq (struct t3_wq *wq, struct t3_cq *cq, int count)
 
void cxio_count_rcqes (struct t3_cq *cq, struct t3_wq *wq, int *count)
 
void cxio_count_scqes (struct t3_cq *cq, struct t3_wq *wq, int *count)
 
void cxio_flush_hw_cq (struct t3_cq *cq)
 
int cxio_poll_cq (struct t3_wq *wq, struct t3_cq *cq, struct t3_cqe *cqe, u8 *cqe_flushed, u64 *cookie, u32 *credit)
 
int iwch_cxgb3_ofld_send (struct t3cdev *tdev, struct sk_buff *skb)
 

Macro Definition Documentation

#define CXIO_ERROR_FATAL   1

Definition at line 116 of file cxio_hal.h.

#define CXIO_FW_MAJ   7

Definition at line 65 of file cxio_hal.h.

#define MOD   "iw_cxgb3: "

Definition at line 199 of file cxio_hal.h.

#define PDBG (   fmt,
  args... 
)    pr_debug(MOD fmt, ## args)

Definition at line 200 of file cxio_hal.h.

#define RSPQ_AN (   rsp)    ((be32_to_cpu(rsp->flags) >> 18) & 1)

Definition at line 136 of file cxio_hal.h.

#define RSPQ_CQBRANCH (   rsp)    ((be32_to_cpu(rsp->flags) >> 21) & 1)

Definition at line 139 of file cxio_hal.h.

#define RSPQ_CQID (   rsp)    (be32_to_cpu(rsp->cq_ptrid) & 0xffff)

Definition at line 132 of file cxio_hal.h.

#define RSPQ_CQPTR (   rsp)    ((be32_to_cpu(rsp->cq_ptrid) >> 16) & 0xffff)

Definition at line 133 of file cxio_hal.h.

#define RSPQ_CREDIT_THRESH (   rsp)    ((be32_to_cpu(rsp->flags) >> 22) & 1)

Definition at line 140 of file cxio_hal.h.

#define RSPQ_GENBIT (   rsp)    ((be32_to_cpu(rsp->flags) >> 16) & 1)

Definition at line 134 of file cxio_hal.h.

#define RSPQ_NOTIFY (   rsp)    ((be32_to_cpu(rsp->flags) >> 20) & 1)

Definition at line 138 of file cxio_hal.h.

#define RSPQ_OVERFLOW (   rsp)    ((be32_to_cpu(rsp->flags) >> 17) & 1)

Definition at line 135 of file cxio_hal.h.

#define RSPQ_SE (   rsp)    ((be32_to_cpu(rsp->flags) >> 19) & 1)

Definition at line 137 of file cxio_hal.h.

#define T3_CTL_QP_TID   FW_RI_TID_START

Definition at line 45 of file cxio_hal.h.

#define T3_CTRL_CQ_ID   0

Definition at line 47 of file cxio_hal.h.

#define T3_CTRL_QP_ID   FW_RI_SGEEC_START

Definition at line 44 of file cxio_hal.h.

#define T3_CTRL_QP_SIZE_LOG2   8

Definition at line 46 of file cxio_hal.h.

#define T3_MAX_CQ_DEPTH   65536

Definition at line 56 of file cxio_hal.h.

#define T3_MAX_DEV_NAME_LEN   32

Definition at line 63 of file cxio_hal.h.

#define T3_MAX_MR_SIZE   0x100000000ULL

Definition at line 58 of file cxio_hal.h.

#define T3_MAX_NUM_CQ   (1<<15)

Definition at line 51 of file cxio_hal.h.

#define T3_MAX_NUM_PD   (1<<15)

Definition at line 52 of file cxio_hal.h.

#define T3_MAX_NUM_QP   (1<<15)

Definition at line 50 of file cxio_hal.h.

#define T3_MAX_NUM_RI   (1<<15)

Definition at line 49 of file cxio_hal.h.

#define T3_MAX_NUM_STAG   (1<<15)

Definition at line 57 of file cxio_hal.h.

#define T3_MAX_PBL_SIZE   256

Definition at line 53 of file cxio_hal.h.

#define T3_MAX_QP_DEPTH   (T3_MAX_RQ_SIZE-1)

Definition at line 55 of file cxio_hal.h.

#define T3_MAX_RQ_SIZE   1024

Definition at line 54 of file cxio_hal.h.

#define T3_PAGESIZE_MASK   0xffff000 /* 4KB-128MB */

Definition at line 59 of file cxio_hal.h.

#define T3_STAG_UNSET   0xffffffff

Definition at line 61 of file cxio_hal.h.

Typedef Documentation

typedef void(* cxio_hal_ev_callback_func_t)(struct cxio_rdev *rdev_p, struct sk_buff *skb)

Definition at line 129 of file cxio_hal.h.

Enumeration Type Documentation

Enumerator:
CQ_ARM_AN 
CQ_ARM_SE 
CQ_FORCE_AN 
CQ_CREDIT_UPDATE 

Definition at line 149 of file cxio_hal.h.

Function Documentation

int cxio_allocate_stag ( struct cxio_rdev rdev,
u32 stag,
u32  pdid,
u32  pbl_size,
u32  pbl_addr 
)

Definition at line 829 of file cxio_hal.c.

int cxio_allocate_window ( struct cxio_rdev rdev,
u32 stag,
u32  pdid 
)

Definition at line 816 of file cxio_hal.c.

void cxio_count_rcqes ( struct t3_cq cq,
struct t3_wq wq,
int count 
)

Definition at line 482 of file cxio_hal.c.

void cxio_count_scqes ( struct t3_cq cq,
struct t3_wq wq,
int count 
)

Definition at line 464 of file cxio_hal.c.

int cxio_create_cq ( struct cxio_rdev rdev,
struct t3_cq cq,
int  kernel 
)

Definition at line 158 of file cxio_hal.c.

int cxio_create_qp ( struct cxio_rdev rdev,
u32  kernel_domain,
struct t3_wq wq,
struct cxio_ucontext uctx 
)

Definition at line 274 of file cxio_hal.c.

int cxio_deallocate_window ( struct cxio_rdev rdev,
u32  stag 
)

Definition at line 823 of file cxio_hal.c.

int cxio_dereg_mem ( struct cxio_rdev rdev,
u32  stag,
u32  pbl_size,
u32  pbl_addr 
)

Definition at line 809 of file cxio_hal.c.

int cxio_destroy_cq ( struct cxio_rdev rdev,
struct t3_cq cq 
)

Definition at line 323 of file cxio_hal.c.

int cxio_destroy_qp ( struct cxio_rdev rdev,
struct t3_wq wq,
struct cxio_ucontext uctx 
)

Definition at line 336 of file cxio_hal.c.

void cxio_flush_hw_cq ( struct t3_cq cq)

Definition at line 428 of file cxio_hal.c.

int cxio_flush_rq ( struct t3_wq wq,
struct t3_cq cq,
int  count 
)

Definition at line 368 of file cxio_hal.c.

int cxio_flush_sq ( struct t3_wq wq,
struct t3_cq cq,
int  count 
)

Definition at line 407 of file cxio_hal.c.

int cxio_hal_cq_op ( struct cxio_rdev rdev,
struct t3_cq cq,
enum t3_cq_opcode  op,
u32  credit 
)

Definition at line 71 of file cxio_hal.c.

void __exit cxio_hal_exit ( void  )

Definition at line 1065 of file cxio_hal.c.

u32 cxio_hal_get_pdid ( struct cxio_hal_resource rscp)

Definition at line 232 of file cxio_resource.c.

int __init cxio_hal_init ( void  )

Definition at line 1057 of file cxio_hal.c.

void cxio_hal_put_pdid ( struct cxio_hal_resource rscp,
u32  pdid 
)

Definition at line 237 of file cxio_resource.c.

void cxio_init_ucontext ( struct cxio_rdev rdev,
struct cxio_ucontext uctx 
)

Definition at line 268 of file cxio_hal.c.

int cxio_peek_cq ( struct t3_wq wr,
struct t3_cq cq,
int  opcode 
)
int cxio_poll_cq ( struct t3_wq wq,
struct t3_cq cq,
struct t3_cqe cqe,
u8 cqe_flushed,
u64 cookie,
u32 credit 
)

Definition at line 1149 of file cxio_hal.c.

void cxio_rdev_close ( struct cxio_rdev rdev)

Definition at line 1045 of file cxio_hal.c.

int cxio_rdev_open ( struct cxio_rdev rdev)

Definition at line 918 of file cxio_hal.c.

int cxio_rdma_init ( struct cxio_rdev rdev,
struct t3_rdma_init_attr attr 
)

Definition at line 836 of file cxio_hal.c.

void cxio_register_ev_cb ( cxio_hal_ev_callback_func_t  ev_cb)

Definition at line 870 of file cxio_hal.c.

int cxio_register_phys_mem ( struct cxio_rdev rdev,
u32 stag,
u32  pdid,
enum tpt_mem_perm  perm,
u32  zbva,
u64  to,
u32  len,
u8  page_size,
u32  pbl_size,
u32  pbl_addr 
)

Definition at line 792 of file cxio_hal.c.

void cxio_release_ucontext ( struct cxio_rdev rdev,
struct cxio_ucontext uctx 
)

Definition at line 252 of file cxio_hal.c.

int cxio_reregister_phys_mem ( struct cxio_rdev rdev,
u32 stag,
u32  pdid,
enum tpt_mem_perm  perm,
u32  zbva,
u64  to,
u32  len,
u8  page_size,
u32  pbl_size,
u32  pbl_addr 
)

Definition at line 801 of file cxio_hal.c.

int cxio_resize_cq ( struct cxio_rdev rdev,
struct t3_cq cq 
)
void cxio_unregister_ev_cb ( cxio_hal_ev_callback_func_t  ev_cb)

Definition at line 875 of file cxio_hal.c.

int cxio_write_pbl ( struct cxio_rdev rdev_p,
__be64 pbl,
u32  pbl_addr,
u32  pbl_size 
)

Definition at line 766 of file cxio_hal.c.

int iwch_cxgb3_ofld_send ( struct t3cdev tdev,
struct sk_buff skb 
)

Definition at line 156 of file iwch_cm.c.