linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaud Patard <apatard@mandriva.com>
To: linux-ide@vger.kernel.org
Cc: alan@redhat.com
Subject: [PATCH] pata_marvell: fix cable detection - take 2
Date: Mon, 20 Nov 2006 21:20:44 +0100	[thread overview]
Message-ID: <m3psbhdg4j.fsf@anduin.mandriva.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]


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@mandriva.com>
---

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pata_marvell_fix_cable_detection_take2.patch --]
[-- Type: text/x-patch, Size: 534 bytes --]

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 */

             reply	other threads:[~2006-11-20 20:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-20 20:20 Arnaud Patard [this message]
2006-11-20 20:42 ` [PATCH] pata_marvell: fix cable detection - take 2 Alan Cox
2006-11-21 10:28   ` Arnaud Patard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3psbhdg4j.fsf@anduin.mandriva.com \
    --to=apatard@mandriva.com \
    --cc=alan@redhat.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).