Commit 099156db authored by Alan's avatar Alan Committed by Jeff Garzik

[PATCH] pata_marvell: merge Mandriva patches

Correct and complete the Marvell PATA cable detection logic.

From: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: default avatarArnaud Patard <apatard@mandriva.com>
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent aff0df05
...@@ -57,11 +57,11 @@ static int marvell_pre_reset(struct ata_port *ap) ...@@ -57,11 +57,11 @@ static int marvell_pre_reset(struct ata_port *ap)
switch(ap->port_no) switch(ap->port_no)
{ {
case 0: case 0:
/* Might be backward, docs unclear */
if (inb(ap->ioaddr.bmdma_addr + 1) & 1) if (inb(ap->ioaddr.bmdma_addr + 1) & 1)
ap->cbl = ATA_CBL_PATA80;
else
ap->cbl = ATA_CBL_PATA40; ap->cbl = ATA_CBL_PATA40;
else
ap->cbl = ATA_CBL_PATA80;
break;
case 1: /* Legacy SATA port */ case 1: /* Legacy SATA port */
ap->cbl = ATA_CBL_SATA; ap->cbl = ATA_CBL_SATA;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment