#ifndef __ERDMA_H__
#define __ERDMA_H__
#include <linux/bitfield.h>
#include <linux/netdevice.h>
#include <linux/pci.h>
#include <linux/xarray.h>
#include <rdma/ib_verbs.h>
#include "erdma_hw.h"
#define DRV_MODULE_NAME …
#define ERDMA_NODE_DESC …
struct erdma_eq { … };
struct erdma_cmdq_sq { … };
struct erdma_cmdq_cq { … };
enum { … };
struct erdma_comp_wait { … };
enum { … };
#define ERDMA_CMDQ_TIMEOUT_MS …
#define ERDMA_REG_ACCESS_WAIT_MS …
#define ERDMA_WAIT_DEV_DONE_CNT …
struct erdma_cmdq { … };
#define COMPROMISE_CC …
enum erdma_cc_alg { … };
struct erdma_devattr { … };
#define ERDMA_IRQNAME_SIZE …
struct erdma_irq { … };
struct erdma_eq_cb { … };
struct erdma_resource_cb { … };
enum { … };
struct erdma_dev { … };
static inline void *get_queue_entry(void *qbuf, u32 idx, u32 depth, u32 shift)
{ … }
static inline struct erdma_dev *to_edev(struct ib_device *ibdev)
{ … }
static inline u32 erdma_reg_read32(struct erdma_dev *dev, u32 reg)
{ … }
static inline u64 erdma_reg_read64(struct erdma_dev *dev, u32 reg)
{ … }
static inline void erdma_reg_write32(struct erdma_dev *dev, u32 reg, u32 value)
{ … }
static inline void erdma_reg_write64(struct erdma_dev *dev, u32 reg, u64 value)
{ … }
static inline u32 erdma_reg_read32_filed(struct erdma_dev *dev, u32 reg,
u32 filed_mask)
{ … }
#define ERDMA_GET(val, name) …
int erdma_cmdq_init(struct erdma_dev *dev);
void erdma_finish_cmdq_init(struct erdma_dev *dev);
void erdma_cmdq_destroy(struct erdma_dev *dev);
void erdma_cmdq_build_reqhdr(u64 *hdr, u32 mod, u32 op);
int erdma_post_cmd_wait(struct erdma_cmdq *cmdq, void *req, u32 req_size,
u64 *resp0, u64 *resp1);
void erdma_cmdq_completion_handler(struct erdma_cmdq *cmdq);
int erdma_ceqs_init(struct erdma_dev *dev);
void erdma_ceqs_uninit(struct erdma_dev *dev);
void notify_eq(struct erdma_eq *eq);
void *get_next_valid_eqe(struct erdma_eq *eq);
int erdma_aeq_init(struct erdma_dev *dev);
int erdma_eq_common_init(struct erdma_dev *dev, struct erdma_eq *eq, u32 depth);
void erdma_eq_destroy(struct erdma_dev *dev, struct erdma_eq *eq);
void erdma_aeq_event_handler(struct erdma_dev *dev);
void erdma_ceq_completion_handler(struct erdma_eq_cb *ceq_cb);
#endif