diff options
Diffstat (limited to 'drivers/ide/pci/triflex.c')
-rw-r--r-- | drivers/ide/pci/triflex.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index 5e06179c3469..35e8c612638f 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
@@ -48,7 +48,7 @@ static int triflex_tune_chipset(ide_drive_t *drive, u8 xferspeed) | |||
48 | u16 timing = 0; | 48 | u16 timing = 0; |
49 | u32 triflex_timings = 0; | 49 | u32 triflex_timings = 0; |
50 | u8 unit = (drive->select.b.unit & 0x01); | 50 | u8 unit = (drive->select.b.unit & 0x01); |
51 | u8 speed = ide_rate_filter(0, xferspeed); | 51 | u8 speed = ide_rate_filter(drive, xferspeed); |
52 | 52 | ||
53 | pci_read_config_dword(dev, channel_offset, &triflex_timings); | 53 | pci_read_config_dword(dev, channel_offset, &triflex_timings); |
54 | 54 | ||
@@ -100,20 +100,9 @@ static void triflex_tune_drive(ide_drive_t *drive, u8 pio) | |||
100 | (void) triflex_tune_chipset(drive, (XFER_PIO_0 + use_pio)); | 100 | (void) triflex_tune_chipset(drive, (XFER_PIO_0 + use_pio)); |
101 | } | 101 | } |
102 | 102 | ||
103 | static int triflex_config_drive_for_dma(ide_drive_t *drive) | ||
104 | { | ||
105 | int speed = ide_dma_speed(drive, 0); /* No ultra speeds */ | ||
106 | |||
107 | if (!speed) | ||
108 | return 0; | ||
109 | |||
110 | (void) triflex_tune_chipset(drive, speed); | ||
111 | return ide_dma_enable(drive); | ||
112 | } | ||
113 | |||
114 | static int triflex_config_drive_xfer_rate(ide_drive_t *drive) | 103 | static int triflex_config_drive_xfer_rate(ide_drive_t *drive) |
115 | { | 104 | { |
116 | if (ide_use_dma(drive) && triflex_config_drive_for_dma(drive)) | 105 | if (ide_tune_dma(drive)) |
117 | return 0; | 106 | return 0; |
118 | 107 | ||
119 | triflex_tune_drive(drive, 255); | 108 | triflex_tune_drive(drive, 255); |