public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [git patch] libata bug fix
@ 2010-02-25  3:49 Jeff Garzik
  2010-02-25  4:03 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2010-02-25  3:49 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: linux-ide, LKML


This is a fix that probably should have gone into 2.6.33.  It never
received an ack from the bug reporter, hence the delay,
but NVIDIA ok'd it anyway.  It merely disables an optimization.




Please pull from 'upstream-linus' branch of
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus

to receive the following updates:

 drivers/ata/ahci.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

Robert Hancock (1):
      ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index b343903..a6a736a 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -3082,8 +3082,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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [git patch] libata bug fix
  2010-02-25  3:49 [git patch] libata bug fix Jeff Garzik
@ 2010-02-25  4:03 ` Andrew Morton
  2010-02-25  4:07   ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2010-02-25  4:03 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linus Torvalds, linux-ide, LKML, stable

On Wed, 24 Feb 2010 22:49:37 -0500 Jeff Garzik <jeff@garzik.org> wrote:

> 
> This is a fix that probably should have gone into 2.6.33.

It still can if we cc stable@kernel.org?

>  It never
> received an ack from the bug reporter, hence the delay,
> but NVIDIA ok'd it anyway.  It merely disables an optimization.
> 
> 
> 
> 
> Please pull from 'upstream-linus' branch of
> master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git upstream-linus
> 
> to receive the following updates:
> 
>  drivers/ata/ahci.c |   12 ++++++++++--
>  1 files changed, 10 insertions(+), 2 deletions(-)
> 
> Robert Hancock (1):
>       ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI
> 
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index b343903..a6a736a 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -3082,8 +3082,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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [git patch] libata bug fix
  2010-02-25  4:03 ` Andrew Morton
@ 2010-02-25  4:07   ` Jeff Garzik
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2010-02-25  4:07 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linus Torvalds, linux-ide, LKML, stable

On 02/24/2010 11:03 PM, Andrew Morton wrote:
> On Wed, 24 Feb 2010 22:49:37 -0500 Jeff Garzik<jeff@garzik.org>  wrote:
>
>>
>> This is a fix that probably should have gone into 2.6.33.
>
> It still can if we cc stable@kernel.org?

The commit message includes the Cc as per standard.

	Jeff




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-02-25  4:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-25  3:49 [git patch] libata bug fix Jeff Garzik
2010-02-25  4:03 ` Andrew Morton
2010-02-25  4:07   ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox