aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/sis5513.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/sis5513.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/sis5513.c')
-rw-r--r--drivers/ide/pci/sis5513.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 3f35386d9cad..85d36996e6af 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -351,25 +351,10 @@ static void sis_program_udma_timings(ide_drive_t *drive, const u8 mode)
351 351
352static void sis_set_dma_mode(ide_drive_t *drive, const u8 speed) 352static void sis_set_dma_mode(ide_drive_t *drive, const u8 speed)
353{ 353{
354 /* Config chip for mode */ 354 if (speed >= XFER_UDMA_0)
355 switch(speed) { 355 sis_program_udma_timings(drive, speed);
356 case XFER_UDMA_6: 356 else
357 case XFER_UDMA_5: 357 sis_program_timings(drive, speed);
358 case XFER_UDMA_4:
359 case XFER_UDMA_3:
360 case XFER_UDMA_2:
361 case XFER_UDMA_1:
362 case XFER_UDMA_0:
363 sis_program_udma_timings(drive, speed);
364 break;
365 case XFER_MW_DMA_2:
366 case XFER_MW_DMA_1:
367 case XFER_MW_DMA_0:
368 sis_program_timings(drive, speed);
369 break;
370 default:
371 break;
372 }
373} 358}
374 359
375static u8 sis5513_ata133_udma_filter(ide_drive_t *drive) 360static u8 sis5513_ata133_udma_filter(ide_drive_t *drive)