Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65c9cd23 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: remove ide_use_fast_pio()



Remove ide_use_fast_pio() and just re-tune PIO unconditionally if DMA tuning
has failed in ->ide_dma_check.  All host drivers using ide_use_fast_pio() set
drive->autotune so PIO is always tuned anyway and in some cases we _really_
need to re-tune PIO because PIO and DMA timings are shared.

Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent d3b90baf
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -96,21 +96,6 @@ static u8 ide_rate_filter(ide_drive_t *drive, u8 speed)
	return min(speed, mode);
}

int ide_use_fast_pio(ide_drive_t *drive)
{
	struct hd_driveid *id = drive->id;

	if ((id->capability & 1) && drive->autodma)
		return 1;

	if ((id->capability & 8) || (id->field_valid & 2))
		return 1;

	return 0;
}

EXPORT_SYMBOL_GPL(ide_use_fast_pio);

/*
 * Standard (generic) timings for PIO modes, from ATA2 specification.
 * These timings are for access to the IDE data port register *only*.
+1 −2
Original line number Diff line number Diff line
@@ -146,7 +146,6 @@ static int aec62xx_config_drive_xfer_rate (ide_drive_t *drive)
	if (ide_tune_dma(drive))
		return 0;

	if (ide_use_fast_pio(drive))
	ide_set_max_pio(drive);

	return -1;
+1 −2
Original line number Diff line number Diff line
@@ -171,7 +171,6 @@ static int atiixp_dma_check(ide_drive_t *drive)
	if (ide_tune_dma(drive))
		return 0;

	if (ide_use_fast_pio(drive))
	ide_set_max_pio(drive);

	return -1;
+1 −2
Original line number Diff line number Diff line
@@ -335,7 +335,6 @@ static int cmd64x_config_drive_for_dma (ide_drive_t *drive)
	if (ide_tune_dma(drive))
		return 0;

	if (ide_use_fast_pio(drive))
	ide_set_max_pio(drive);

	return -1;
+1 −2
Original line number Diff line number Diff line
@@ -162,7 +162,6 @@ static int cs5535_dma_check(ide_drive_t *drive)
	if (ide_tune_dma(drive))
		return 0;

	if (ide_use_fast_pio(drive))
	ide_set_max_pio(drive);

	return -1;
Loading