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

Commit 5c9a7611 authored by Alan Cox's avatar Alan Cox Committed by Jeff Garzik
Browse files

[PATCH] pata_via: Cable detect error



The UDMA66 VIA hardware has no controller side cable detect bits we can
use. This patch minimally fixes the problem by reporting unknown in this
case and using drive side detection.

The old drivers/ide code does some additional tricks but those aren't
appropriate now we are in -rc.

Without this update UDMA66 via controllers run slowly. They don't fail so
it's a borderline call whether this is -rc material or not.

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 2bfc3611
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -161,10 +161,15 @@ static int via_pre_reset(struct ata_port *ap)
			return -ENOENT;
			return -ENOENT;
	}
	}


	if ((config->flags & VIA_UDMA) >= VIA_UDMA_66)
	if ((config->flags & VIA_UDMA) >= VIA_UDMA_100)
		ap->cbl = via_cable_detect(ap);
		ap->cbl = via_cable_detect(ap);
	else
	/* The UDMA66 series has no cable detect so do drive side detect */
	else if ((config->flags & VIA_UDMA) < VIA_UDMA_66)
		ap->cbl = ATA_CBL_PATA40;
		ap->cbl = ATA_CBL_PATA40;
	else
		ap->cbl = ATA_CBL_PATA_UNK;
		

	return ata_std_prereset(ap);
	return ata_std_prereset(ap);
}
}