#include <linux/compat.h>
#include <linux/blkdev.h>
#include <linux/completion.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/syscalls.h>
#include <linux/delay.h>
#include <linux/kthread.h>
#include <linux/msdos_partition.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsicam.h>
#include <scsi/scsi_eh.h>
#include "aacraid.h"
#define AAC_DRIVER_VERSION …
#ifndef AAC_DRIVER_BRANCH
#define AAC_DRIVER_BRANCH …
#endif
#define AAC_DRIVERNAME …
#ifdef AAC_DRIVER_BUILD
#define _str(x) …
#define str(x) …
#define AAC_DRIVER_FULL_VERSION …
#else
#define AAC_DRIVER_FULL_VERSION …
#endif
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…);
static DEFINE_MUTEX(aac_mutex);
static LIST_HEAD(aac_devices);
static int aac_cfg_major = …;
char aac_driver_version[] = …;
static const struct pci_device_id aac_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci, aac_pci_tbl);
static struct aac_driver_ident aac_drivers[] = …;
static int aac_queuecommand(struct Scsi_Host *shost,
struct scsi_cmnd *cmd)
{ … }
static const char *aac_info(struct Scsi_Host *shost)
{ … }
struct aac_driver_ident* aac_get_driver_ident(int devtype)
{ … }
static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
sector_t capacity, int *geom)
{ … }
static int aac_slave_configure(struct scsi_device *sdev)
{ … }
static int aac_change_queue_depth(struct scsi_device *sdev, int depth)
{ … }
static ssize_t aac_show_raid_level(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static struct device_attribute aac_raid_level_attr = …;
static ssize_t aac_show_unique_id(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static struct device_attribute aac_unique_id_attr = …;
static struct attribute *aac_dev_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int aac_ioctl(struct scsi_device *sdev, unsigned int cmd,
void __user *arg)
{ … }
struct fib_count_data { … };
static bool fib_count_iter(struct scsi_cmnd *scmnd, void *data)
{ … }
static int get_num_of_incomplete_fibs(struct aac_dev *aac)
{ … }
static int aac_eh_abort(struct scsi_cmnd* cmd)
{ … }
static u8 aac_eh_tmf_lun_reset_fib(struct aac_hba_map_info *info,
struct fib *fib, u64 tmf_lun)
{ … }
static u8 aac_eh_tmf_hard_reset_fib(struct aac_hba_map_info *info,
struct fib *fib)
{ … }
static void aac_tmf_callback(void *context, struct fib *fibptr)
{ … }
static int aac_eh_dev_reset(struct scsi_cmnd *cmd)
{ … }
static int aac_eh_target_reset(struct scsi_cmnd *cmd)
{ … }
static int aac_eh_bus_reset(struct scsi_cmnd* cmd)
{ … }
static int aac_eh_host_reset(struct scsi_cmnd *cmd)
{ … }
static int aac_cfg_open(struct inode *inode, struct file *file)
{ … }
static long aac_cfg_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{ … }
static ssize_t aac_show_model(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t aac_show_vendor(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t aac_show_flags(struct device *cdev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t aac_show_kernel_version(struct device *device,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t aac_show_monitor_version(struct device *device,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t aac_show_bios_version(struct device *device,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t aac_show_driver_version(struct device *device,
struct device_attribute *attr,
char *buf)
{ … }
static ssize_t aac_show_serial_number(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t aac_show_max_channel(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t aac_show_max_id(struct device *device,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t aac_store_reset_adapter(struct device *device,
struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t aac_show_reset_adapter(struct device *device,
struct device_attribute *attr,
char *buf)
{ … }
static struct device_attribute aac_model = …;
static struct device_attribute aac_vendor = …;
static struct device_attribute aac_flags = …;
static struct device_attribute aac_kernel_version = …;
static struct device_attribute aac_monitor_version = …;
static struct device_attribute aac_bios_version = …;
static struct device_attribute aac_lld_version = …;
static struct device_attribute aac_serial_number = …;
static struct device_attribute aac_max_channel = …;
static struct device_attribute aac_max_id = …;
static struct device_attribute aac_reset = …;
static struct attribute *aac_host_attrs[] = …;
ATTRIBUTE_GROUPS(…);
ssize_t aac_get_serial_number(struct device *device, char *buf)
{ … }
static const struct file_operations aac_cfg_fops = …;
static const struct scsi_host_template aac_driver_template = …;
static void __aac_shutdown(struct aac_dev * aac)
{ … }
static void aac_init_char(void)
{ … }
void aac_reinit_aif(struct aac_dev *aac, unsigned int index)
{ … }
static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
{ … }
static void aac_release_resources(struct aac_dev *aac)
{ … }
static int aac_acquire_resources(struct aac_dev *dev)
{ … }
static int __maybe_unused aac_suspend(struct device *dev)
{ … }
static int __maybe_unused aac_resume(struct device *dev)
{ … }
static void aac_shutdown(struct pci_dev *dev)
{ … }
static void aac_remove_one(struct pci_dev *pdev)
{ … }
static pci_ers_result_t aac_pci_error_detected(struct pci_dev *pdev,
pci_channel_state_t error)
{ … }
static pci_ers_result_t aac_pci_mmio_enabled(struct pci_dev *pdev)
{ … }
static pci_ers_result_t aac_pci_slot_reset(struct pci_dev *pdev)
{ … }
static void aac_pci_resume(struct pci_dev *pdev)
{ … }
static struct pci_error_handlers aac_pci_err_handler = …;
static SIMPLE_DEV_PM_OPS(aac_pm_ops, aac_suspend, aac_resume);
static struct pci_driver aac_pci_driver = …;
static int __init aac_init(void)
{ … }
static void __exit aac_exit(void)
{ … }
module_init(…) …;
module_exit(aac_exit);