linux/drivers/infiniband/hw/usnic/usnic_ib_main.c

/*
 * Copyright (c) 2013, 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
 * 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.
 *
 * Author: Upinder Malhi <[email protected]>
 * Author: Anant Deepak <[email protected]>
 * Author: Cesare Cantu' <[email protected]>
 * Author: Jeff Squyres <[email protected]>
 * Author: Kiran Thirumalai <[email protected]>
 * Author: Xuyang Wang <[email protected]>
 * Author: Reese Faucette <[email protected]>
 *
 */

#include <linux/module.h>
#include <linux/inetdevice.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/netdevice.h>

#include <rdma/ib_user_verbs.h>
#include <rdma/ib_addr.h>

#include "usnic_abi.h"
#include "usnic_common_util.h"
#include "usnic_ib.h"
#include "usnic_ib_qp_grp.h"
#include "usnic_log.h"
#include "usnic_fwd.h"
#include "usnic_debugfs.h"
#include "usnic_ib_verbs.h"
#include "usnic_transport.h"
#include "usnic_uiom.h"
#include "usnic_ib_sysfs.h"

unsigned int usnic_log_lvl =;
unsigned int usnic_ib_share_vf =;

static const char usnic_version[] =;

static DEFINE_MUTEX(usnic_ib_ibdev_list_lock);
static LIST_HEAD(usnic_ib_ibdev_list);

/* Callback dump funcs */
static int usnic_ib_dump_vf_hdr(void *obj, char *buf, int buf_sz)
{}
/* End callback dump funcs */

static void usnic_ib_dump_vf(struct usnic_ib_vf *vf, char *buf, int buf_sz)
{}

void usnic_ib_log_vf(struct usnic_ib_vf *vf)
{}

/* Start of netdev section */
static void usnic_ib_qp_grp_modify_active_to_err(struct usnic_ib_dev *us_ibdev)
{}

static void usnic_ib_handle_usdev_event(struct usnic_ib_dev *us_ibdev,
					unsigned long event)
{}

static int usnic_ib_netdevice_event(struct notifier_block *notifier,
					unsigned long event, void *ptr)
{}

static struct notifier_block usnic_ib_netdevice_notifier =;
/* End of netdev section */

/* Start of inet section */
static int usnic_ib_handle_inet_event(struct usnic_ib_dev *us_ibdev,
					unsigned long event, void *ptr)
{}

static int usnic_ib_inetaddr_event(struct notifier_block *notifier,
					unsigned long event, void *ptr)
{}
static struct notifier_block usnic_ib_inetaddr_notifier =;
/* End of inet section*/

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

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

static const struct ib_device_ops usnic_dev_ops =;

/* Start of PF discovery section */
static void *usnic_ib_device_add(struct pci_dev *dev)
{}

static void usnic_ib_device_remove(struct usnic_ib_dev *us_ibdev)
{}

static void usnic_ib_undiscover_pf(struct kref *kref)
{}

static struct usnic_ib_dev *usnic_ib_discover_pf(struct usnic_vnic *vnic)
{}
/* End of PF discovery section */

/* Start of PCI section */

static const struct pci_device_id usnic_ib_pci_ids[] =;

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

static void usnic_ib_pci_remove(struct pci_dev *pdev)
{}

/* PCI driver entry points */
static struct pci_driver usnic_ib_pci_driver =;
/* End of PCI section */

/* Start of module section */
static int __init usnic_ib_init(void)
{}

static void __exit usnic_ib_destroy(void)
{}

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
module_param(usnic_log_lvl, uint, S_IRUGO | S_IWUSR);
module_param(usnic_ib_share_vf, uint, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC();
MODULE_PARM_DESC();
MODULE_DEVICE_TABLE(pci, usnic_ib_pci_ids);

module_init();
module_exit(usnic_ib_destroy);
/* End of module section */