#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);
static int usnic_ib_dump_vf_hdr(void *obj, char *buf, int buf_sz)
{ … }
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)
{ … }
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 = …;
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 = …;
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 = …;
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)
{ … }
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)
{ … }
static struct pci_driver usnic_ib_pci_driver = …;
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);