#include <linux/iopoll.h>
#include "snet_vdpa.h"
enum snet_ctrl_opcodes { … };
#define SNET_CTRL_TIMEOUT …
#define SNET_CTRL_DATA_SIZE_MASK …
#define SNET_CTRL_IN_PROCESS_MASK …
#define SNET_CTRL_CHUNK_RDY_MASK …
#define SNET_CTRL_ERROR_MASK …
#define SNET_VAL_TO_ERR(val) …
#define SNET_EMPTY_CTRL(val) …
#define SNET_DATA_READY(val) …
struct snet_ctrl_reg_ctrl { … };
struct snet_ctrl_reg_op { … };
struct snet_ctrl_regs { … };
static struct snet_ctrl_regs __iomem *snet_get_ctrl(struct snet *snet)
{ … }
static int snet_wait_for_empty_ctrl(struct snet_ctrl_regs __iomem *regs)
{ … }
static int snet_wait_for_empty_op(struct snet_ctrl_regs __iomem *regs)
{ … }
static int snet_wait_for_data(struct snet_ctrl_regs __iomem *regs)
{ … }
static u32 snet_read32_word(struct snet_ctrl_regs __iomem *ctrl_regs, u16 word_idx)
{ … }
static u32 snet_read_ctrl(struct snet_ctrl_regs __iomem *ctrl_regs)
{ … }
static void snet_write_ctrl(struct snet_ctrl_regs __iomem *ctrl_regs, u32 val)
{ … }
static void snet_write_op(struct snet_ctrl_regs __iomem *ctrl_regs, u32 val)
{ … }
static int snet_wait_for_dpu_completion(struct snet_ctrl_regs __iomem *ctrl_regs)
{ … }
static int snet_ctrl_read_from_dpu(struct snet *snet, u16 opcode, u16 vq_idx, void *buffer,
u32 buf_size)
{ … }
static int snet_send_ctrl_msg_old(struct snet *snet, u32 opcode)
{ … }
static int snet_send_ctrl_msg(struct snet *snet, u16 opcode, u16 vq_idx)
{ … }
void snet_ctrl_clear(struct snet *snet)
{ … }
int snet_destroy_dev(struct snet *snet)
{ … }
int snet_read_vq_state(struct snet *snet, u16 idx, struct vdpa_vq_state *state)
{ … }
int snet_suspend_dev(struct snet *snet)
{ … }
int snet_resume_dev(struct snet *snet)
{ … }