diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-13 17:47:51 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-13 17:47:51 +0200 |
commit | 3b4024d4297279ef85631f3c19a6fa4312b4c401 (patch) | |
tree | 7a48b1f88300dc8034e42cf36f1207da3c6ce911 /drivers/ide/pci/via82cxxx.c | |
parent | 0f458943e0247906b7a3f534f9e9e7ff3d901296 (diff) | |
download | linux-3b4024d4297279ef85631f3c19a6fa4312b4c401.tar.bz2 |
amd74xx/via82cxxx: check ide_config_drive_speed() return value
* Check ide_config_drive_speed() return value.
* While at also call ide_config_drive_speed() if the transfer mode is
XFER_PIO_SLOW (this case happens iff the transfer mode has already been
set on the device by ide-proc.c::set_xfer_rate()) and remove redundant
setting of ->{init,current}_speed.
* Bump driver version.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/via82cxxx.c')
-rw-r--r-- | drivers/ide/pci/via82cxxx.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 378feb491ec4..ac094e51d2bf 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c @@ -1,6 +1,6 @@ /* * - * Version 3.48 + * Version 3.49 * * VIA IDE driver for Linux. Supported southbridges: * @@ -165,8 +165,8 @@ static int via_set_drive(ide_drive_t *drive, const u8 speed) struct ide_timing t, p; unsigned int T, UT; - if (speed != XFER_PIO_SLOW) - ide_config_drive_speed(drive, speed); + if (ide_config_drive_speed(drive, speed)) + return 1; T = 1000000000 / via_clock; @@ -187,10 +187,6 @@ static int via_set_drive(ide_drive_t *drive, const u8 speed) via_set_speed(HWIF(drive), drive->dn, &t); - if (!drive->init_speed) - drive->init_speed = speed; - drive->current_speed = speed; - return 0; } |