aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/serverworks.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/serverworks.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/serverworks.c')
-rw-r--r--drivers/ide/pci/serverworks.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
index a7280311357b..e9bd269547bb 100644
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -366,12 +366,17 @@ static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
366 } 366 }
367} 367}
368 368
369#define IDE_HFLAGS_SVWKS \
370 (IDE_HFLAG_LEGACY_IRQS | \
371 IDE_HFLAG_ABUSE_SET_DMA_MODE | \
372 IDE_HFLAG_BOOTABLE)
373
369static const struct ide_port_info serverworks_chipsets[] __devinitdata = { 374static const struct ide_port_info serverworks_chipsets[] __devinitdata = {
370 { /* 0 */ 375 { /* 0 */
371 .name = "SvrWks OSB4", 376 .name = "SvrWks OSB4",
372 .init_chipset = init_chipset_svwks, 377 .init_chipset = init_chipset_svwks,
373 .init_hwif = init_hwif_svwks, 378 .init_hwif = init_hwif_svwks,
374 .host_flags = IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_BOOTABLE, 379 .host_flags = IDE_HFLAGS_SVWKS,
375 .pio_mask = ATA_PIO4, 380 .pio_mask = ATA_PIO4,
376 .mwdma_mask = ATA_MWDMA2, 381 .mwdma_mask = ATA_MWDMA2,
377 .udma_mask = 0x00, /* UDMA is problematic on OSB4 */ 382 .udma_mask = 0x00, /* UDMA is problematic on OSB4 */
@@ -379,7 +384,7 @@ static const struct ide_port_info serverworks_chipsets[] __devinitdata = {
379 .name = "SvrWks CSB5", 384 .name = "SvrWks CSB5",
380 .init_chipset = init_chipset_svwks, 385 .init_chipset = init_chipset_svwks,
381 .init_hwif = init_hwif_svwks, 386 .init_hwif = init_hwif_svwks,
382 .host_flags = IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_BOOTABLE, 387 .host_flags = IDE_HFLAGS_SVWKS,
383 .pio_mask = ATA_PIO4, 388 .pio_mask = ATA_PIO4,
384 .mwdma_mask = ATA_MWDMA2, 389 .mwdma_mask = ATA_MWDMA2,
385 .udma_mask = ATA_UDMA5, 390 .udma_mask = ATA_UDMA5,
@@ -387,7 +392,7 @@ static const struct ide_port_info serverworks_chipsets[] __devinitdata = {
387 .name = "SvrWks CSB6", 392 .name = "SvrWks CSB6",
388 .init_chipset = init_chipset_svwks, 393 .init_chipset = init_chipset_svwks,
389 .init_hwif = init_hwif_svwks, 394 .init_hwif = init_hwif_svwks,
390 .host_flags = IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_BOOTABLE, 395 .host_flags = IDE_HFLAGS_SVWKS,
391 .pio_mask = ATA_PIO4, 396 .pio_mask = ATA_PIO4,
392 .mwdma_mask = ATA_MWDMA2, 397 .mwdma_mask = ATA_MWDMA2,
393 .udma_mask = ATA_UDMA5, 398 .udma_mask = ATA_UDMA5,
@@ -395,8 +400,7 @@ static const struct ide_port_info serverworks_chipsets[] __devinitdata = {
395 .name = "SvrWks CSB6", 400 .name = "SvrWks CSB6",
396 .init_chipset = init_chipset_svwks, 401 .init_chipset = init_chipset_svwks,
397 .init_hwif = init_hwif_svwks, 402 .init_hwif = init_hwif_svwks,
398 .host_flags = IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_SINGLE | 403 .host_flags = IDE_HFLAGS_SVWKS | IDE_HFLAG_SINGLE,
399 IDE_HFLAG_BOOTABLE,
400 .pio_mask = ATA_PIO4, 404 .pio_mask = ATA_PIO4,
401 .mwdma_mask = ATA_MWDMA2, 405 .mwdma_mask = ATA_MWDMA2,
402 .udma_mask = ATA_UDMA5, 406 .udma_mask = ATA_UDMA5,
@@ -404,8 +408,7 @@ static const struct ide_port_info serverworks_chipsets[] __devinitdata = {
404 .name = "SvrWks HT1000", 408 .name = "SvrWks HT1000",
405 .init_chipset = init_chipset_svwks, 409 .init_chipset = init_chipset_svwks,
406 .init_hwif = init_hwif_svwks, 410 .init_hwif = init_hwif_svwks,
407 .host_flags = IDE_HFLAG_LEGACY_IRQS | IDE_HFLAG_SINGLE | 411 .host_flags = IDE_HFLAGS_SVWKS | IDE_HFLAG_SINGLE,
408 IDE_HFLAG_BOOTABLE,
409 .pio_mask = ATA_PIO4, 412 .pio_mask = ATA_PIO4,
410 .mwdma_mask = ATA_MWDMA2, 413 .mwdma_mask = ATA_MWDMA2,
411 .udma_mask = ATA_UDMA5, 414 .udma_mask = ATA_UDMA5,