aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/amd74xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/amd74xx.c')
-rw-r--r--drivers/ide/pci/amd74xx.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c
index 513205e52ad2..71d2c670e97e 100644
--- a/drivers/ide/pci/amd74xx.c
+++ b/drivers/ide/pci/amd74xx.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Version 2.22 2 * Version 2.23
3 * 3 *
4 * AMD 755/756/766/8111 and nVidia nForce/2/2s/3/3s/CK804/MCP04 4 * AMD 755/756/766/8111 and nVidia nForce/2/2s/3/3s/CK804/MCP04
5 * IDE driver for Linux. 5 * IDE driver for Linux.
@@ -240,8 +240,8 @@ static int amd_set_drive(ide_drive_t *drive, const u8 speed)
240 struct ide_timing t, p; 240 struct ide_timing t, p;
241 int T, UT; 241 int T, UT;
242 242
243 if (speed != XFER_PIO_SLOW) 243 if (ide_config_drive_speed(drive, speed))
244 ide_config_drive_speed(drive, speed); 244 return 1;
245 245
246 T = 1000000000 / amd_clock; 246 T = 1000000000 / amd_clock;
247 UT = (amd_config->udma_mask == ATA_UDMA2) ? T : (T / 2); 247 UT = (amd_config->udma_mask == ATA_UDMA2) ? T : (T / 2);
@@ -258,10 +258,6 @@ static int amd_set_drive(ide_drive_t *drive, const u8 speed)
258 258
259 amd_set_speed(HWIF(drive)->pci_dev, drive->dn, &t); 259 amd_set_speed(HWIF(drive)->pci_dev, drive->dn, &t);
260 260
261 if (!drive->init_speed)
262 drive->init_speed = speed;
263 drive->current_speed = speed;
264
265 return 0; 261 return 0;
266} 262}
267 263