#include <linux/types.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mutex.h>
#include <linux/jiffies.h>
#include <linux/sched.h>
#include <linux/sched/signal.h>
#include <linux/io.h>
#include <linux/pci.h>
#include <linux/etherdevice.h>
#include "octep_ctrl_mbox.h"
#include "octep_config.h"
#include "octep_main.h"
#define OCTEP_CTRL_MBOX_MSG_TIMEOUT_MS …
#define OCTEP_CTRL_MBOX_MSG_WAIT_MS …
#define OCTEP_CTRL_MBOX_INFO_SZ …
#define OCTEP_CTRL_MBOX_H2FQ_INFO_SZ …
#define OCTEP_CTRL_MBOX_F2HQ_INFO_SZ …
#define OCTEP_CTRL_MBOX_TOTAL_INFO_SZ …
#define OCTEP_CTRL_MBOX_INFO_MAGIC_NUM(m) …
#define OCTEP_CTRL_MBOX_INFO_BARMEM_SZ(m) …
#define OCTEP_CTRL_MBOX_INFO_HOST_VERSION(m) …
#define OCTEP_CTRL_MBOX_INFO_HOST_STATUS(m) …
#define OCTEP_CTRL_MBOX_INFO_FW_VERSION(m) …
#define OCTEP_CTRL_MBOX_INFO_FW_STATUS(m) …
#define OCTEP_CTRL_MBOX_H2FQ_INFO(m) …
#define OCTEP_CTRL_MBOX_H2FQ_PROD(m) …
#define OCTEP_CTRL_MBOX_H2FQ_CONS(m) …
#define OCTEP_CTRL_MBOX_H2FQ_SZ(m) …
#define OCTEP_CTRL_MBOX_F2HQ_INFO(m) …
#define OCTEP_CTRL_MBOX_F2HQ_PROD(m) …
#define OCTEP_CTRL_MBOX_F2HQ_CONS(m) …
#define OCTEP_CTRL_MBOX_F2HQ_SZ(m) …
static const u32 mbox_hdr_sz = …;
static u32 octep_ctrl_mbox_circq_inc(u32 index, u32 inc, u32 sz)
{ … }
static u32 octep_ctrl_mbox_circq_space(u32 pi, u32 ci, u32 sz)
{ … }
static u32 octep_ctrl_mbox_circq_depth(u32 pi, u32 ci, u32 sz)
{ … }
int octep_ctrl_mbox_init(struct octep_ctrl_mbox *mbox)
{ … }
static void
octep_write_mbox_data(struct octep_ctrl_mbox_q *q, u32 *pi, u32 ci, void *buf, u32 w_sz)
{ … }
int octep_ctrl_mbox_send(struct octep_ctrl_mbox *mbox, struct octep_ctrl_mbox_msg *msg)
{ … }
static void
octep_read_mbox_data(struct octep_ctrl_mbox_q *q, u32 pi, u32 *ci, void *buf, u32 r_sz)
{ … }
int octep_ctrl_mbox_recv(struct octep_ctrl_mbox *mbox, struct octep_ctrl_mbox_msg *msg)
{ … }
int octep_ctrl_mbox_uninit(struct octep_ctrl_mbox *mbox)
{ … }