diff options
Diffstat (limited to 'drivers/ide/pci/triflex.c')
-rw-r--r-- | drivers/ide/pci/triflex.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index c3ff066eea5a..54e411d4e56c 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <linux/ide.h> | 40 | #include <linux/ide.h> |
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | 42 | ||
43 | static int triflex_tune_chipset(ide_drive_t *drive, const u8 speed) | 43 | static void triflex_set_mode(ide_drive_t *drive, const u8 speed) |
44 | { | 44 | { |
45 | ide_hwif_t *hwif = HWIF(drive); | 45 | ide_hwif_t *hwif = HWIF(drive); |
46 | struct pci_dev *dev = hwif->pci_dev; | 46 | struct pci_dev *dev = hwif->pci_dev; |
@@ -82,20 +82,18 @@ static int triflex_tune_chipset(ide_drive_t *drive, const u8 speed) | |||
82 | timing = 0x0808; | 82 | timing = 0x0808; |
83 | break; | 83 | break; |
84 | default: | 84 | default: |
85 | return -1; | 85 | return; |
86 | } | 86 | } |
87 | 87 | ||
88 | triflex_timings &= ~(0xFFFF << (16 * unit)); | 88 | triflex_timings &= ~(0xFFFF << (16 * unit)); |
89 | triflex_timings |= (timing << (16 * unit)); | 89 | triflex_timings |= (timing << (16 * unit)); |
90 | 90 | ||
91 | pci_write_config_dword(dev, channel_offset, triflex_timings); | 91 | pci_write_config_dword(dev, channel_offset, triflex_timings); |
92 | |||
93 | return (ide_config_drive_speed(drive, speed)); | ||
94 | } | 92 | } |
95 | 93 | ||
96 | static void triflex_set_pio_mode(ide_drive_t *drive, const u8 pio) | 94 | static void triflex_set_pio_mode(ide_drive_t *drive, const u8 pio) |
97 | { | 95 | { |
98 | (void)triflex_tune_chipset(drive, XFER_PIO_0 + pio); | 96 | triflex_set_mode(drive, XFER_PIO_0 + pio); |
99 | } | 97 | } |
100 | 98 | ||
101 | static int triflex_config_drive_xfer_rate(ide_drive_t *drive) | 99 | static int triflex_config_drive_xfer_rate(ide_drive_t *drive) |
@@ -111,7 +109,7 @@ static int triflex_config_drive_xfer_rate(ide_drive_t *drive) | |||
111 | static void __devinit init_hwif_triflex(ide_hwif_t *hwif) | 109 | static void __devinit init_hwif_triflex(ide_hwif_t *hwif) |
112 | { | 110 | { |
113 | hwif->set_pio_mode = &triflex_set_pio_mode; | 111 | hwif->set_pio_mode = &triflex_set_pio_mode; |
114 | hwif->speedproc = &triflex_tune_chipset; | 112 | hwif->set_dma_mode = &triflex_set_mode; |
115 | 113 | ||
116 | if (hwif->dma_base == 0) | 114 | if (hwif->dma_base == 0) |
117 | return; | 115 | return; |