#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include "mthca_dev.h"
#include "mthca_cmd.h"
#include "mthca_config_reg.h"
enum { … };
struct mthca_eq_context { … } __packed;
#define MTHCA_EQ_STATUS_OK …
#define MTHCA_EQ_STATUS_OVERFLOW …
#define MTHCA_EQ_STATUS_WRITE_FAIL …
#define MTHCA_EQ_OWNER_SW …
#define MTHCA_EQ_OWNER_HW …
#define MTHCA_EQ_FLAG_TR …
#define MTHCA_EQ_FLAG_OI …
#define MTHCA_EQ_STATE_ARMED …
#define MTHCA_EQ_STATE_FIRED …
#define MTHCA_EQ_STATE_ALWAYS_ARMED …
#define MTHCA_EQ_STATE_ARBEL …
enum { … };
#define MTHCA_ASYNC_EVENT_MASK …
#define MTHCA_SRQ_EVENT_MASK …
#define MTHCA_CMD_EVENT_MASK …
#define MTHCA_EQ_DB_INC_CI …
#define MTHCA_EQ_DB_REQ_NOT …
#define MTHCA_EQ_DB_DISARM_CQ …
#define MTHCA_EQ_DB_SET_CI …
#define MTHCA_EQ_DB_ALWAYS_ARM …
struct mthca_eqe { … } __packed;
#define MTHCA_EQ_ENTRY_OWNER_SW …
#define MTHCA_EQ_ENTRY_OWNER_HW …
static inline u64 async_mask(struct mthca_dev *dev)
{ … }
static inline void tavor_set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 ci)
{ … }
static inline void arbel_set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 ci)
{ … }
static inline void set_eq_ci(struct mthca_dev *dev, struct mthca_eq *eq, u32 ci)
{ … }
static inline void tavor_eq_req_not(struct mthca_dev *dev, int eqn)
{ … }
static inline void arbel_eq_req_not(struct mthca_dev *dev, u32 eqn_mask)
{ … }
static inline void disarm_cq(struct mthca_dev *dev, int eqn, int cqn)
{ … }
static inline struct mthca_eqe *get_eqe(struct mthca_eq *eq, u32 entry)
{ … }
static inline struct mthca_eqe *next_eqe_sw(struct mthca_eq *eq)
{ … }
static inline void set_eqe_hw(struct mthca_eqe *eqe)
{ … }
static void port_change(struct mthca_dev *dev, int port, int active)
{ … }
static int mthca_eq_int(struct mthca_dev *dev, struct mthca_eq *eq)
{ … }
static irqreturn_t mthca_tavor_interrupt(int irq, void *dev_ptr)
{ … }
static irqreturn_t mthca_tavor_msi_x_interrupt(int irq, void *eq_ptr)
{ … }
static irqreturn_t mthca_arbel_interrupt(int irq, void *dev_ptr)
{ … }
static irqreturn_t mthca_arbel_msi_x_interrupt(int irq, void *eq_ptr)
{ … }
static int mthca_create_eq(struct mthca_dev *dev,
int nent,
u8 intr,
struct mthca_eq *eq)
{ … }
static void mthca_free_eq(struct mthca_dev *dev,
struct mthca_eq *eq)
{ … }
static void mthca_free_irqs(struct mthca_dev *dev)
{ … }
static int mthca_map_reg(struct mthca_dev *dev,
unsigned long offset, unsigned long size,
void __iomem **map)
{ … }
static int mthca_map_eq_regs(struct mthca_dev *dev)
{ … }
static void mthca_unmap_eq_regs(struct mthca_dev *dev)
{ … }
int mthca_map_eq_icm(struct mthca_dev *dev, u64 icm_virt)
{ … }
void mthca_unmap_eq_icm(struct mthca_dev *dev)
{ … }
int mthca_init_eq_table(struct mthca_dev *dev)
{ … }
void mthca_cleanup_eq_table(struct mthca_dev *dev)
{ … }