linux/drivers/net/ethernet/mellanox/mlx4/eq.c

/*
 * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
 * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved.
 *
 * This software is available to you under a choice of one of two
 * licenses.  You may choose to be licensed under the terms of the GNU
 * General Public License (GPL) Version 2, available from the file
 * COPYING in the main directory of this source tree, or the
 * OpenIB.org BSD license below:
 *
 *     Redistribution and use in source and binary forms, with or
 *     without modification, are permitted provided that the following
 *     conditions are met:
 *
 *	- Redistributions of source code must retain the above
 *	  copyright notice, this list of conditions and the following
 *	  disclaimer.
 *
 *	- Redistributions in binary form must reproduce the above
 *	  copyright notice, this list of conditions and the following
 *	  disclaimer in the documentation and/or other materials
 *	  provided with the distribution.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#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)
{}
/**************************************************************************
	The function get as input the new event to that port,
	and according to the prev state change the slave's port state.
	The events are:
		MLX4_PORT_STATE_DEV_EVENT_PORT_DOWN,
		MLX4_PORT_STATE_DEV_EVENT_PORT_UP
		MLX4_PORT_STATE_IB_EVENT_GID_VALID
		MLX4_PORT_STATE_IB_EVENT_GID_INVALID
***************************************************************************/
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)
{}

/* A test that verifies that we can accept interrupts
 * on the vector allocated for asynchronous events
 */
int mlx4_test_async(struct mlx4_dev *dev)
{}
EXPORT_SYMBOL();

/* A test that verifies that we can accept interrupts
 * on the given irq vector of the tested port.
 * Interrupts are checked using the NOP command.
 */
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();