From: Bartlomiej Zolnierkiewicz Date: Tue, 16 Oct 2007 20:29:54 +0000 (+0200) Subject: ide: remove drive->init_speed zeroing X-Git-Tag: v2.6.24-rc1~822^2~19 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3b90baf0924c13045c56c3d0a766f9374fe7a9e;p=linux-2.6 ide: remove drive->init_speed zeroing Several host drivers used to reset drive->init_speed in their ->ide_dma_check implementations which resulted in incorrect init speed being reported to the user, fix it. Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 0b83443bf2..9582794eb6 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -446,8 +446,6 @@ static void ali_set_dma_mode(ide_drive_t *drive, const u8 speed) static int ali15x3_config_drive_for_dma(ide_drive_t *drive) { - drive->init_speed = 0; - if (ide_tune_dma(drive)) return 0; diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index 14a61b1c80..644f4aea79 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c @@ -168,8 +168,6 @@ static void atiixp_set_dma_mode(ide_drive_t *drive, const u8 speed) static int atiixp_dma_check(ide_drive_t *drive) { - drive->init_speed = 0; - if (ide_tune_dma(drive)) return 0; diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index 257865778f..896cc9211b 100644 --- a/drivers/ide/pci/cs5535.c +++ b/drivers/ide/pci/cs5535.c @@ -159,8 +159,6 @@ static void cs5535_set_pio_mode(ide_drive_t *drive, const u8 pio) static int cs5535_dma_check(ide_drive_t *drive) { - drive->init_speed = 0; - if (ide_tune_dma(drive)) return 0; diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c index 218852aaf2..bccf0667a7 100644 --- a/drivers/ide/pci/hpt34x.c +++ b/drivers/ide/pci/hpt34x.c @@ -82,8 +82,6 @@ static void hpt34x_set_pio_mode(ide_drive_t *drive, const u8 pio) static int hpt34x_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed = 0; - if (ide_tune_dma(drive)) return -1; diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 1433fc6954..a8097b5476 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c @@ -715,8 +715,6 @@ static void hpt3xx_maskproc(ide_drive_t *drive, int mask) static int hpt366_config_drive_xfer_rate(ide_drive_t *drive) { - drive->init_speed = 0; - if (ide_tune_dma(drive)) return 0; diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index ad0bdcb0c0..c3a751207e 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c @@ -225,8 +225,6 @@ static u8 pdcnew_cable_detect(ide_hwif_t *hwif) static int pdcnew_config_drive_xfer_rate(ide_drive_t *drive) { - drive->init_speed = 0; - if (ide_tune_dma(drive)) return 0; diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index 8c3e8cf36e..9847a4ff7d 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c @@ -181,8 +181,6 @@ static void pdc_old_disable_66MHz_clock(ide_hwif_t *hwif) static int pdc202xx_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed = 0; - if (ide_tune_dma(drive)) return 0; diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c index 4b397d6418..4dd1b6d0ac 100644 --- a/drivers/ide/pci/piix.c +++ b/drivers/ide/pci/piix.c @@ -264,8 +264,6 @@ static void piix_set_dma_mode(ide_drive_t *drive, const u8 speed) static int piix_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed = 0; - if (ide_tune_dma(drive)) return 0; diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 40b0383675..b7076f4569 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c @@ -198,8 +198,6 @@ static void svwks_set_dma_mode(ide_drive_t *drive, const u8 speed) static int svwks_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed = 0; - if (ide_tune_dma(drive)) return 0; diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index d33abb9f64..99fe0b6827 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c @@ -603,8 +603,6 @@ static void sis_set_dma_mode(ide_drive_t *drive, const u8 speed) static int sis5513_config_xfer_rate(ide_drive_t *drive) { - drive->init_speed = 0; - if (ide_tune_dma(drive)) return 0; diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c index 772b58671b..38da0659ec 100644 --- a/drivers/ide/pci/slc90e66.c +++ b/drivers/ide/pci/slc90e66.c @@ -132,8 +132,6 @@ static void slc90e66_set_dma_mode(ide_drive_t *drive, const u8 speed) static int slc90e66_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed = 0; - if (ide_tune_dma(drive)) return 0;