linux/drivers/infiniband/hw/mthca/mthca_provider.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.  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 <rdma/ib_smi.h>
#include <rdma/ib_umem.h>
#include <rdma/ib_user_verbs.h>
#include <rdma/uverbs_ioctl.h>

#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/mm.h>
#include <linux/export.h>

#include "mthca_dev.h"
#include "mthca_cmd.h"
#include <rdma/mthca-abi.h>
#include "mthca_memfree.h"

static int mthca_query_device(struct ib_device *ibdev, struct ib_device_attr *props,
			      struct ib_udata *uhw)
{}

static int mthca_query_port(struct ib_device *ibdev,
			    u32 port, struct ib_port_attr *props)
{}

static int mthca_modify_device(struct ib_device *ibdev,
			       int mask,
			       struct ib_device_modify *props)
{}

static int mthca_modify_port(struct ib_device *ibdev,
			     u32 port, int port_modify_mask,
			     struct ib_port_modify *props)
{}

static int mthca_query_pkey(struct ib_device *ibdev,
			    u32 port, u16 index, u16 *pkey)
{}

static int mthca_query_gid(struct ib_device *ibdev, u32 port,
			   int index, union ib_gid *gid)
{}

static int mthca_alloc_ucontext(struct ib_ucontext *uctx,
				struct ib_udata *udata)
{}

static void mthca_dealloc_ucontext(struct ib_ucontext *context)
{}

static int mthca_mmap_uar(struct ib_ucontext *context,
			  struct vm_area_struct *vma)
{}

static int mthca_alloc_pd(struct ib_pd *ibpd, struct ib_udata *udata)
{}

static int mthca_dealloc_pd(struct ib_pd *pd, struct ib_udata *udata)
{}

static int mthca_ah_create(struct ib_ah *ibah,
			   struct rdma_ah_init_attr *init_attr,
			   struct ib_udata *udata)

{}

static int mthca_ah_destroy(struct ib_ah *ah, u32 flags)
{}

static int mthca_create_srq(struct ib_srq *ibsrq,
			    struct ib_srq_init_attr *init_attr,
			    struct ib_udata *udata)
{}

static int mthca_destroy_srq(struct ib_srq *srq, struct ib_udata *udata)
{}

static int mthca_create_qp(struct ib_qp *ibqp,
			   struct ib_qp_init_attr *init_attr,
			   struct ib_udata *udata)
{}

static int mthca_destroy_qp(struct ib_qp *qp, struct ib_udata *udata)
{}

static int mthca_create_cq(struct ib_cq *ibcq,
			   const struct ib_cq_init_attr *attr,
			   struct uverbs_attr_bundle *attrs)
{}

static int mthca_alloc_resize_buf(struct mthca_dev *dev, struct mthca_cq *cq,
				  int entries)
{}

static int mthca_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
{}

static int mthca_destroy_cq(struct ib_cq *cq, struct ib_udata *udata)
{}

static inline u32 convert_access(int acc)
{}

static struct ib_mr *mthca_get_dma_mr(struct ib_pd *pd, int acc)
{}

static struct ib_mr *mthca_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
				       u64 virt, int acc, struct ib_udata *udata)
{}

static int mthca_dereg_mr(struct ib_mr *mr, struct ib_udata *udata)
{}

static ssize_t hw_rev_show(struct device *device,
			   struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(hw_rev);

static const char *hca_type_string(int hca_type)
{}

static ssize_t hca_type_show(struct device *device,
			     struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(hca_type);

static ssize_t board_id_show(struct device *device,
			     struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RO(board_id);

static struct attribute *mthca_dev_attributes[] =;

static const struct attribute_group mthca_attr_group =;

static int mthca_init_node_data(struct mthca_dev *dev)
{}

static int mthca_port_immutable(struct ib_device *ibdev, u32 port_num,
			        struct ib_port_immutable *immutable)
{}

static void get_dev_fw_str(struct ib_device *device, char *str)
{}

static const struct ib_device_ops mthca_dev_ops =;

static const struct ib_device_ops mthca_dev_arbel_srq_ops =;

static const struct ib_device_ops mthca_dev_tavor_srq_ops =;

static const struct ib_device_ops mthca_dev_arbel_ops =;

static const struct ib_device_ops mthca_dev_tavor_ops =;

int mthca_register_device(struct mthca_dev *dev)
{}

void mthca_unregister_device(struct mthca_dev *dev)
{}