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

/*
 * Copyright (c) 2004, 2005 Topspin Communications.  All rights reserved.
 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
 * Copyright (c) 2005, 2006, 2007 Cisco Systems, Inc. All rights reserved.
 * Copyright (c) 2005, 2006, 2007, 2008 Mellanox Technologies. All rights reserved.
 * Copyright (c) 2004 Voltaire, 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/hardirq.h>
#include <linux/export.h>

#include <linux/mlx4/cmd.h>
#include <linux/mlx4/cq.h>

#include "mlx4.h"
#include "icm.h"

#define MLX4_CQ_STATUS_OK
#define MLX4_CQ_STATUS_OVERFLOW
#define MLX4_CQ_STATUS_WRITE_FAIL
#define MLX4_CQ_FLAG_CC
#define MLX4_CQ_FLAG_OI
#define MLX4_CQ_STATE_ARMED
#define MLX4_CQ_STATE_ARMED_SOL
#define MLX4_EQ_STATE_FIRED

#define TASKLET_MAX_TIME
#define TASKLET_MAX_TIME_JIFFIES

void mlx4_cq_tasklet_cb(struct tasklet_struct *t)
{}

static void mlx4_add_cq_to_tasklet(struct mlx4_cq *cq)
{}

void mlx4_cq_completion(struct mlx4_dev *dev, u32 cqn)
{}

void mlx4_cq_event(struct mlx4_dev *dev, u32 cqn, int event_type)
{}

static int mlx4_SW2HW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
			 int cq_num, u8 opmod)
{}

static int mlx4_MODIFY_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
			 int cq_num, u32 opmod)
{}

static int mlx4_HW2SW_CQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
			 int cq_num)
{}

int mlx4_cq_modify(struct mlx4_dev *dev, struct mlx4_cq *cq,
		   u16 count, u16 period)
{}
EXPORT_SYMBOL_GPL();

int mlx4_cq_resize(struct mlx4_dev *dev, struct mlx4_cq *cq,
		   int entries, struct mlx4_mtt *mtt)
{}
EXPORT_SYMBOL_GPL();

int __mlx4_cq_alloc_icm(struct mlx4_dev *dev, int *cqn)
{}

static int mlx4_cq_alloc_icm(struct mlx4_dev *dev, int *cqn, u8 usage)
{}

void __mlx4_cq_free_icm(struct mlx4_dev *dev, int cqn)
{}

static void mlx4_cq_free_icm(struct mlx4_dev *dev, int cqn)
{}

static int mlx4_init_user_cqes(void *buf, int entries, int cqe_size)
{}

static void mlx4_init_kernel_cqes(struct mlx4_buf *buf,
				  int entries,
				  int cqe_size)
{}

int mlx4_cq_alloc(struct mlx4_dev *dev, int nent,
		  struct mlx4_mtt *mtt, struct mlx4_uar *uar, u64 db_rec,
		  struct mlx4_cq *cq, unsigned vector, int collapsed,
		  int timestamp_en, void *buf_addr, bool user_cq)
{}
EXPORT_SYMBOL_GPL();

void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq)
{}
EXPORT_SYMBOL_GPL();

int mlx4_init_cq_table(struct mlx4_dev *dev)
{}

void mlx4_cleanup_cq_table(struct mlx4_dev *dev)
{}