icside_set_speed() happily accepts unsupported transfer modes which results in drive->drive_data being set to the maximum value (480) and drive->current_speed being set to the unsupported transfer mode. Fix it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx> Cc: Russell King <rmk@xxxxxxxxxxxxxxxx> --- drivers/ide/arm/icside.c | 2 ++ 1 file changed, 2 insertions(+) Index: b/drivers/ide/arm/icside.c =================================================================== --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c @@ -272,6 +272,8 @@ static int icside_set_speed(ide_drive_t case XFER_SW_DMA_0: cycle_time = 480; break; + default: + return 1; } /* - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html