From patchwork Wed Jan 27 04:33:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hancock X-Patchwork-Id: 43768 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E8BE4B7D88 for ; Wed, 27 Jan 2010 15:33:44 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751953Ab0A0Edk (ORCPT ); Tue, 26 Jan 2010 23:33:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753539Ab0A0Edk (ORCPT ); Tue, 26 Jan 2010 23:33:40 -0500 Received: from mail-iw0-f186.google.com ([209.85.223.186]:52985 "EHLO mail-iw0-f186.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751953Ab0A0Edj (ORCPT ); Tue, 26 Jan 2010 23:33:39 -0500 Received: by iwn16 with SMTP id 16so750865iwn.5 for ; Tue, 26 Jan 2010 20:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=YRVLuCKB7QcwtvpwQFlQH9obBgHJKfmB41yQuA8nwz0=; b=dkfmj6zPLlH/n2MaoTtCJ0yh2Ve06lXjzkZy5FdClUNbLgqKraoTTctRnz8q8xc2Zm uXDFEm3Ydn1EiEdWEugNmMS4LQhKYjMH/BShiI4B2fwe311C/lrRs2C9v9OsfIp3uuZz UAXpyXzAKiZbrKN/NtdYgywNDMYitlMQUSZtU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=h9Jg92BmRpkmooWF18Mu/iP4EIw+kGakQ4SMQMwceSyAjaBkbo3mHxEvRzh7i7nEHJ jtDQ9EOsk1V/tWUs3FjcU99qiprWpJR8iLyJKmpFJABHyWA31XRdbEp/c6UW4kMhT1Xh STNP3SGKAWsyMsBjrdDCS6d0w0XvWIXLp5m8U= Received: by 10.231.144.201 with SMTP id a9mr2806581ibv.69.1264566816933; Tue, 26 Jan 2010 20:33:36 -0800 (PST) Received: from ?192.168.1.148? (S0106000c41bb86e1.ss.shawcable.net [70.76.40.110]) by mx.google.com with ESMTPS id 21sm6489858iwn.10.2010.01.26.20.33.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 26 Jan 2010 20:33:36 -0800 (PST) Message-ID: <4B5FC213.1060601@gmail.com> Date: Tue, 26 Jan 2010 22:33:23 -0600 From: Robert Hancock User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1 MIME-Version: 1.0 To: linux-kernel , ide , Jeff Garzik CC: Mike Cui , Peer Chen Subject: [PATCH] ahci: disable FPDMA auto-activate optimization on NVIDIA AHCI Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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 --- Mike, can you test this out and make sure this resolves the problem for you? -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;