#include <linux/module.h>
#include <linux/moduleparam.h>
#include <rdma/ib_umem.h>
#include <linux/atomic.h>
#include <rdma/ib_user_verbs.h>
#include "iw_cxgb4.h"
int use_dsgl = …;
module_param(use_dsgl, int, 0644);
MODULE_PARM_DESC(…) …;
#define T4_ULPTX_MIN_IO …
#define C4IW_MAX_INLINE_SIZE …
#define T4_ULPTX_MAX_DMA …
#define C4IW_INLINE_THRESHOLD …
static int inline_threshold = …;
module_param(inline_threshold, int, 0644);
MODULE_PARM_DESC(…) …;
static int mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length)
{ … }
static int _c4iw_write_mem_dma_aligned(struct c4iw_rdev *rdev, u32 addr,
u32 len, dma_addr_t data,
struct sk_buff *skb,
struct c4iw_wr_wait *wr_waitp)
{ … }
static int _c4iw_write_mem_inline(struct c4iw_rdev *rdev, u32 addr, u32 len,
void *data, struct sk_buff *skb,
struct c4iw_wr_wait *wr_waitp)
{ … }
static int _c4iw_write_mem_dma(struct c4iw_rdev *rdev, u32 addr, u32 len,
void *data, struct sk_buff *skb,
struct c4iw_wr_wait *wr_waitp)
{ … }
static int write_adapter_mem(struct c4iw_rdev *rdev, u32 addr, u32 len,
void *data, struct sk_buff *skb,
struct c4iw_wr_wait *wr_waitp)
{ … }
static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
u32 *stag, u8 stag_state, u32 pdid,
enum fw_ri_stag_type type, enum fw_ri_mem_perms perm,
int bind_enabled, u32 zbva, u64 to,
u64 len, u8 page_size, u32 pbl_size, u32 pbl_addr,
struct sk_buff *skb, struct c4iw_wr_wait *wr_waitp)
{ … }
static int write_pbl(struct c4iw_rdev *rdev, __be64 *pbl,
u32 pbl_addr, u32 pbl_size, struct c4iw_wr_wait *wr_waitp)
{ … }
static int dereg_mem(struct c4iw_rdev *rdev, u32 stag, u32 pbl_size,
u32 pbl_addr, struct sk_buff *skb,
struct c4iw_wr_wait *wr_waitp)
{ … }
static int allocate_stag(struct c4iw_rdev *rdev, u32 *stag, u32 pdid,
u32 pbl_size, u32 pbl_addr,
struct c4iw_wr_wait *wr_waitp)
{ … }
static int finish_mem_reg(struct c4iw_mr *mhp, u32 stag)
{ … }
static int register_mem(struct c4iw_dev *rhp, struct c4iw_pd *php,
struct c4iw_mr *mhp, int shift)
{ … }
static int alloc_pbl(struct c4iw_mr *mhp, int npages)
{ … }
struct ib_mr *c4iw_get_dma_mr(struct ib_pd *pd, int acc)
{ … }
struct ib_mr *c4iw_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
u64 virt, int acc, struct ib_udata *udata)
{ … }
struct ib_mr *c4iw_alloc_mr(struct ib_pd *pd, enum ib_mr_type mr_type,
u32 max_num_sg)
{ … }
static int c4iw_set_page(struct ib_mr *ibmr, u64 addr)
{ … }
int c4iw_map_mr_sg(struct ib_mr *ibmr, struct scatterlist *sg, int sg_nents,
unsigned int *sg_offset)
{ … }
int c4iw_dereg_mr(struct ib_mr *ib_mr, struct ib_udata *udata)
{ … }
void c4iw_invalidate_mr(struct c4iw_dev *rhp, u32 rkey)
{ … }