diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:06 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:06 -0400 |
commit | 47b687882c02f802dd5bbe1227effe006820246e (patch) | |
tree | 7b9048ebfa0a53203e4e3c55649f28e352a143cc /drivers/ide/setup-pci.c | |
parent | 7cab14a79973893392111b8f887856a54621f759 (diff) |
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.c | 5 |
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 | |||
428 | static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif) | 428 | static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif) |
429 | { | 429 | { |
430 | u16 pcicmd; | 430 | u16 pcicmd; |
431 | |||
431 | pci_read_config_word(dev, PCI_COMMAND, &pcicmd); | 432 | pci_read_config_word(dev, PCI_COMMAND, &pcicmd); |
432 | 433 | ||
433 | if ((d->autodma == AUTODMA) || | 434 | if ((d->host_flags & IDE_HFLAG_NO_AUTODMA) == 0 || |
434 | ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && | 435 | ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE && |
435 | (dev->class & 0x80))) { | 436 | (dev->class & 0x80))) { |
436 | unsigned long dma_base = ide_get_or_set_dma_base(hwif); | 437 | 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 | |||
558 | if (d->init_iops) | 559 | if (d->init_iops) |
559 | d->init_iops(hwif); | 560 | d->init_iops(hwif); |
560 | 561 | ||
561 | if (d->autodma == NODMA) | 562 | if (d->host_flags & IDE_HFLAG_NO_DMA) |
562 | goto bypass_legacy_dma; | 563 | goto bypass_legacy_dma; |
563 | 564 | ||
564 | if(d->init_setup_dma) | 565 | if(d->init_setup_dma) |