[PATCH] pata_marvell: fix cable detection - take 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Last time I looked at the cable detection code, I fixed the "always
detect cable as sata cable" case, but this is not enough. I didn't
notice that the 80-pin cable was seen as a 40-pin cable.
The appended patch fixes that.

Signed-off-by: Arnaud Patard <apatard@xxxxxxxxxxxx>
---
Index: libata-dev/drivers/ata/pata_marvell.c
===================================================================
--- libata-dev.orig/drivers/ata/pata_marvell.c
+++ libata-dev/drivers/ata/pata_marvell.c
@@ -57,11 +57,10 @@ static int marvell_pre_reset(struct ata_
 	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 */

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux