#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/mm.h>
#include <linux/dma-mapping.h>
#include <linux/mlx4/cmd.h>
#include <linux/cpu_rmap.h>
#include "mlx4.h"
#include "fw.h"
enum { … };
enum { … };
#define MLX4_EQ_STATUS_OK …
#define MLX4_EQ_STATUS_WRITE_FAIL …
#define MLX4_EQ_OWNER_SW …
#define MLX4_EQ_OWNER_HW …
#define MLX4_EQ_FLAG_EC …
#define MLX4_EQ_FLAG_OI …
#define MLX4_EQ_STATE_ARMED …
#define MLX4_EQ_STATE_FIRED …
#define MLX4_EQ_STATE_ALWAYS_ARMED …
#define MLX4_ASYNC_EVENT_MASK …
static u64 get_async_ev_mask(struct mlx4_dev *dev)
{ … }
static void eq_set_ci(struct mlx4_eq *eq, int req_not)
{ … }
static struct mlx4_eqe *get_eqe(struct mlx4_eq *eq, u32 entry, u8 eqe_factor,
u8 eqe_size)
{ … }
static struct mlx4_eqe *next_eqe_sw(struct mlx4_eq *eq, u8 eqe_factor, u8 size)
{ … }
static struct mlx4_eqe *next_slave_event_eqe(struct mlx4_slave_event_eq *slave_eq)
{ … }
void mlx4_gen_slave_eqe(struct work_struct *work)
{ … }
static void slave_event(struct mlx4_dev *dev, u8 slave, struct mlx4_eqe *eqe)
{ … }
static void mlx4_slave_event(struct mlx4_dev *dev, int slave,
struct mlx4_eqe *eqe)
{ … }
#if defined(CONFIG_SMP)
static void mlx4_set_eq_affinity_hint(struct mlx4_priv *priv, int vec)
{ … }
#endif
int mlx4_gen_pkey_eqe(struct mlx4_dev *dev, int slave, u8 port)
{ … }
EXPORT_SYMBOL(…);
int mlx4_gen_guid_change_eqe(struct mlx4_dev *dev, int slave, u8 port)
{ … }
EXPORT_SYMBOL(…);
int mlx4_gen_port_state_change_eqe(struct mlx4_dev *dev, int slave, u8 port,
u8 port_subtype_change)
{ … }
EXPORT_SYMBOL(…);
enum slave_port_state mlx4_get_slave_port_state(struct mlx4_dev *dev, int slave, u8 port)
{ … }
EXPORT_SYMBOL(…);
static int mlx4_set_slave_port_state(struct mlx4_dev *dev, int slave, u8 port,
enum slave_port_state state)
{ … }
static void set_all_slave_state(struct mlx4_dev *dev, u8 port, int event)
{ … }
int set_and_calc_slave_port_state(struct mlx4_dev *dev, int slave,
u8 port, int event,
enum slave_port_gen_event *gen_event)
{ … }
EXPORT_SYMBOL(…);
int mlx4_gen_slaves_port_mgt_ev(struct mlx4_dev *dev, u8 port, int attr)
{ … }
EXPORT_SYMBOL(…);
void mlx4_master_handle_slave_flr(struct work_struct *work)
{ … }
static int mlx4_eq_int(struct mlx4_dev *dev, struct mlx4_eq *eq)
{ … }
static irqreturn_t mlx4_interrupt(int irq, void *dev_ptr)
{ … }
static irqreturn_t mlx4_msi_x_interrupt(int irq, void *eq_ptr)
{ … }
int mlx4_MAP_EQ_wrapper(struct mlx4_dev *dev, int slave,
struct mlx4_vhcr *vhcr,
struct mlx4_cmd_mailbox *inbox,
struct mlx4_cmd_mailbox *outbox,
struct mlx4_cmd_info *cmd)
{ … }
static int mlx4_MAP_EQ(struct mlx4_dev *dev, u64 event_mask, int unmap,
int eq_num)
{ … }
static int mlx4_SW2HW_EQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
int eq_num)
{ … }
static int mlx4_HW2SW_EQ(struct mlx4_dev *dev, int eq_num)
{ … }
static int mlx4_num_eq_uar(struct mlx4_dev *dev)
{ … }
static void __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev, struct mlx4_eq *eq)
{ … }
static void mlx4_unmap_uar(struct mlx4_dev *dev)
{ … }
static int mlx4_create_eq(struct mlx4_dev *dev, int nent,
u8 intr, struct mlx4_eq *eq)
{ … }
static void mlx4_free_eq(struct mlx4_dev *dev,
struct mlx4_eq *eq)
{ … }
static void mlx4_free_irqs(struct mlx4_dev *dev)
{ … }
static int mlx4_map_clr_int(struct mlx4_dev *dev)
{ … }
static void mlx4_unmap_clr_int(struct mlx4_dev *dev)
{ … }
int mlx4_alloc_eq_table(struct mlx4_dev *dev)
{ … }
void mlx4_free_eq_table(struct mlx4_dev *dev)
{ … }
int mlx4_init_eq_table(struct mlx4_dev *dev)
{ … }
void mlx4_cleanup_eq_table(struct mlx4_dev *dev)
{ … }
int mlx4_test_async(struct mlx4_dev *dev)
{ … }
EXPORT_SYMBOL(…);
int mlx4_test_interrupt(struct mlx4_dev *dev, int vector)
{ … }
EXPORT_SYMBOL(…);
bool mlx4_is_eq_vector_valid(struct mlx4_dev *dev, u8 port, int vector)
{ … }
EXPORT_SYMBOL(…);
u32 mlx4_get_eqs_per_port(struct mlx4_dev *dev, u8 port)
{ … }
EXPORT_SYMBOL(…);
int mlx4_is_eq_shared(struct mlx4_dev *dev, int vector)
{ … }
EXPORT_SYMBOL(…);
struct cpu_rmap *mlx4_get_cpu_rmap(struct mlx4_dev *dev, int port)
{ … }
EXPORT_SYMBOL(…);
int mlx4_assign_eq(struct mlx4_dev *dev, u8 port, int *vector)
{ … }
EXPORT_SYMBOL(…);
int mlx4_eq_get_irq(struct mlx4_dev *dev, int cq_vec)
{ … }
EXPORT_SYMBOL(…);
void mlx4_release_eq(struct mlx4_dev *dev, int vec)
{ … }
EXPORT_SYMBOL(…);