aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/arm/icside.c3
-rw-r--r--drivers/ide/cris/ide-cris.c2
-rw-r--r--drivers/ide/mips/au1xxx-ide.c2
-rw-r--r--drivers/ide/pci/amd74xx.c2
-rw-r--r--drivers/ide/pci/via82cxxx.c2
-rw-r--r--drivers/ide/ppc/pmac.c10
6 files changed, 11 insertions, 10 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index 8a9b98fcb66..28f910b5aa5 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -255,8 +255,7 @@ static int icside_set_speed(ide_drive_t *drive, u8 xfer_mode)
/*
* Limit the transfer speed to MW_DMA_2.
*/
- if (xfer_mode > XFER_MW_DMA_2)
- xfer_mode = XFER_MW_DMA_2;
+ xfer_mode = ide_rate_filter(drive, xfer_mode);
switch (xfer_mode) {
case XFER_MW_DMA_2:
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c
index 04636f7eaae..e08782ac88e 100644
--- a/drivers/ide/cris/ide-cris.c
+++ b/drivers/ide/cris/ide-cris.c
@@ -726,6 +726,8 @@ static int speed_cris_ide(ide_drive_t *drive, u8 speed)
{
int cyc = 0, dvs = 0, strobe = 0, hold = 0;
+ speed = ide_rate_filter(drive, speed);
+
if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) {
tune_cris_ide(drive, speed - XFER_PIO_0);
return ide_config_drive_speed(drive, speed);
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index 2ba6a054b86..0d5e4c67fa5 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -180,6 +180,8 @@ static int auide_tune_chipset (ide_drive_t *drive, u8 speed)
int mem_sttime;
int mem_stcfg;
+ speed = ide_rate_filter(drive, speed);
+
mem_sttime = 0;
mem_stcfg = au_readl(MEM_STCFG2);
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c
index 06c15a6a3e7..3c0bb1e7951 100644
--- a/drivers/ide/pci/amd74xx.c
+++ b/drivers/ide/pci/amd74xx.c
@@ -240,6 +240,8 @@ static int amd_set_drive(ide_drive_t *drive, u8 speed)
struct ide_timing t, p;
int T, UT;
+ speed = ide_rate_filter(drive, speed);
+
if (speed != XFER_PIO_SLOW)
ide_config_drive_speed(drive, speed);
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index a7be7795e6a..ec9ad6e0e1f 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -165,6 +165,8 @@ static int via_set_drive(ide_drive_t *drive, u8 speed)
struct ide_timing t, p;
unsigned int T, UT;
+ speed = ide_rate_filter(drive, speed);
+
if (speed != XFER_PIO_SLOW)
ide_config_drive_speed(drive, speed);
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 2fb047b898a..222adcb5482 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -928,6 +928,8 @@ pmac_ide_tune_chipset (ide_drive_t *drive, byte speed)
pmac_ide_hwif_t* pmif = (pmac_ide_hwif_t *)HWIF(drive)->hwif_data;
u32 *timings, *timings2;
+ speed = ide_rate_filter(drive, speed);
+
if (pmif == NULL)
return 1;
@@ -937,17 +939,9 @@ pmac_ide_tune_chipset (ide_drive_t *drive, byte speed)
switch(speed) {
#ifdef CONFIG_BLK_DEV_IDEDMA_PMAC
case XFER_UDMA_6:
- if (pmif->kind != controller_sh_ata6)
- return 1;
case XFER_UDMA_5:
- if (pmif->kind != controller_un_ata6 &&
- pmif->kind != controller_k2_ata6 &&
- pmif->kind != controller_sh_ata6)
- return 1;
case XFER_UDMA_4:
case XFER_UDMA_3:
- if (drive->hwif->cbl != ATA_CBL_PATA80)
- return 1;
case XFER_UDMA_2:
case XFER_UDMA_1:
case XFER_UDMA_0: