#include "efa_com.h"
#include "efa_regs_defs.h"
#define ADMIN_CMD_TIMEOUT_US …
#define EFA_REG_READ_TIMEOUT_US …
#define EFA_MMIO_READ_INVALID …
#define EFA_POLL_INTERVAL_MS …
#define EFA_ASYNC_QUEUE_DEPTH …
#define EFA_ADMIN_QUEUE_DEPTH …
#define EFA_CTRL_MAJOR …
#define EFA_CTRL_MINOR …
#define EFA_CTRL_SUB_MINOR …
enum efa_cmd_status { … };
struct efa_comp_ctx { … };
static const char *efa_com_cmd_str(u8 cmd)
{ … }
void efa_com_set_dma_addr(dma_addr_t addr, u32 *addr_high, u32 *addr_low)
{ … }
static u32 efa_com_reg_read32(struct efa_com_dev *edev, u16 offset)
{ … }
static int efa_com_admin_init_sq(struct efa_com_dev *edev)
{ … }
static int efa_com_admin_init_cq(struct efa_com_dev *edev)
{ … }
static int efa_com_admin_init_aenq(struct efa_com_dev *edev,
struct efa_aenq_handlers *aenq_handlers)
{ … }
static u16 efa_com_alloc_ctx_id(struct efa_com_admin_queue *aq)
{ … }
static void efa_com_dealloc_ctx_id(struct efa_com_admin_queue *aq,
u16 ctx_id)
{ … }
static inline void efa_com_put_comp_ctx(struct efa_com_admin_queue *aq,
struct efa_comp_ctx *comp_ctx)
{ … }
static struct efa_comp_ctx *efa_com_get_comp_ctx(struct efa_com_admin_queue *aq,
u16 cmd_id, bool capture)
{ … }
static struct efa_comp_ctx *__efa_com_submit_admin_cmd(struct efa_com_admin_queue *aq,
struct efa_admin_aq_entry *cmd,
size_t cmd_size_in_bytes,
struct efa_admin_acq_entry *comp,
size_t comp_size_in_bytes)
{ … }
static inline int efa_com_init_comp_ctxt(struct efa_com_admin_queue *aq)
{ … }
static struct efa_comp_ctx *efa_com_submit_admin_cmd(struct efa_com_admin_queue *aq,
struct efa_admin_aq_entry *cmd,
size_t cmd_size_in_bytes,
struct efa_admin_acq_entry *comp,
size_t comp_size_in_bytes)
{ … }
static int efa_com_handle_single_admin_completion(struct efa_com_admin_queue *aq,
struct efa_admin_acq_entry *cqe)
{ … }
static void efa_com_handle_admin_completion(struct efa_com_admin_queue *aq)
{ … }
static int efa_com_comp_status_to_errno(u8 comp_status)
{ … }
static int efa_com_wait_and_process_admin_cq_polling(struct efa_comp_ctx *comp_ctx,
struct efa_com_admin_queue *aq)
{ … }
static int efa_com_wait_and_process_admin_cq_interrupts(struct efa_comp_ctx *comp_ctx,
struct efa_com_admin_queue *aq)
{ … }
static int efa_com_wait_and_process_admin_cq(struct efa_comp_ctx *comp_ctx,
struct efa_com_admin_queue *aq)
{ … }
int efa_com_cmd_exec(struct efa_com_admin_queue *aq,
struct efa_admin_aq_entry *cmd,
size_t cmd_size,
struct efa_admin_acq_entry *comp,
size_t comp_size)
{ … }
void efa_com_admin_destroy(struct efa_com_dev *edev)
{ … }
void efa_com_set_admin_polling_mode(struct efa_com_dev *edev, bool polling)
{ … }
static void efa_com_stats_init(struct efa_com_dev *edev)
{ … }
int efa_com_admin_init(struct efa_com_dev *edev,
struct efa_aenq_handlers *aenq_handlers)
{ … }
void efa_com_admin_q_comp_intr_handler(struct efa_com_dev *edev)
{ … }
static efa_aenq_handler efa_com_get_specific_aenq_cb(struct efa_com_dev *edev,
u16 group)
{ … }
void efa_com_aenq_intr_handler(struct efa_com_dev *edev, void *data)
{ … }
static void efa_com_mmio_reg_read_resp_addr_init(struct efa_com_dev *edev)
{ … }
int efa_com_mmio_reg_read_init(struct efa_com_dev *edev)
{ … }
void efa_com_mmio_reg_read_destroy(struct efa_com_dev *edev)
{ … }
int efa_com_validate_version(struct efa_com_dev *edev)
{ … }
int efa_com_get_dma_width(struct efa_com_dev *edev)
{ … }
static int wait_for_reset_state(struct efa_com_dev *edev, u32 timeout, int on)
{ … }
int efa_com_dev_reset(struct efa_com_dev *edev,
enum efa_regs_reset_reason_types reset_reason)
{ … }
static int efa_com_create_eq(struct efa_com_dev *edev,
struct efa_com_create_eq_params *params,
struct efa_com_create_eq_result *result)
{ … }
static void efa_com_destroy_eq(struct efa_com_dev *edev,
struct efa_com_destroy_eq_params *params)
{ … }
static void efa_com_arm_eq(struct efa_com_dev *edev, struct efa_com_eq *eeq)
{ … }
void efa_com_eq_comp_intr_handler(struct efa_com_dev *edev,
struct efa_com_eq *eeq)
{ … }
void efa_com_eq_destroy(struct efa_com_dev *edev, struct efa_com_eq *eeq)
{ … }
int efa_com_eq_init(struct efa_com_dev *edev, struct efa_com_eq *eeq,
efa_eqe_handler cb, u16 depth, u8 msix_vec)
{ … }