#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <scsi/scsi_host.h>
#include <linux/libata.h>
#include <linux/dmi.h>
#define DRV_NAME …
#define DRV_VERSION …
#define SIL_DMA_BOUNDARY …
enum { … };
static int sil_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
#ifdef CONFIG_PM_SLEEP
static int sil_pci_device_resume(struct pci_dev *pdev);
#endif
static void sil_dev_config(struct ata_device *dev);
static int sil_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
static int sil_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
static int sil_set_mode(struct ata_link *link, struct ata_device **r_failed);
static enum ata_completion_errors sil_qc_prep(struct ata_queued_cmd *qc);
static void sil_bmdma_setup(struct ata_queued_cmd *qc);
static void sil_bmdma_start(struct ata_queued_cmd *qc);
static void sil_bmdma_stop(struct ata_queued_cmd *qc);
static void sil_freeze(struct ata_port *ap);
static void sil_thaw(struct ata_port *ap);
static const struct pci_device_id sil_pci_tbl[] = …;
static const struct sil_drivelist { … } sil_blacklist [] = …;
static struct pci_driver sil_pci_driver = …;
static const struct scsi_host_template sil_sht = …;
static struct ata_port_operations sil_ops = …;
static const struct ata_port_info sil_port_info[] = …;
static const struct { … } sil_port[] = …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_DEVICE_TABLE(pci, sil_pci_tbl);
MODULE_VERSION(…);
static int slow_down;
module_param(slow_down, int, 0444);
MODULE_PARM_DESC(…) …;
static void sil_bmdma_stop(struct ata_queued_cmd *qc)
{ … }
static void sil_bmdma_setup(struct ata_queued_cmd *qc)
{ … }
static void sil_bmdma_start(struct ata_queued_cmd *qc)
{ … }
static void sil_fill_sg(struct ata_queued_cmd *qc)
{ … }
static enum ata_completion_errors sil_qc_prep(struct ata_queued_cmd *qc)
{ … }
static unsigned char sil_get_device_cache_line(struct pci_dev *pdev)
{ … }
static int sil_set_mode(struct ata_link *link, struct ata_device **r_failed)
{ … }
static inline void __iomem *sil_scr_addr(struct ata_port *ap,
unsigned int sc_reg)
{ … }
static int sil_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val)
{ … }
static int sil_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val)
{ … }
static void sil_host_intr(struct ata_port *ap, u32 bmdma2)
{ … }
static irqreturn_t sil_interrupt(int irq, void *dev_instance)
{ … }
static void sil_freeze(struct ata_port *ap)
{ … }
static void sil_thaw(struct ata_port *ap)
{ … }
static void sil_dev_config(struct ata_device *dev)
{ … }
static void sil_init_controller(struct ata_host *host)
{ … }
static bool sil_broken_system_poweroff(struct pci_dev *pdev)
{ … }
static int sil_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{ … }
#ifdef CONFIG_PM_SLEEP
static int sil_pci_device_resume(struct pci_dev *pdev)
{ … }
#endif
module_pci_driver(…) …;