diff options
Diffstat (limited to 'drivers/ide/pci/atiixp.c')
-rw-r--r-- | drivers/ide/pci/atiixp.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 2d48af32e3f4..f7e80d6076d7 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -49,22 +49,6 @@ static int save_mdma_mode[4]; | |||
49 | static DEFINE_SPINLOCK(atiixp_lock); | 49 | static DEFINE_SPINLOCK(atiixp_lock); |
50 | 50 | ||
51 | /** | 51 | /** |
52 | * atiixp_ratemask - compute rate mask for ATIIXP IDE | ||
53 | * @drive: IDE drive to compute for | ||
54 | * | ||
55 | * Returns the available modes for the ATIIXP IDE controller. | ||
56 | */ | ||
57 | |||
58 | static u8 atiixp_ratemask(ide_drive_t *drive) | ||
59 | { | ||
60 | u8 mode = 3; | ||
61 | |||
62 | if (!eighty_ninty_three(drive)) | ||
63 | mode = min(mode, (u8)1); | ||
64 | return mode; | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * atiixp_dma_2_pio - return the PIO mode matching DMA | 52 | * atiixp_dma_2_pio - return the PIO mode matching DMA |
69 | * @xfer_rate: transfer speed | 53 | * @xfer_rate: transfer speed |
70 | * | 54 | * |
@@ -189,7 +173,7 @@ static int atiixp_speedproc(ide_drive_t *drive, u8 xferspeed) | |||
189 | u16 tmp16; | 173 | u16 tmp16; |
190 | u8 speed, pio; | 174 | u8 speed, pio; |
191 | 175 | ||
192 | speed = ide_rate_filter(atiixp_ratemask(drive), xferspeed); | 176 | speed = ide_rate_filter(drive, xferspeed); |
193 | 177 | ||
194 | spin_lock_irqsave(&atiixp_lock, flags); | 178 | spin_lock_irqsave(&atiixp_lock, flags); |
195 | 179 | ||
@@ -233,7 +217,7 @@ static int atiixp_speedproc(ide_drive_t *drive, u8 xferspeed) | |||
233 | 217 | ||
234 | static int atiixp_config_drive_for_dma(ide_drive_t *drive) | 218 | static int atiixp_config_drive_for_dma(ide_drive_t *drive) |
235 | { | 219 | { |
236 | u8 speed = ide_dma_speed(drive, atiixp_ratemask(drive)); | 220 | u8 speed = ide_max_dma_mode(drive); |
237 | 221 | ||
238 | if (!speed) | 222 | if (!speed) |
239 | return 0; | 223 | return 0; |