summaryrefslogtreecommitdiffstats
path: root/drivers/ide/setup-pci.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 00:30:06 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 00:30:06 +0200
commit47b687882c02f802dd5bbe1227effe006820246e (patch)
tree7b9048ebfa0a53203e4e3c55649f28e352a143cc /drivers/ide/setup-pci.c
parentide: add IDE_HFLAG_BOOTABLE host flag (diff)
downloadlinux-47b687882c02f802dd5bbe1227effe006820246e.tar.xz
linux-47b687882c02f802dd5bbe1227effe006820246e.zip
ide: add IDE_HFLAG_NO_{DMA,AUTODMA} host flags
Add IDE_HFLAG_NO_{DMA,AUTODMA} host flags. Convert all host drivers using ide_pci_device_t to use these flags instead of d->autodma and then remove no longer needed d->autodma. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/setup-pci.c')
-rw-r--r--drivers/ide/setup-pci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index d5901ec9e8cc..26061fe1b712 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -428,9 +428,10 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi
static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif)
{
u16 pcicmd;
+
pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
- if ((d->autodma == AUTODMA) ||
+ if ((d->host_flags & IDE_HFLAG_NO_AUTODMA) == 0 ||
((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
(dev->class & 0x80))) {
unsigned long dma_base = ide_get_or_set_dma_base(hwif);
@@ -558,7 +559,7 @@ void ide_pci_setup_ports(struct pci_dev *dev, ide_pci_device_t *d, int pciirq, a
if (d->init_iops)
d->init_iops(hwif);
- if (d->autodma == NODMA)
+ if (d->host_flags & IDE_HFLAG_NO_DMA)
goto bypass_legacy_dma;
if(d->init_setup_dma)