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

Commit 71ef51cc authored by Jens Axboe's avatar Jens Axboe
Browse files

[PATCH] it821x: fix ide dma setup bug



Only enable dma for a valid speed setting.

Signed-off-by: default avatarJens Axboe <axboe@suse.de>
parent 0a8348d0
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -498,11 +498,16 @@ static int config_chipset_for_dma (ide_drive_t *drive)
{
	u8 speed	= ide_dma_speed(drive, it821x_ratemask(drive));

	config_it821x_chipset_for_pio(drive, !speed);
	if (speed) {
		config_it821x_chipset_for_pio(drive, 0);
		it821x_tune_chipset(drive, speed);

		return ide_dma_enable(drive);
	}

	return 0;
}

/**
 *	it821x_configure_drive_for_dma	-	set up for DMA transfers
 *	@drive: drive we are going to set up