#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(…) …;