Skip to contentSkip to conversation

ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI

PATCH Applied Robert Hancock 3 participants 9 messages Jan 27, 2010 – Feb 25, 2010 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI

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

---

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

drivers/ata/ahci.c +10 -2
index b8bea10..47e57dc 100644
@@ -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;
#1 lore raw

Hi Mike, have you had a chance to try out this patch yet?

Quoted 40 lines · Robert Hancock

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

---

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

drivers/ata/ahci.c +10 -2
index b8bea10..47e57dc 100644
@@ -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;
#2 lore raw
In reply to Robert Hancock
Quoted 8 lines · Robert Hancock

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.

Quoted 7 lines

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

---

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

Sigh... we never did hear back from Mike or NVIDIA on this one, did we? I've been watching for a response, and haven't seen one to date.

Jeff

#3 lore raw
Quoted 18 lines · Jeff Garzik
Quoted 17 lines · Robert Hancock

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

Quoted 7 lines
Quoted 4 lines

---

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

Sigh...   we never did hear back from Mike or NVIDIA on this one, did we? I've been watching for a response, and haven't seen one to date.

No, I haven't seen a response. It's pretty apparent it should fix the problem based on earlier testing, but it would be nice to find out for sure which chipsets this affects.

#4 lore raw
Quoted 24 lines · Robert Hancock
Quoted 23 lines · Jeff Garzik
Quoted 21 lines · Robert Hancock

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

---

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

Quoted 6 lines
Quoted 2 lines

Sigh... we never did hear back from Mike or NVIDIA on this one, did we?
I've been watching for a response, and haven't seen one to date.

No, I haven't seen a response. It's pretty apparent it should fix the problem based on earlier testing, but it would be nice to find out for sure which chipsets this affects.

Yep, that's my main concern... being overly aggressive and zapping it on all NVIDIA chipsets, even future ones.

Jeff

#5 lore raw
Quoted 6 lines · Jeff Garzik
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines

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

Sigh...   we never did hear back from Mike or NVIDIA on this one, did we? I've been watching for a response, and haven't seen one to date.

Quoted 6 lines
Quoted 3 lines

No, I haven't seen a response. It's pretty apparent it should fix the problem based on earlier testing, but it would be nice to find out for sure which chipsets this affects.

Yep, that's my main concern...  being overly aggressive and zapping it on all NVIDIA chipsets, even future ones.

I'm thinking if we don't hear any more specifics on the problem from NVIDIA or someone otherwise knowledgeable Real Soon Now we should likely just merge this patch. MCP79 is a fairly new chipset and it's likely a good assumption that the older NVIDIA AHCI chipsets would have the same issue. It's possible that some of the newer chipsets do or will fix the problem, but we can address that at a later date - the auto-activate optimization is pretty minor and not worth breaking things if there's doubt of it working on these controllers..

#6 lore raw
In reply to Robert Hancock

We are currently investigating this MCP79 issue when FPDMA auto activate feature is enabled. Meanwhile, this patch looks good to me.

--Prajakta Gudadhe

Quoted 40 lines · Robert Hancock

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

---

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

drivers/ata/ahci.c +10 -3
index b8bea10..47e57dc 100644
@@ -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;
--
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

#7 lore raw

Jeff, ping? Without further input from NVIDIA, I think we may want to get this in for 2.6.33.

Quoted 59 lines · Prajakta Gudadhe

We are currently investigating this MCP79 issue when FPDMA auto activate feature is enabled. Meanwhile, this patch looks good to me.

--Prajakta Gudadhe

Quoted 40 lines · Robert Hancock

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

---

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

drivers/ata/ahci.c +10 -3
index b8bea10..47e57dc 100644
@@ -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;
--
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain confidential information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

Applied
#8 lore raw
In reply to Robert Hancock
Quoted 8 lines · Robert Hancock

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.

Quoted 7 lines

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

---

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

applied