linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>,
	ide <linux-ide@vger.kernel.org>, Jeff Garzik <jeff@garzik.org>
Cc: Mike Cui <cuicui@gmail.com>, Peer Chen <pchen@nvidia.com>
Subject: [PATCH] ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI
Date: Tue, 26 Jan 2010 22:33:23 -0600	[thread overview]
Message-ID: <4B5FC213.1060601@gmail.com> (raw)

Mike Cui reported that his system with an NVIDIA MCP79 (aka MCP7A) chipset
stopped working with 2.6.32. The problem appears to be that 2.6.32 now enables
the FPDMA auto-activate optimization in the ahci driver. The drive works fine
with this enabled on an Intel AHCI so this appears to be a chipset bug.
Since MCP79 is a fairly recent NVIDIA chipset and we don't have any info on
whether any other NVIDIA chipsets have this issue, disable FPDMA AA optimization
on all NVIDIA AHCI controllers for now.

Should address http://bugzilla.kernel.org/show_bug.cgi?id=14922

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>

---

Mike, can you test this out and make sure this resolves the problem for you?

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index b8bea10..47e57dc 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -3067,8 +3067,16 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	ahci_save_initial_config(pdev, hpriv);
 
 	/* prepare host */
-	if (hpriv->cap & HOST_CAP_NCQ)
-		pi.flags |= ATA_FLAG_NCQ | ATA_FLAG_FPDMA_AA;
+	if (hpriv->cap & HOST_CAP_NCQ) {
+		pi.flags |= ATA_FLAG_NCQ;
+		/* Auto-activate optimization is supposed to be supported on
+		   all AHCI controllers indicating NCQ support, but it seems
+		   to be broken at least on some NVIDIA MCP79 chipsets.
+		   Until we get info on which NVIDIA chipsets don't have this
+		   issue, if any, disable AA on all NVIDIA AHCIs. */
+		if (pdev->vendor != PCI_VENDOR_ID_NVIDIA)
+			pi.flags |= ATA_FLAG_FPDMA_AA;
+	}
 
 	if (hpriv->cap & HOST_CAP_PMP)
 		pi.flags |= ATA_FLAG_PMP;

             reply	other threads:[~2010-01-27  4:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27  4:33 Robert Hancock [this message]
2010-01-31 17:10 ` [PATCH] ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI Robert Hancock
2010-02-13 22:46 ` Jeff Garzik
2010-02-13 22:53   ` Robert Hancock
2010-02-13 23:02     ` Jeff Garzik
2010-02-15 18:34       ` Robert Hancock
2010-02-16 22:46 ` Prajakta Gudadhe
2010-02-24  0:39   ` Robert Hancock
2010-02-25  3:45 ` Jeff Garzik

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=4B5FC213.1060601@gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=cuicui@gmail.com \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pchen@nvidia.com \
    /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).