diff options
Diffstat (limited to 'drivers/ide/pci/it8213.c')
-rw-r--r-- | drivers/ide/pci/it8213.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/ide/pci/it8213.c b/drivers/ide/pci/it8213.c index 424f00bb160d..02b56cb7bb1b 100644 --- a/drivers/ide/pci/it8213.c +++ b/drivers/ide/pci/it8213.c | |||
@@ -17,22 +17,6 @@ | |||
17 | 17 | ||
18 | #include <asm/io.h> | 18 | #include <asm/io.h> |
19 | 19 | ||
20 | /* | ||
21 | * it8213_ratemask - Compute available modes | ||
22 | * @drive: IDE drive | ||
23 | * | ||
24 | * Compute the available speeds for the devices on the interface. This | ||
25 | * is all modes to ATA133 clipped by drive cable setup. | ||
26 | */ | ||
27 | |||
28 | static u8 it8213_ratemask (ide_drive_t *drive) | ||
29 | { | ||
30 | u8 mode = 4; | ||
31 | if (!eighty_ninty_three(drive)) | ||
32 | mode = min_t(u8, mode, 1); | ||
33 | return mode; | ||
34 | } | ||
35 | |||
36 | /** | 20 | /** |
37 | * it8213_dma_2_pio - return the PIO mode matching DMA | 21 | * it8213_dma_2_pio - return the PIO mode matching DMA |
38 | * @xfer_rate: transfer speed | 22 | * @xfer_rate: transfer speed |
@@ -145,7 +129,7 @@ static int it8213_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
145 | ide_hwif_t *hwif = HWIF(drive); | 129 | ide_hwif_t *hwif = HWIF(drive); |
146 | struct pci_dev *dev = hwif->pci_dev; | 130 | struct pci_dev *dev = hwif->pci_dev; |
147 | u8 maslave = 0x40; | 131 | u8 maslave = 0x40; |
148 | u8 speed = ide_rate_filter(it8213_ratemask(drive), xferspeed); | 132 | u8 speed = ide_rate_filter(drive, xferspeed); |
149 | int a_speed = 3 << (drive->dn * 4); | 133 | int a_speed = 3 << (drive->dn * 4); |
150 | int u_flag = 1 << drive->dn; | 134 | int u_flag = 1 << drive->dn; |
151 | int v_flag = 0x01 << drive->dn; | 135 | int v_flag = 0x01 << drive->dn; |
@@ -222,7 +206,7 @@ static int it8213_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
222 | 206 | ||
223 | static int config_chipset_for_dma (ide_drive_t *drive) | 207 | static int config_chipset_for_dma (ide_drive_t *drive) |
224 | { | 208 | { |
225 | u8 speed = ide_dma_speed(drive, it8213_ratemask(drive)); | 209 | u8 speed = ide_max_dma_mode(drive); |
226 | 210 | ||
227 | if (!speed) | 211 | if (!speed) |
228 | return 0; | 212 | return 0; |