diff options
Diffstat (limited to 'drivers/ide/pci/atiixp.c')
-rw-r--r-- | drivers/ide/pci/atiixp.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 679eb92b8920..e05e88298500 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -163,23 +163,21 @@ static void atiixp_tuneproc(ide_drive_t *drive, u8 pio) | |||
163 | /** | 163 | /** |
164 | * atiixp_tune_chipset - tune a ATIIXP interface | 164 | * atiixp_tune_chipset - tune a ATIIXP interface |
165 | * @drive: IDE drive to tune | 165 | * @drive: IDE drive to tune |
166 | * @xferspeed: speed to configure | 166 | * @speed: speed to configure |
167 | * | 167 | * |
168 | * Set a ATIIXP interface channel to the desired speeds. This involves | 168 | * Set a ATIIXP interface channel to the desired speeds. This involves |
169 | * requires the right timing data into the ATIIXP configuration space | 169 | * requires the right timing data into the ATIIXP configuration space |
170 | * then setting the drive parameters appropriately | 170 | * then setting the drive parameters appropriately |
171 | */ | 171 | */ |
172 | 172 | ||
173 | static int atiixp_speedproc(ide_drive_t *drive, u8 xferspeed) | 173 | static int atiixp_speedproc(ide_drive_t *drive, const u8 speed) |
174 | { | 174 | { |
175 | struct pci_dev *dev = drive->hwif->pci_dev; | 175 | struct pci_dev *dev = drive->hwif->pci_dev; |
176 | unsigned long flags; | 176 | unsigned long flags; |
177 | int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8; | 177 | int timing_shift = (drive->dn & 2) ? 16 : 0 + (drive->dn & 1) ? 0 : 8; |
178 | u32 tmp32; | 178 | u32 tmp32; |
179 | u16 tmp16; | 179 | u16 tmp16; |
180 | u8 speed, pio; | 180 | u8 pio; |
181 | |||
182 | speed = ide_rate_filter(drive, xferspeed); | ||
183 | 181 | ||
184 | if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) { | 182 | if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) { |
185 | atiixp_tune_pio(drive, speed - XFER_PIO_0); | 183 | atiixp_tune_pio(drive, speed - XFER_PIO_0); |