From: Tejun Heo <tj@kernel.org>
To: Jeff Garzik <jeff@garzik.org>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
pchen@nvidia.com, kernel-bugzilla.20.drkshadow@spamgourmet.com
Subject: [PATCH #upstream-fixes 3/3] ahci: implement AHCI_HFLAG_NO_FPDMA_AA and update NV quirks
Date: Thu, 11 Mar 2010 11:40:15 +0900 [thread overview]
Message-ID: <4B98580F.8010908@kernel.org> (raw)
In-Reply-To: <4B9857EA.5090101@kernel.org>
It turns out different generations of MCPs have differing quirks.
* MCP 65-73 : FPDMA AA broken, lies about PMP support, forgets to report NCQ
* MCP 77-79 : FPDMA AA broken, lies about PMP support
* MCP 89 : FPDMA AA broken
Instead of turngin off FPDMA AA on all NVIDIAs, implement
HFLAG_NO_FPDMA_AA, define additional board IDs and apply necessary
quirks.
This fixes bko#15481 and the list of quirks is verified by Peer Chen.
http://bugzilla.kernel.org/show_bug.cgi?id=15481
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Peer Chen <pchen@nvidia.com>
---
drivers/ata/ahci.c | 39 +++++++++++++++++++++++++++++----------
1 file changed, 29 insertions(+), 10 deletions(-)
Index: ata/drivers/ata/ahci.c
===================================================================
--- ata.orig/drivers/ata/ahci.c
+++ ata/drivers/ata/ahci.c
@@ -239,6 +239,7 @@ enum {
AHCI_HFLAG_SRST_TOUT_IS_OFFLINE = (1 << 11), /* treat SRST timeout as
link offline */
AHCI_HFLAG_NO_SNTF = (1 << 12), /* no sntf */
+ AHCI_HFLAG_NO_FPDMA_AA = (1 << 13), /* no FPDMA AA */
/* ap->flags bits */
@@ -267,6 +268,8 @@ enum board_ids {
/* board IDs for specific chipsets in alphabetical order */
board_ahci_mcp65,
+ board_ahci_mcp77,
+ board_ahci_mcp89,
board_ahci_mv,
board_ahci_sb600,
board_ahci_sb700, /* for SB700 and SB800 */
@@ -276,9 +279,7 @@ enum board_ids {
board_ahci_mcp_linux = board_ahci_mcp65,
board_ahci_mcp67 = board_ahci_mcp65,
board_ahci_mcp73 = board_ahci_mcp65,
- board_ahci_mcp77 = board_ahci,
- board_ahci_mcp79 = board_ahci,
- board_ahci_mcp89 = board_ahci,
+ board_ahci_mcp79 = board_ahci_mcp77,
};
struct ahci_cmd_hdr {
@@ -500,7 +501,24 @@ static const struct ata_port_info ahci_p
/* by chipsets */
[board_ahci_mcp65] =
{
- AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ),
+ AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP |
+ AHCI_HFLAG_YES_NCQ),
+ .flags = AHCI_FLAG_COMMON,
+ .pio_mask = ATA_PIO4,
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &ahci_ops,
+ },
+ [board_ahci_mcp77] =
+ {
+ AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP),
+ .flags = AHCI_FLAG_COMMON,
+ .pio_mask = ATA_PIO4,
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &ahci_ops,
+ },
+ [board_ahci_mcp89] =
+ {
+ AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA),
.flags = AHCI_FLAG_COMMON,
.pio_mask = ATA_PIO4,
.udma_mask = ATA_UDMA6,
@@ -3287,12 +3305,13 @@ static int ahci_init_one(struct pci_dev
/* prepare host */
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)
+ /*
+ * Auto-activate optimization is supposed to be
+ * supported on all AHCI controllers indicating NCQ
+ * capability, but it seems to be broken on some
+ * chipsets including NVIDIAs.
+ */
+ if (!(hpriv->flags & AHCI_HFLAG_NO_FPDMA_AA))
pi.flags |= ATA_FLAG_FPDMA_AA;
}
next prev parent reply other threads:[~2010-03-11 2:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-11 2:37 [PATCH #upstream-fixes 1/3] ahci: add missing nv IDs Tejun Heo
2010-03-11 2:39 ` [PATCH #upstream-fixes 2/3] ahci: clean up board IDs Tejun Heo
2010-03-11 2:40 ` Tejun Heo [this message]
2010-03-12 0:08 ` [PATCH #upstream-fixes 3/3] ahci: implement AHCI_HFLAG_NO_FPDMA_AA and update NV quirks Robert Hancock
2010-03-12 1:16 ` Tejun Heo
2010-03-17 17:44 ` [PATCH #upstream-fixes 2/3] ahci: clean up board IDs Jeff Garzik
2010-03-17 22:58 ` Tejun Heo
2010-03-17 23:04 ` Jeff Garzik
2010-03-18 0:02 ` Tejun Heo
2010-03-17 17:47 ` [PATCH #upstream-fixes 1/3] ahci: add missing nv IDs 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=4B98580F.8010908@kernel.org \
--to=tj@kernel.org \
--cc=jeff@garzik.org \
--cc=kernel-bugzilla.20.drkshadow@spamgourmet.com \
--cc=linux-ide@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).