ide: remove drive->init_speed zeroing
PATCH 5/11 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 <[email protected]>
--- drivers/ide/pci/alim15x3.c | 2 -- drivers/ide/pci/atiixp.c | 2 -- drivers/ide/pci/cs5535.c | 2 -- drivers/ide/pci/hpt34x.c | 2 -- drivers/ide/pci/hpt366.c | 2 -- drivers/ide/pci/pdc202xx_new.c | 2 -- drivers/ide/pci/pdc202xx_old.c | 2 -- drivers/ide/pci/piix.c | 2 -- drivers/ide/pci/serverworks.c | 2 -- drivers/ide/pci/sis5513.c | 2 -- drivers/ide/pci/slc90e66.c | 2 -- 11 files changed, 22 deletions(-)
drivers/ide/pci/alim15x3.c +0 -2
@@ -446,8 +446,6 @@ static void ali_set_dma_mode(ide_drive_tstatic int ali15x3_config_drive_for_dma (ide_drive_t *drive) { - drive->init_speed =0 ; -if (ide_tune_dma (drive))return 0 ;
drivers/ide/pci/atiixp.c +0 -2
@@ -168,8 +168,6 @@ static void atiixp_set_dma_mode(ide_drivstatic int atiixp_dma_check (ide_drive_t *drive) { - drive->init_speed =0 ; -if (ide_tune_dma (drive))return 0 ;
drivers/ide/pci/cs5535.c +0 -2
@@ -159,8 +159,6 @@ static void cs5535_set_pio_mode(ide_drivstatic int cs5535_dma_check (ide_drive_t *drive) { - drive->init_speed =0 ; -if (ide_tune_dma (drive))return 0 ;
drivers/ide/pci/hpt34x.c +0 -2
@@ -82,8 +82,6 @@ static void hpt34x_set_pio_mode(ide_drivstatic int hpt34x_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed =0 ; -if (ide_tune_dma (drive))return -1 ;
drivers/ide/pci/hpt366.c +0 -2
@@ -693,8 +693,6 @@ static void hpt3xx_maskproc(ide_drive_tstatic int hpt366_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed =0 ; -if (ide_tune_dma (drive))return 0 ;
drivers/ide/pci/pdc202xx_new.c +0 -2
@@ -225,8 +225,6 @@ static u8 pdcnew_cable_detect(ide_hwif_tstatic int pdcnew_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed =0 ; -if (ide_tune_dma (drive))return 0 ;
drivers/ide/pci/pdc202xx_old.c +0 -2
@@ -181,8 +181,6 @@ static void pdc_old_disable_66MHz_clock(static int pdc202xx_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed =0 ; -if (ide_tune_dma (drive))return 0 ;
drivers/ide/pci/piix.c +0 -2
@@ -264,8 +264,6 @@ static void piix_set_dma_mode(ide_drive_static int piix_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed =0 ; -if (ide_tune_dma (drive))return 0 ;
drivers/ide/pci/serverworks.c +0 -2
@@ -197,8 +197,6 @@ static void svwks_set_dma_mode(ide_drivestatic int svwks_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed =0 ; -if (ide_tune_dma (drive))return 0 ;
drivers/ide/pci/sis5513.c +0 -2
@@ -603,8 +603,6 @@ static void sis_set_dma_mode(ide_drive_tstatic int sis5513_config_xfer_rate (ide_drive_t *drive) { - drive->init_speed =0 ; -if (ide_tune_dma (drive))return 0 ;
drivers/ide/pci/slc90e66.c +0 -2
@@ -132,8 +132,6 @@ static void slc90e66_set_dma_mode(ide_drstatic int slc90e66_config_drive_xfer_rate (ide_drive_t *drive) { - drive->init_speed =0 ; -if (ide_tune_dma (drive))return 0 ;
Hello.
Quoted 3 lines · Bartlomiej Zolnierkiewicz
Several host drivers used to reset
drive->init_speedin their ->ide_dma_check implementations which resulted in incorrect init speed being reported to the user, fix it.
What do you mean by incorrect? Weren't they doing that intentionally to
report DMA mode instead of PIO? Won't PIO mode be always reported now since all drivers are being moved to always autotuning PIO?
Quoted 1 line
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
WBR, Sergei