#include <linux/module.h>
#include <linux/mempool.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/skbuff.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/spinlock.h>
#include <linux/workqueue.h>
#include <linux/if_ether.h>
#include <linux/blk-mq-pci.h>
#include <scsi/fc/fc_fip.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_transport_fc.h>
#include <scsi/scsi_tcq.h>
#include <scsi/libfc.h>
#include <scsi/fc_frame.h>
#include "vnic_dev.h"
#include "vnic_intr.h"
#include "vnic_stats.h"
#include "fnic_io.h"
#include "fnic_fip.h"
#include "fnic.h"
#define PCI_DEVICE_ID_CISCO_FNIC …
#define FNIC_NOTIFY_TIMER_PERIOD …
static struct kmem_cache *fnic_sgl_cache[FNIC_SGL_NUM_CACHES];
static struct kmem_cache *fnic_io_req_cache;
static LIST_HEAD(fnic_list);
static DEFINE_SPINLOCK(fnic_list_lock);
static DEFINE_IDA(fnic_ida);
static struct pci_device_id fnic_id_table[] = …;
MODULE_DESCRIPTION(…);
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…);
MODULE_DEVICE_TABLE(pci, fnic_id_table);
unsigned int fnic_log_level;
module_param(fnic_log_level, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(…) …;
unsigned int io_completions = …;
module_param(io_completions, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(…) …;
unsigned int fnic_trace_max_pages = …;
module_param(fnic_trace_max_pages, uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(…) …;
unsigned int fnic_fc_trace_max_pages = …;
module_param(fnic_fc_trace_max_pages, uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(…) …;
static unsigned int fnic_max_qdepth = …;
module_param(fnic_max_qdepth, uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(…) …;
static struct libfc_function_template fnic_transport_template = …;
static int fnic_slave_alloc(struct scsi_device *sdev)
{ … }
static const struct scsi_host_template fnic_host_template = …;
static void
fnic_set_rport_dev_loss_tmo(struct fc_rport *rport, u32 timeout)
{ … }
static void fnic_get_host_speed(struct Scsi_Host *shost);
static struct scsi_transport_template *fnic_fc_transport;
static struct fc_host_statistics *fnic_get_stats(struct Scsi_Host *);
static void fnic_reset_host_stats(struct Scsi_Host *);
static struct fc_function_template fnic_fc_functions = …;
static void fnic_get_host_speed(struct Scsi_Host *shost)
{ … }
static struct fc_host_statistics *fnic_get_stats(struct Scsi_Host *host)
{ … }
void fnic_dump_fchost_stats(struct Scsi_Host *host,
struct fc_host_statistics *stats)
{ … }
static void fnic_reset_host_stats(struct Scsi_Host *host)
{ … }
void fnic_log_q_error(struct fnic *fnic)
{ … }
void fnic_handle_link_event(struct fnic *fnic)
{ … }
static int fnic_notify_set(struct fnic *fnic)
{ … }
static void fnic_notify_timer(struct timer_list *t)
{ … }
static void fnic_fip_notify_timer(struct timer_list *t)
{ … }
static void fnic_notify_timer_start(struct fnic *fnic)
{ … }
static int fnic_dev_wait(struct vnic_dev *vdev,
int (*start)(struct vnic_dev *, int),
int (*finished)(struct vnic_dev *, int *),
int arg)
{ … }
static int fnic_cleanup(struct fnic *fnic)
{ … }
static void fnic_iounmap(struct fnic *fnic)
{ … }
static u8 *fnic_get_mac(struct fc_lport *lport)
{ … }
static void fnic_set_vlan(struct fnic *fnic, u16 vlan_id)
{ … }
static int fnic_scsi_drv_init(struct fnic *fnic)
{ … }
void fnic_mq_map_queues_cpus(struct Scsi_Host *host)
{ … }
static int fnic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{ … }
static void fnic_remove(struct pci_dev *pdev)
{ … }
static struct pci_driver fnic_driver = …;
static int __init fnic_init_module(void)
{ … }
static void __exit fnic_cleanup_module(void)
{ … }
module_init(…) …;
module_exit(fnic_cleanup_module);