linux/drivers/infiniband/hw/mthca/mthca_cq.c

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

#include <asm/io.h>

#include <rdma/ib_pack.h>

#include "mthca_dev.h"
#include "mthca_cmd.h"
#include "mthca_memfree.h"

enum {};

enum {};

enum {};

/*
 * Must be packed because start is 64 bits but only aligned to 32 bits.
 */
struct mthca_cq_context {} __packed;

#define MTHCA_CQ_STATUS_OK
#define MTHCA_CQ_STATUS_OVERFLOW
#define MTHCA_CQ_STATUS_WRITE_FAIL
#define MTHCA_CQ_FLAG_TR
#define MTHCA_CQ_FLAG_OI
#define MTHCA_CQ_STATE_DISARMED
#define MTHCA_CQ_STATE_ARMED
#define MTHCA_CQ_STATE_ARMED_SOL
#define MTHCA_EQ_STATE_FIRED

enum {};

enum {};

struct mthca_cqe {};

struct mthca_err_cqe {};

#define MTHCA_CQ_ENTRY_OWNER_SW
#define MTHCA_CQ_ENTRY_OWNER_HW

#define MTHCA_TAVOR_CQ_DB_INC_CI
#define MTHCA_TAVOR_CQ_DB_REQ_NOT
#define MTHCA_TAVOR_CQ_DB_REQ_NOT_SOL
#define MTHCA_TAVOR_CQ_DB_SET_CI
#define MTHCA_TAVOR_CQ_DB_REQ_NOT_MULT

#define MTHCA_ARBEL_CQ_DB_REQ_NOT_SOL
#define MTHCA_ARBEL_CQ_DB_REQ_NOT
#define MTHCA_ARBEL_CQ_DB_REQ_NOT_MULT

static inline struct mthca_cqe *get_cqe_from_buf(struct mthca_cq_buf *buf,
						 int entry)
{}

static inline struct mthca_cqe *get_cqe(struct mthca_cq *cq, int entry)
{}

static inline struct mthca_cqe *cqe_sw(struct mthca_cqe *cqe)
{}

static inline struct mthca_cqe *next_cqe_sw(struct mthca_cq *cq)
{}

static inline void set_cqe_hw(struct mthca_cqe *cqe)
{}

static void dump_cqe(struct mthca_dev *dev, void *cqe_ptr)
{}

/*
 * incr is ignored in native Arbel (mem-free) mode, so cq->cons_index
 * should be correct before calling update_cons_index().
 */
static inline void update_cons_index(struct mthca_dev *dev, struct mthca_cq *cq,
				     int incr)
{}

void mthca_cq_completion(struct mthca_dev *dev, u32 cqn)
{}

void mthca_cq_event(struct mthca_dev *dev, u32 cqn,
		    enum ib_event_type event_type)
{}

static inline int is_recv_cqe(struct mthca_cqe *cqe)
{}

void mthca_cq_clean(struct mthca_dev *dev, struct mthca_cq *cq, u32 qpn,
		    struct mthca_srq *srq)
{}

void mthca_cq_resize_copy_cqes(struct mthca_cq *cq)
{}

int mthca_alloc_cq_buf(struct mthca_dev *dev, struct mthca_cq_buf *buf, int nent)
{}

void mthca_free_cq_buf(struct mthca_dev *dev, struct mthca_cq_buf *buf, int cqe)
{}

static void handle_error_cqe(struct mthca_dev *dev, struct mthca_cq *cq,
			     struct mthca_qp *qp, int wqe_index, int is_send,
			     struct mthca_err_cqe *cqe,
			     struct ib_wc *entry, int *free_cqe)
{}

static inline int mthca_poll_one(struct mthca_dev *dev,
				 struct mthca_cq *cq,
				 struct mthca_qp **cur_qp,
				 int *freed,
				 struct ib_wc *entry)
{}

int mthca_poll_cq(struct ib_cq *ibcq, int num_entries,
		  struct ib_wc *entry)
{}

int mthca_tavor_arm_cq(struct ib_cq *cq, enum ib_cq_notify_flags flags)
{}

int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
{}

int mthca_init_cq(struct mthca_dev *dev, int nent,
		  struct mthca_ucontext *ctx, u32 pdn,
		  struct mthca_cq *cq)
{}

static inline int get_cq_refcount(struct mthca_dev *dev, struct mthca_cq *cq)
{}

void mthca_free_cq(struct mthca_dev *dev,
		   struct mthca_cq *cq)
{}

int mthca_init_cq_table(struct mthca_dev *dev)
{}

void mthca_cleanup_cq_table(struct mthca_dev *dev)
{}