#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/gfp.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>
#define DRV_NAME …
#define DRV_VERSION …
#define ADMA_ATA_REGS(base, port_no) …
#define ADMA_REGS(base, port_no) …
#define ADMA_PORT_REGS(ap) …
enum { … };
adma_state_t;
struct adma_port_priv { … };
static int adma_ata_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent);
static int adma_port_start(struct ata_port *ap);
static void adma_port_stop(struct ata_port *ap);
static enum ata_completion_errors adma_qc_prep(struct ata_queued_cmd *qc);
static unsigned int adma_qc_issue(struct ata_queued_cmd *qc);
static int adma_check_atapi_dma(struct ata_queued_cmd *qc);
static void adma_freeze(struct ata_port *ap);
static void adma_thaw(struct ata_port *ap);
static int adma_prereset(struct ata_link *link, unsigned long deadline);
static const struct scsi_host_template adma_ata_sht = …;
static struct ata_port_operations adma_ata_ops = …;
static struct ata_port_info adma_port_info[] = …;
static const struct pci_device_id adma_ata_pci_tbl[] = …;
static struct pci_driver adma_ata_pci_driver = …;
static int adma_check_atapi_dma(struct ata_queued_cmd *qc)
{ … }
static void adma_reset_engine(struct ata_port *ap)
{ … }
static void adma_reinit_engine(struct ata_port *ap)
{ … }
static inline void adma_enter_reg_mode(struct ata_port *ap)
{ … }
static void adma_freeze(struct ata_port *ap)
{ … }
static void adma_thaw(struct ata_port *ap)
{ … }
static int adma_prereset(struct ata_link *link, unsigned long deadline)
{ … }
static int adma_fill_sg(struct ata_queued_cmd *qc)
{ … }
static enum ata_completion_errors adma_qc_prep(struct ata_queued_cmd *qc)
{ … }
static inline void adma_packet_start(struct ata_queued_cmd *qc)
{ … }
static unsigned int adma_qc_issue(struct ata_queued_cmd *qc)
{ … }
static inline unsigned int adma_intr_pkt(struct ata_host *host)
{ … }
static inline unsigned int adma_intr_mmio(struct ata_host *host)
{ … }
static irqreturn_t adma_intr(int irq, void *dev_instance)
{ … }
static void adma_ata_setup_port(struct ata_ioports *port, void __iomem *base)
{ … }
static int adma_port_start(struct ata_port *ap)
{ … }
static void adma_port_stop(struct ata_port *ap)
{ … }
static void adma_host_init(struct ata_host *host, unsigned int chip_id)
{ … }
static int adma_ata_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent)
{ … }
module_pci_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_DEVICE_TABLE(pci, adma_ata_pci_tbl);
MODULE_VERSION(…);