2006-08-29 22:12:40 +00:00
|
|
|
/*
|
|
|
|
* ata_generic.c - Generic PATA/SATA controller driver.
|
2008-10-27 15:09:10 +00:00
|
|
|
* Copyright 2005 Red Hat Inc, all rights reserved.
|
2006-08-29 22:12:40 +00:00
|
|
|
*
|
2006-08-31 04:03:49 +00:00
|
|
|
* Elements from ide/pci/generic.c
|
2006-08-29 22:12:40 +00:00
|
|
|
* Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org>
|
|
|
|
* Portions (C) Copyright 2002 Red Hat Inc <alan@redhat.com>
|
|
|
|
*
|
|
|
|
* May be copied or modified under the terms of the GNU General Public License
|
2006-08-31 04:03:49 +00:00
|
|
|
*
|
2006-08-29 22:12:40 +00:00
|
|
|
* Driver for PCI IDE interfaces implementing the standard bus mastering
|
|
|
|
* interface functionality. This assumes the BIOS did the drive set up and
|
|
|
|
* tuning for us. By default we do not grab all IDE class devices as they
|
|
|
|
* may have other drivers or need fixups to avoid problems. Instead we keep
|
|
|
|
* a default list of stuff without documentation/driver that appears to
|
2006-08-31 04:03:49 +00:00
|
|
|
* work.
|
2006-08-29 22:12:40 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/pci.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/blkdev.h>
|
|
|
|
#include <linux/delay.h>
|
|
|
|
#include <scsi/scsi_host.h>
|
|
|
|
#include <linux/libata.h>
|
|
|
|
|
|
|
|
#define DRV_NAME "ata_generic"
|
2008-01-19 16:07:58 +00:00
|
|
|
#define DRV_VERSION "0.2.15"
|
2006-08-29 22:12:40 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* A generic parallel ATA driver using libata
|
|
|
|
*/
|
|
|
|
|
2010-06-22 10:27:26 +00:00
|
|
|
enum {
|
|
|
|
ATA_GEN_CLASS_MATCH = (1 << 0),
|
|
|
|
ATA_GEN_FORCE_DMA = (1 << 1),
|
2010-09-28 12:19:38 +00:00
|
|
|
ATA_GEN_INTEL_IDER = (1 << 2),
|
2010-06-22 10:27:26 +00:00
|
|
|
};
|
|
|
|
|
2006-08-29 22:12:40 +00:00
|
|
|
/**
|
|
|
|
* generic_set_mode - mode setting
|
2007-08-06 09:36:23 +00:00
|
|
|
* @link: link to set up
|
2007-01-24 11:47:07 +00:00
|
|
|
* @unused: returned device on error
|
2006-08-29 22:12:40 +00:00
|
|
|
*
|
|
|
|
* Use a non standard set_mode function. We don't want to be tuned.
|
|
|
|
* The BIOS configured everything. Our job is not to fiddle. We
|
|
|
|
* read the dma enabled bits from the PCI configuration of the device
|
2006-08-31 04:03:49 +00:00
|
|
|
* and respect them.
|
2006-08-29 22:12:40 +00:00
|
|
|
*/
|
2006-08-31 04:03:49 +00:00
|
|
|
|
2007-08-06 09:36:23 +00:00
|
|
|
static int generic_set_mode(struct ata_link *link, struct ata_device **unused)
|
2006-08-29 22:12:40 +00:00
|
|
|
{
|
2007-08-06 09:36:23 +00:00
|
|
|
struct ata_port *ap = link->ap;
|
2010-06-22 10:27:26 +00:00
|
|
|
const struct pci_device_id *id = ap->host->private_data;
|
2006-08-29 22:12:40 +00:00
|
|
|
int dma_enabled = 0;
|
2007-08-06 09:36:23 +00:00
|
|
|
struct ata_device *dev;
|
2006-08-29 22:12:40 +00:00
|
|
|
|
2010-06-22 10:27:26 +00:00
|
|
|
if (id->driver_data & ATA_GEN_FORCE_DMA) {
|
|
|
|
dma_enabled = 0xff;
|
|
|
|
} else if (ap->ioaddr.bmdma_addr) {
|
|
|
|
/* Bits 5 and 6 indicate if DMA is active on master/slave */
|
2007-07-03 14:11:30 +00:00
|
|
|
dma_enabled = ioread8(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
|
2010-06-22 10:27:26 +00:00
|
|
|
}
|
2006-08-31 04:03:49 +00:00
|
|
|
|
2008-11-03 11:03:17 +00:00
|
|
|
ata_for_each_dev(dev, link, ENABLED) {
|
2007-11-27 10:43:38 +00:00
|
|
|
/* We don't really care */
|
|
|
|
dev->pio_mode = XFER_PIO_0;
|
|
|
|
dev->dma_mode = XFER_MW_DMA_0;
|
|
|
|
/* We do need the right mode information for DMA or PIO
|
|
|
|
and this comes from the current configuration flags */
|
|
|
|
if (dma_enabled & (1 << (5 + dev->devno))) {
|
2007-11-27 10:43:41 +00:00
|
|
|
unsigned int xfer_mask = ata_id_xfermask(dev->id);
|
|
|
|
const char *name;
|
|
|
|
|
|
|
|
if (xfer_mask & (ATA_MASK_MWDMA | ATA_MASK_UDMA))
|
|
|
|
name = ata_mode_string(xfer_mask);
|
|
|
|
else {
|
|
|
|
/* SWDMA perhaps? */
|
|
|
|
name = "DMA";
|
|
|
|
xfer_mask |= ata_xfer_mode2mask(XFER_MW_DMA_0);
|
|
|
|
}
|
|
|
|
|
ata: Convert ata_<foo>_printk(KERN_<LEVEL> to ata_<foo>_<level>
Saves text by removing nearly duplicated text format strings by
creating ata_<foo>_printk functions and printf extension %pV.
ata defconfig size shrinks ~5% (~8KB), allyesconfig ~2.5% (~13KB)
Format string duplication comes from:
#define ata_link_printk(link, lv, fmt, args...) do { \
if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link) \
printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \
(link)->pmp , ##args); \
else \
printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
} while(0)
Coalesce long formats.
$ size drivers/ata/built-in.*
text data bss dec hex filename
544969 73893 116584 735446 b38d6 drivers/ata/built-in.allyesconfig.ata.o
558429 73893 117864 750186 b726a drivers/ata/built-in.allyesconfig.dev_level.o
141328 14689 4220 160237 271ed drivers/ata/built-in.defconfig.ata.o
149567 14689 4220 168476 2921c drivers/ata/built-in.defconfig.dev_level.o
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2011-04-15 22:51:59 +00:00
|
|
|
ata_dev_info(dev, "configured for %s\n", name);
|
2007-11-27 10:43:41 +00:00
|
|
|
|
|
|
|
dev->xfer_mode = ata_xfer_mask2mode(xfer_mask);
|
|
|
|
dev->xfer_shift = ata_xfer_mode2shift(dev->xfer_mode);
|
2007-11-27 10:43:38 +00:00
|
|
|
dev->flags &= ~ATA_DFLAG_PIO;
|
|
|
|
} else {
|
ata: Convert ata_<foo>_printk(KERN_<LEVEL> to ata_<foo>_<level>
Saves text by removing nearly duplicated text format strings by
creating ata_<foo>_printk functions and printf extension %pV.
ata defconfig size shrinks ~5% (~8KB), allyesconfig ~2.5% (~13KB)
Format string duplication comes from:
#define ata_link_printk(link, lv, fmt, args...) do { \
if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link) \
printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \
(link)->pmp , ##args); \
else \
printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \
} while(0)
Coalesce long formats.
$ size drivers/ata/built-in.*
text data bss dec hex filename
544969 73893 116584 735446 b38d6 drivers/ata/built-in.allyesconfig.ata.o
558429 73893 117864 750186 b726a drivers/ata/built-in.allyesconfig.dev_level.o
141328 14689 4220 160237 271ed drivers/ata/built-in.defconfig.ata.o
149567 14689 4220 168476 2921c drivers/ata/built-in.defconfig.dev_level.o
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2011-04-15 22:51:59 +00:00
|
|
|
ata_dev_info(dev, "configured for PIO\n");
|
2007-11-27 10:43:38 +00:00
|
|
|
dev->xfer_mode = XFER_PIO_0;
|
|
|
|
dev->xfer_shift = ATA_SHIFT_PIO;
|
|
|
|
dev->flags |= ATA_DFLAG_PIO;
|
2006-08-29 22:12:40 +00:00
|
|
|
}
|
|
|
|
}
|
2007-01-24 11:47:07 +00:00
|
|
|
return 0;
|
2006-08-29 22:12:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static struct scsi_host_template generic_sht = {
|
2008-03-25 03:22:49 +00:00
|
|
|
ATA_BMDMA_SHT(DRV_NAME),
|
2006-08-29 22:12:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct ata_port_operations generic_port_ops = {
|
libata: implement and use ops inheritance
libata lets low level drivers build ata_port_operations table and
register it with libata core layer. This allows low level drivers
high level of flexibility but also burdens them with lots of
boilerplate entries.
This becomes worse for drivers which support related similar
controllers which differ slightly. They share most of the operations
except for a few. However, the driver still needs to list all
operations for each variant. This results in large number of
duplicate entries, which is not only inefficient but also error-prone
as it becomes very difficult to tell what the actual differences are.
This duplicate boilerplates all over the low level drivers also make
updating the core layer exteremely difficult and error-prone. When
compounded with multi-branched development model, it ends up
accumulating inconsistencies over time. Some of those inconsistencies
cause immediate problems and fixed. Others just remain there dormant
making maintenance increasingly difficult.
To rectify the problem, this patch implements ata_port_operations
inheritance. To allow LLDs to easily re-use their own ops tables
overriding only specific methods, this patch implements poor man's
class inheritance. An ops table has ->inherits field which can be set
to any ops table as long as it doesn't create a loop. When the host
is started, the inheritance chain is followed and any operation which
isn't specified is taken from the nearest ancestor which has it
specified. This operation is called finalization and done only once
per an ops table and the LLD doesn't have to do anything special about
it other than making the ops table non-const such that libata can
update it.
libata provides four base ops tables lower drivers can inherit from -
base, sata, pmp, sff and bmdma. To avoid overriding these ops
accidentaly, these ops are declared const and LLDs should always
inherit these instead of using them directly.
After finalization, all the ops table are identical before and after
the patch except for setting .irq_handler to ata_interrupt in drivers
which didn't use to. The .irq_handler doesn't have any actual effect
and the field will soon be removed by later patch.
* sata_sx4 is still using old style EH and currently doesn't take
advantage of ops inheritance.
Signed-off-by: Tejun Heo <htejun@gmail.com>
2008-03-25 03:22:49 +00:00
|
|
|
.inherits = &ata_bmdma_port_ops,
|
2007-04-10 23:04:20 +00:00
|
|
|
.cable_detect = ata_cable_unknown,
|
libata: implement and use ops inheritance
libata lets low level drivers build ata_port_operations table and
register it with libata core layer. This allows low level drivers
high level of flexibility but also burdens them with lots of
boilerplate entries.
This becomes worse for drivers which support related similar
controllers which differ slightly. They share most of the operations
except for a few. However, the driver still needs to list all
operations for each variant. This results in large number of
duplicate entries, which is not only inefficient but also error-prone
as it becomes very difficult to tell what the actual differences are.
This duplicate boilerplates all over the low level drivers also make
updating the core layer exteremely difficult and error-prone. When
compounded with multi-branched development model, it ends up
accumulating inconsistencies over time. Some of those inconsistencies
cause immediate problems and fixed. Others just remain there dormant
making maintenance increasingly difficult.
To rectify the problem, this patch implements ata_port_operations
inheritance. To allow LLDs to easily re-use their own ops tables
overriding only specific methods, this patch implements poor man's
class inheritance. An ops table has ->inherits field which can be set
to any ops table as long as it doesn't create a loop. When the host
is started, the inheritance chain is followed and any operation which
isn't specified is taken from the nearest ancestor which has it
specified. This operation is called finalization and done only once
per an ops table and the LLD doesn't have to do anything special about
it other than making the ops table non-const such that libata can
update it.
libata provides four base ops tables lower drivers can inherit from -
base, sata, pmp, sff and bmdma. To avoid overriding these ops
accidentaly, these ops are declared const and LLDs should always
inherit these instead of using them directly.
After finalization, all the ops table are identical before and after
the patch except for setting .irq_handler to ata_interrupt in drivers
which didn't use to. The .irq_handler doesn't have any actual effect
and the field will soon be removed by later patch.
* sata_sx4 is still using old style EH and currently doesn't take
advantage of ops inheritance.
Signed-off-by: Tejun Heo <htejun@gmail.com>
2008-03-25 03:22:49 +00:00
|
|
|
.set_mode = generic_set_mode,
|
2006-08-31 04:03:49 +00:00
|
|
|
};
|
|
|
|
|
2006-08-29 22:12:40 +00:00
|
|
|
static int all_generic_ide; /* Set to claim all devices */
|
|
|
|
|
2010-09-28 12:19:38 +00:00
|
|
|
/**
|
|
|
|
* is_intel_ider - identify intel IDE-R devices
|
|
|
|
* @dev: PCI device
|
|
|
|
*
|
|
|
|
* Distinguish Intel IDE-R controller devices from other Intel IDE
|
|
|
|
* devices. IDE-R devices have no timing registers and are in
|
|
|
|
* most respects virtual. They should be driven by the ata_generic
|
|
|
|
* driver.
|
|
|
|
*
|
|
|
|
* IDE-R devices have PCI offset 0xF8.L as zero, later Intel ATA has
|
|
|
|
* it non zero. All Intel ATA has 0x40 writable (timing), but it is
|
|
|
|
* not writable on IDE-R devices (this is guaranteed).
|
|
|
|
*/
|
|
|
|
|
|
|
|
static int is_intel_ider(struct pci_dev *dev)
|
|
|
|
{
|
|
|
|
/* For Intel IDE the value at 0xF8 is only zero on IDE-R
|
|
|
|
interfaces */
|
|
|
|
u32 r;
|
|
|
|
u16 t;
|
|
|
|
|
|
|
|
/* Check the manufacturing ID, it will be zero for IDE-R */
|
|
|
|
pci_read_config_dword(dev, 0xF8, &r);
|
|
|
|
/* Not IDE-R: punt so that ata_(old)piix gets it */
|
|
|
|
if (r != 0)
|
|
|
|
return 0;
|
|
|
|
/* 0xF8 will also be zero on some early Intel IDE devices
|
|
|
|
but they will have a sane timing register */
|
|
|
|
pci_read_config_word(dev, 0x40, &t);
|
|
|
|
if (t != 0)
|
|
|
|
return 0;
|
|
|
|
/* Finally check if the timing register is writable so that
|
|
|
|
we eliminate any early devices hot-docked in a docking
|
|
|
|
station */
|
|
|
|
pci_write_config_word(dev, 0x40, 1);
|
|
|
|
pci_read_config_word(dev, 0x40, &t);
|
|
|
|
if (t) {
|
|
|
|
pci_write_config_word(dev, 0x40, 0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2006-08-29 22:12:40 +00:00
|
|
|
/**
|
|
|
|
* ata_generic_init - attach generic IDE
|
|
|
|
* @dev: PCI device found
|
|
|
|
* @id: match entry
|
|
|
|
*
|
|
|
|
* Called each time a matching IDE interface is found. We check if the
|
2006-08-31 04:03:49 +00:00
|
|
|
* interface is one we wish to claim and if so we perform any chip
|
2006-08-29 22:12:40 +00:00
|
|
|
* specific hacks then let the ATA layer do the heavy lifting.
|
|
|
|
*/
|
2006-08-31 04:03:49 +00:00
|
|
|
|
2006-08-29 22:12:40 +00:00
|
|
|
static int ata_generic_init_one(struct pci_dev *dev, const struct pci_device_id *id)
|
|
|
|
{
|
|
|
|
u16 command;
|
2007-05-04 10:43:58 +00:00
|
|
|
static const struct ata_port_info info = {
|
2007-05-28 10:59:48 +00:00
|
|
|
.flags = ATA_FLAG_SLAVE_POSS,
|
2009-03-14 20:38:24 +00:00
|
|
|
.pio_mask = ATA_PIO4,
|
|
|
|
.mwdma_mask = ATA_MWDMA2,
|
2007-07-09 16:16:50 +00:00
|
|
|
.udma_mask = ATA_UDMA5,
|
2006-08-29 22:12:40 +00:00
|
|
|
.port_ops = &generic_port_ops
|
|
|
|
};
|
2007-05-04 10:43:58 +00:00
|
|
|
const struct ata_port_info *ppi[] = { &info, NULL };
|
2006-08-31 04:03:49 +00:00
|
|
|
|
2006-08-29 22:12:40 +00:00
|
|
|
/* Don't use the generic entry unless instructed to do so */
|
2010-06-22 10:27:26 +00:00
|
|
|
if ((id->driver_data & ATA_GEN_CLASS_MATCH) && all_generic_ide == 0)
|
2006-08-29 22:12:40 +00:00
|
|
|
return -ENODEV;
|
|
|
|
|
2012-05-11 16:33:23 +00:00
|
|
|
if ((id->driver_data & ATA_GEN_INTEL_IDER) && !all_generic_ide)
|
2010-09-28 12:19:38 +00:00
|
|
|
if (!is_intel_ider(dev))
|
|
|
|
return -ENODEV;
|
|
|
|
|
2006-08-29 22:12:40 +00:00
|
|
|
/* Devices that need care */
|
|
|
|
if (dev->vendor == PCI_VENDOR_ID_UMC &&
|
|
|
|
dev->device == PCI_DEVICE_ID_UMC_UM8886A &&
|
|
|
|
(!(PCI_FUNC(dev->devfn) & 1)))
|
|
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
if (dev->vendor == PCI_VENDOR_ID_OPTI &&
|
|
|
|
dev->device == PCI_DEVICE_ID_OPTI_82C558 &&
|
|
|
|
(!(PCI_FUNC(dev->devfn) & 1)))
|
|
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
/* Don't re-enable devices in generic mode or we will break some
|
|
|
|
motherboards with disabled and unused IDE controllers */
|
|
|
|
pci_read_config_word(dev, PCI_COMMAND, &command);
|
|
|
|
if (!(command & PCI_COMMAND_IO))
|
|
|
|
return -ENODEV;
|
2006-08-31 04:03:49 +00:00
|
|
|
|
2006-08-29 22:12:40 +00:00
|
|
|
if (dev->vendor == PCI_VENDOR_ID_AL)
|
2008-04-07 13:47:16 +00:00
|
|
|
ata_pci_bmdma_clear_simplex(dev);
|
2006-08-29 22:12:40 +00:00
|
|
|
|
2008-05-02 22:13:39 +00:00
|
|
|
if (dev->vendor == PCI_VENDOR_ID_ATI) {
|
|
|
|
int rc = pcim_enable_device(dev);
|
|
|
|
if (rc < 0)
|
|
|
|
return rc;
|
|
|
|
pcim_pin_device(dev);
|
|
|
|
}
|
2010-06-22 10:27:26 +00:00
|
|
|
return ata_pci_bmdma_init_one(dev, ppi, &generic_sht, (void *)id, 0);
|
2006-08-29 22:12:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static struct pci_device_id ata_generic[] = {
|
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_SAMURAI_IDE), },
|
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_6565), },
|
2006-08-31 04:03:49 +00:00
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8673F), },
|
2006-08-29 22:12:40 +00:00
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886A), },
|
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF), },
|
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE), },
|
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C561), },
|
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C558), },
|
2010-06-22 10:27:26 +00:00
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_CENATEK,PCI_DEVICE_ID_CENATEK_IDE),
|
|
|
|
.driver_data = ATA_GEN_FORCE_DMA },
|
2009-11-30 13:23:11 +00:00
|
|
|
#if !defined(CONFIG_PATA_TOSHIBA) && !defined(CONFIG_PATA_TOSHIBA_MODULE)
|
2006-08-29 22:12:40 +00:00
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1), },
|
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2), },
|
2009-11-30 13:23:11 +00:00
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_3), },
|
|
|
|
{ PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_5), },
|
2010-09-28 12:19:38 +00:00
|
|
|
#endif
|
|
|
|
/* Intel, IDE class device */
|
|
|
|
{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
|
2011-02-15 06:13:24 +00:00
|
|
|
PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL,
|
2010-09-28 12:19:38 +00:00
|
|
|
.driver_data = ATA_GEN_INTEL_IDER },
|
2006-08-29 22:12:40 +00:00
|
|
|
/* Must come last. If you add entries adjust this table appropriately */
|
2010-06-22 10:27:26 +00:00
|
|
|
{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL),
|
|
|
|
.driver_data = ATA_GEN_CLASS_MATCH },
|
2006-08-29 22:12:40 +00:00
|
|
|
{ 0, },
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct pci_driver ata_generic_pci_driver = {
|
|
|
|
.name = DRV_NAME,
|
|
|
|
.id_table = ata_generic,
|
|
|
|
.probe = ata_generic_init_one,
|
2006-11-22 16:57:36 +00:00
|
|
|
.remove = ata_pci_remove_one,
|
2007-03-02 08:31:26 +00:00
|
|
|
#ifdef CONFIG_PM
|
2006-11-22 16:57:36 +00:00
|
|
|
.suspend = ata_pci_device_suspend,
|
|
|
|
.resume = ata_pci_device_resume,
|
2007-03-02 08:31:26 +00:00
|
|
|
#endif
|
2006-08-29 22:12:40 +00:00
|
|
|
};
|
|
|
|
|
2012-04-19 05:43:05 +00:00
|
|
|
module_pci_driver(ata_generic_pci_driver);
|
2006-08-29 22:12:40 +00:00
|
|
|
|
|
|
|
MODULE_AUTHOR("Alan Cox");
|
|
|
|
MODULE_DESCRIPTION("low-level driver for generic ATA");
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_DEVICE_TABLE(pci, ata_generic);
|
|
|
|
MODULE_VERSION(DRV_VERSION);
|
|
|
|
|
|
|
|
module_param(all_generic_ide, int, 0);
|