]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[PATCH] pata_marvell: merge Mandriva patches
authorAlan <alan@lxorguk.ukuu.org.uk>
Mon, 27 Nov 2006 16:37:52 +0000 (16:37 +0000)
committerJeff Garzik <jeff@garzik.org>
Sat, 2 Dec 2006 03:47:03 +0000 (22:47 -0500)
Correct and complete the Marvell PATA cable detection logic.

From: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/pata_marvell.c

index a5953c389264e6ea9e952e8956652e73221caa85..25f7a79a8e251aa96d309f832baa2e6c47283b50 100644 (file)
@@ -57,11 +57,11 @@ static int marvell_pre_reset(struct ata_port *ap)
        switch(ap->port_no)
        {
        case 0:
-               /* Might be backward, docs unclear */
                if (inb(ap->ioaddr.bmdma_addr + 1) & 1)
-                       ap->cbl = ATA_CBL_PATA80;
-               else
                        ap->cbl = ATA_CBL_PATA40;
+               else
+                       ap->cbl = ATA_CBL_PATA80;
+               break;
 
        case 1: /* Legacy SATA port */
                ap->cbl = ATA_CBL_SATA;