aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/pdc202xx_old.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:18 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-25 16:17:18 -0500
commit4db90a145292327b95b03f6dcd3352327235cc36 (patch)
treec48ba5fc31e27d6fbdb8883151bdf237e7eb1920 /drivers/ide/pci/pdc202xx_old.c
parent428c6440ef933a3d9df5adfeb2cbb3ea7ebb6a68 (diff)
ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag
* Add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag and use it to decide what to do with transfer modes < XFER_PIO_0 in ide_set_xfer_rate(). * Set IDE_HFLAG_ABUSE_SET_DMA_MODE in host drivers that need it (aec62xx, amd74xx, cs5520, cs5535, hpt34x, hpt366, pdc202xx_old, serverworks, tc86c001 and via82cxxx) and cleanup ->set_dma_mode methods in host drivers that don't (IDE core code guarantees that ->set_dma_mode will be called only for modes which are present in SWDMA/MWDMA/UDMA masks). While at it: * Add IDE_HFLAGS_HPT34X/HPT3XX/PDC202XX/SVWKS define in hpt34x/hpt366/pdc202xx_old/serverworks host driver. There should be no functionality changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/pdc202xx_old.c')
-rw-r--r--drivers/ide/pci/pdc202xx_old.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 22c7a7533b69..67b2781e2213 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -375,6 +375,11 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev,
375 } 375 }
376} 376}
377 377
378#define IDE_HFLAGS_PDC202XX \
379 (IDE_HFLAG_ERROR_STOPS_FIFO | \
380 IDE_HFLAG_ABUSE_SET_DMA_MODE | \
381 IDE_HFLAG_OFF_BOARD)
382
378#define DECLARE_PDC2026X_DEV(name_str, udma, extra_flags) \ 383#define DECLARE_PDC2026X_DEV(name_str, udma, extra_flags) \
379 { \ 384 { \
380 .name = name_str, \ 385 .name = name_str, \
@@ -382,9 +387,7 @@ static void __devinit pdc202ata4_fixup_irq(struct pci_dev *dev,
382 .init_hwif = init_hwif_pdc202xx, \ 387 .init_hwif = init_hwif_pdc202xx, \
383 .init_dma = init_dma_pdc202xx, \ 388 .init_dma = init_dma_pdc202xx, \
384 .extra = 48, \ 389 .extra = 48, \
385 .host_flags = IDE_HFLAG_ERROR_STOPS_FIFO | \ 390 .host_flags = IDE_HFLAGS_PDC202XX | extra_flags, \
386 extra_flags | \
387 IDE_HFLAG_OFF_BOARD, \
388 .pio_mask = ATA_PIO4, \ 391 .pio_mask = ATA_PIO4, \
389 .mwdma_mask = ATA_MWDMA2, \ 392 .mwdma_mask = ATA_MWDMA2, \
390 .udma_mask = udma, \ 393 .udma_mask = udma, \
@@ -397,8 +400,7 @@ static const struct ide_port_info pdc202xx_chipsets[] __devinitdata = {
397 .init_hwif = init_hwif_pdc202xx, 400 .init_hwif = init_hwif_pdc202xx,
398 .init_dma = init_dma_pdc202xx, 401 .init_dma = init_dma_pdc202xx,
399 .extra = 16, 402 .extra = 16,
400 .host_flags = IDE_HFLAG_ERROR_STOPS_FIFO | 403 .host_flags = IDE_HFLAGS_PDC202XX,
401 IDE_HFLAG_OFF_BOARD,
402 .pio_mask = ATA_PIO4, 404 .pio_mask = ATA_PIO4,
403 .mwdma_mask = ATA_MWDMA2, 405 .mwdma_mask = ATA_MWDMA2,
404 .udma_mask = ATA_UDMA2, 406 .udma_mask = ATA_UDMA2,