#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/debugfs.h>
#include <linux/vmalloc.h>
#include <linux/math64.h>
#include <rdma/ib_verbs.h>
#include "iw_cxgb4.h"
#define DRV_VERSION …
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static int allow_db_fc_on_t5;
module_param(allow_db_fc_on_t5, int, 0644);
MODULE_PARM_DESC(…) …;
static int allow_db_coalescing_on_t5;
module_param(allow_db_coalescing_on_t5, int, 0644);
MODULE_PARM_DESC(…) …;
int c4iw_wr_log = …;
module_param(c4iw_wr_log, int, 0444);
MODULE_PARM_DESC(…) …;
static int c4iw_wr_log_size_order = …;
module_param(c4iw_wr_log_size_order, int, 0444);
MODULE_PARM_DESC(…) …;
static LIST_HEAD(uld_ctx_list);
static DEFINE_MUTEX(dev_mutex);
static struct workqueue_struct *reg_workq;
#define DB_FC_RESUME_SIZE …
#define DB_FC_RESUME_DELAY …
#define DB_FC_DRAIN_THRESH …
static struct dentry *c4iw_debugfs_root;
struct c4iw_debugfs_data { … };
static ssize_t debugfs_read(struct file *file, char __user *buf, size_t count,
loff_t *ppos)
{ … }
void c4iw_log_wr_stats(struct t4_wq *wq, struct t4_cqe *cqe)
{ … }
static int wr_log_show(struct seq_file *seq, void *v)
{ … }
static int wr_log_open(struct inode *inode, struct file *file)
{ … }
static ssize_t wr_log_clear(struct file *file, const char __user *buf,
size_t count, loff_t *pos)
{ … }
static const struct file_operations wr_log_debugfs_fops = …;
static struct sockaddr_in zero_sin = …;
static struct sockaddr_in6 zero_sin6 = …;
static void set_ep_sin_addrs(struct c4iw_ep *ep,
struct sockaddr_in **lsin,
struct sockaddr_in **rsin,
struct sockaddr_in **m_lsin,
struct sockaddr_in **m_rsin)
{ … }
static void set_ep_sin6_addrs(struct c4iw_ep *ep,
struct sockaddr_in6 **lsin6,
struct sockaddr_in6 **rsin6,
struct sockaddr_in6 **m_lsin6,
struct sockaddr_in6 **m_rsin6)
{ … }
static int dump_qp(unsigned long id, struct c4iw_qp *qp,
struct c4iw_debugfs_data *qpd)
{ … }
static int qp_release(struct inode *inode, struct file *file)
{ … }
static int qp_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations qp_debugfs_fops = …;
static int dump_stag(unsigned long id, struct c4iw_debugfs_data *stagd)
{ … }
static int stag_release(struct inode *inode, struct file *file)
{ … }
static int stag_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations stag_debugfs_fops = …;
static char *db_state_str[] = …;
static int stats_show(struct seq_file *seq, void *v)
{ … }
static int stats_open(struct inode *inode, struct file *file)
{ … }
static ssize_t stats_clear(struct file *file, const char __user *buf,
size_t count, loff_t *pos)
{ … }
static const struct file_operations stats_debugfs_fops = …;
static int dump_ep(struct c4iw_ep *ep, struct c4iw_debugfs_data *epd)
{ … }
static
int dump_listen_ep(struct c4iw_listen_ep *ep, struct c4iw_debugfs_data *epd)
{ … }
static int ep_release(struct inode *inode, struct file *file)
{ … }
static int ep_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations ep_debugfs_fops = …;
static void setup_debugfs(struct c4iw_dev *devp)
{ … }
void c4iw_release_dev_ucontext(struct c4iw_rdev *rdev,
struct c4iw_dev_ucontext *uctx)
{ … }
void c4iw_init_dev_ucontext(struct c4iw_rdev *rdev,
struct c4iw_dev_ucontext *uctx)
{ … }
static int c4iw_rdev_open(struct c4iw_rdev *rdev)
{ … }
static void c4iw_rdev_close(struct c4iw_rdev *rdev)
{ … }
void c4iw_dealloc(struct uld_ctx *ctx)
{ … }
static void c4iw_remove(struct uld_ctx *ctx)
{ … }
static int rdma_supported(const struct cxgb4_lld_info *infop)
{ … }
static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)
{ … }
static void *c4iw_uld_add(const struct cxgb4_lld_info *infop)
{ … }
static inline struct sk_buff *copy_gl_to_skb_pkt(const struct pkt_gl *gl,
const __be64 *rsp,
u32 pktshift)
{ … }
static inline int recv_rx_pkt(struct c4iw_dev *dev, const struct pkt_gl *gl,
const __be64 *rsp)
{ … }
static int c4iw_uld_rx_handler(void *handle, const __be64 *rsp,
const struct pkt_gl *gl)
{ … }
static int c4iw_uld_state_change(void *handle, enum cxgb4_state new_state)
{ … }
static void stop_queues(struct uld_ctx *ctx)
{ … }
static void resume_rc_qp(struct c4iw_qp *qp)
{ … }
static void resume_a_chunk(struct uld_ctx *ctx)
{ … }
static void resume_queues(struct uld_ctx *ctx)
{ … }
struct qp_list { … };
static void deref_qps(struct qp_list *qp_list)
{ … }
static void recover_lost_dbs(struct uld_ctx *ctx, struct qp_list *qp_list)
{ … }
static void recover_queues(struct uld_ctx *ctx)
{ … }
static int c4iw_uld_control(void *handle, enum cxgb4_control control, ...)
{ … }
static struct cxgb4_uld_info c4iw_uld_info = …;
void _c4iw_free_wr_wait(struct kref *kref)
{ … }
struct c4iw_wr_wait *c4iw_alloc_wr_wait(gfp_t gfp)
{ … }
static int __init c4iw_init_module(void)
{ … }
static void __exit c4iw_exit_module(void)
{ … }
module_init(…) …;
module_exit(c4iw_exit_module);