Commit 2367ad63 authored by Reimar Döffinger's avatar Reimar Döffinger Committed by Damien Le Moal
Browse files

pata_amd: fix checking of DMA state



Checking if DMA is enabled should be done via the
ata_dma_enabled helper function, since the init state
0xff indicates disabled.
Change based on code review, not tested due to lack of hardware.

Signed-off-by: default avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
parent 47b32049
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -66,7 +66,7 @@ static void timing_setup(struct ata_port *ap, struct ata_device *adev, int offse

	if (peer) {
		/* This may be over conservative */
		if (peer->dma_mode) {
		if (ata_dma_enabled(peer)) {
			ata_timing_compute(peer, peer->dma_mode, &apeer, T, UT);
			ata_timing_merge(&apeer, &at, &at, ATA_TIMING_8BIT);
		}