linux/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c

/*
 * Copyright (c) 2012-2016 VMware, Inc.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of EITHER the GNU General Public License
 * version 2 as published by the Free Software Foundation or the BSD
 * 2-Clause License. This program is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED
 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License version 2 for more details at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program available in the file COPYING in the main
 * directory of this source tree.
 *
 * The BSD 2-Clause License
 *
 *     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.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include <linux/errno.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <rdma/ib_addr.h>
#include <rdma/ib_smi.h>
#include <rdma/ib_user_verbs.h>
#include <net/addrconf.h>

#include "pvrdma.h"

#define DRV_NAME
#define DRV_VERSION

static DEFINE_MUTEX(pvrdma_device_list_lock);
static LIST_HEAD(pvrdma_device_list);
static struct workqueue_struct *event_wq;

static int pvrdma_add_gid(const struct ib_gid_attr *attr, void **context);
static int pvrdma_del_gid(const struct ib_gid_attr *attr, void **context);

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

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

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

static struct attribute *pvrdma_class_attributes[] =;

static const struct attribute_group pvrdma_attr_group =;

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

static int pvrdma_init_device(struct pvrdma_dev *dev)
{}

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

static const struct ib_device_ops pvrdma_dev_ops =;

static const struct ib_device_ops pvrdma_dev_srq_ops =;

static int pvrdma_register_device(struct pvrdma_dev *dev)
{}

static irqreturn_t pvrdma_intr0_handler(int irq, void *dev_id)
{}

static void pvrdma_qp_event(struct pvrdma_dev *dev, u32 qpn, int type)
{}

static void pvrdma_cq_event(struct pvrdma_dev *dev, u32 cqn, int type)
{}

static void pvrdma_srq_event(struct pvrdma_dev *dev, u32 srqn, int type)
{}

static void pvrdma_dispatch_event(struct pvrdma_dev *dev, int port,
				  enum ib_event_type event)
{}

static void pvrdma_dev_event(struct pvrdma_dev *dev, u8 port, int type)
{}

static inline struct pvrdma_eqe *get_eqe(struct pvrdma_dev *dev, unsigned int i)
{}

static irqreturn_t pvrdma_intr1_handler(int irq, void *dev_id)
{}

static inline struct pvrdma_cqne *get_cqne(struct pvrdma_dev *dev,
					   unsigned int i)
{}

static irqreturn_t pvrdma_intrx_handler(int irq, void *dev_id)
{}

static void pvrdma_free_irq(struct pvrdma_dev *dev)
{}

static void pvrdma_enable_intrs(struct pvrdma_dev *dev)
{}

static void pvrdma_disable_intrs(struct pvrdma_dev *dev)
{}

static int pvrdma_alloc_intrs(struct pvrdma_dev *dev)
{}

static void pvrdma_free_slots(struct pvrdma_dev *dev)
{}

static int pvrdma_add_gid_at_index(struct pvrdma_dev *dev,
				   const union ib_gid *gid,
				   u8 gid_type,
				   int index)
{}

static int pvrdma_add_gid(const struct ib_gid_attr *attr, void **context)
{}

static int pvrdma_del_gid_at_index(struct pvrdma_dev *dev, int index)
{}

static int pvrdma_del_gid(const struct ib_gid_attr *attr, void **context)
{}

static void pvrdma_netdevice_event_handle(struct pvrdma_dev *dev,
					  struct net_device *ndev,
					  unsigned long event)
{}

static void pvrdma_netdevice_event_work(struct work_struct *work)
{}

static int pvrdma_netdevice_event(struct notifier_block *this,
				  unsigned long event, void *ptr)
{}

static int pvrdma_pci_probe(struct pci_dev *pdev,
			    const struct pci_device_id *id)
{}

static void pvrdma_pci_remove(struct pci_dev *pdev)
{}

static const struct pci_device_id pvrdma_pci_table[] =;

MODULE_DEVICE_TABLE(pci, pvrdma_pci_table);

static struct pci_driver pvrdma_driver =;

static int __init pvrdma_init(void)
{}

static void __exit pvrdma_cleanup(void)
{}

module_init();
module_exit(pvrdma_cleanup);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();