#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/semaphore.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/err.h>
#include "hinic_hw_dev.h"
#include "hinic_hw_if.h"
#include "hinic_hw_eqs.h"
#include "hinic_hw_wqe.h"
#include "hinic_hw_wq.h"
#include "hinic_hw_cmdq.h"
#include "hinic_hw_qp_ctxt.h"
#include "hinic_hw_qp.h"
#include "hinic_hw_io.h"
#define CI_Q_ADDR_SIZE …
#define CI_ADDR(base_addr, q_id) …
#define CI_TABLE_SIZE(num_qps) …
#define DB_IDX(db, db_base) …
#define HINIC_PAGE_SIZE_HW(pg_size) …
enum io_cmd { … };
static void init_db_area_idx(struct hinic_free_db_area *free_db_area)
{ … }
static void __iomem *get_db_area(struct hinic_func_to_io *func_to_io)
{ … }
static void return_db_area(struct hinic_func_to_io *func_to_io,
void __iomem *db_base)
{ … }
static int write_sq_ctxts(struct hinic_func_to_io *func_to_io, u16 base_qpn,
u16 num_sqs)
{ … }
static int write_rq_ctxts(struct hinic_func_to_io *func_to_io, u16 base_qpn,
u16 num_rqs)
{ … }
static int write_qp_ctxts(struct hinic_func_to_io *func_to_io, u16 base_qpn,
u16 num_qps)
{ … }
static int hinic_clean_queue_offload_ctxt(struct hinic_func_to_io *func_to_io,
enum hinic_qp_ctxt_type ctxt_type)
{ … }
static int hinic_clean_qp_offload_ctxt(struct hinic_func_to_io *func_to_io)
{ … }
static int init_qp(struct hinic_func_to_io *func_to_io,
struct hinic_qp *qp, int q_id,
struct msix_entry *sq_msix_entry,
struct msix_entry *rq_msix_entry)
{ … }
static void destroy_qp(struct hinic_func_to_io *func_to_io,
struct hinic_qp *qp)
{ … }
int hinic_io_create_qps(struct hinic_func_to_io *func_to_io,
u16 base_qpn, int num_qps,
struct msix_entry *sq_msix_entries,
struct msix_entry *rq_msix_entries)
{ … }
void hinic_io_destroy_qps(struct hinic_func_to_io *func_to_io, int num_qps)
{ … }
int hinic_set_wq_page_size(struct hinic_hwdev *hwdev, u16 func_idx,
u32 page_size)
{ … }
int hinic_io_init(struct hinic_func_to_io *func_to_io,
struct hinic_hwif *hwif, u16 max_qps, int num_ceqs,
struct msix_entry *ceq_msix_entries)
{ … }
void hinic_io_free(struct hinic_func_to_io *func_to_io)
{ … }