aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-03-29 21:28:32 -0400
committerJeff Garzik <jgarzik@redhat.com>2010-05-14 17:08:02 -0400
commit83f2b9630c5875ee872c11d98a0e26888514c1b3 (patch)
tree434dedfdcca76d8fdb7cdb919ac1d149b349e90c /drivers/ata/ahci.c
parentec569af8584e977a3474c197da53ae2ba5823caf (diff)
ahci: implement AHCI_HFLAG_NO_FPDMA_AA and update NV quirks
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> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r--drivers/ata/ahci.c38
1 files changed, 28 insertions, 10 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index ec1221879f9..c44d11237db 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -63,6 +63,8 @@ enum board_ids {
63 63
64 /* board IDs for specific chipsets in alphabetical order */ 64 /* board IDs for specific chipsets in alphabetical order */
65 board_ahci_mcp65, 65 board_ahci_mcp65,
66 board_ahci_mcp77,
67 board_ahci_mcp89,
66 board_ahci_mv, 68 board_ahci_mv,
67 board_ahci_sb600, 69 board_ahci_sb600,
68 board_ahci_sb700, /* for SB700 and SB800 */ 70 board_ahci_sb700, /* for SB700 and SB800 */
@@ -72,9 +74,7 @@ enum board_ids {
72 board_ahci_mcp_linux = board_ahci_mcp65, 74 board_ahci_mcp_linux = board_ahci_mcp65,
73 board_ahci_mcp67 = board_ahci_mcp65, 75 board_ahci_mcp67 = board_ahci_mcp65,
74 board_ahci_mcp73 = board_ahci_mcp65, 76 board_ahci_mcp73 = board_ahci_mcp65,
75 board_ahci_mcp77 = board_ahci, 77 board_ahci_mcp79 = board_ahci_mcp77,
76 board_ahci_mcp79 = board_ahci,
77 board_ahci_mcp89 = board_ahci,
78}; 78};
79 79
80static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); 80static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -135,7 +135,24 @@ static const struct ata_port_info ahci_port_info[] = {
135 /* by chipsets */ 135 /* by chipsets */
136 [board_ahci_mcp65] = 136 [board_ahci_mcp65] =
137 { 137 {
138 AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ), 138 AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP |
139 AHCI_HFLAG_YES_NCQ),
140 .flags = AHCI_FLAG_COMMON,
141 .pio_mask = ATA_PIO4,
142 .udma_mask = ATA_UDMA6,
143 .port_ops = &ahci_ops,
144 },
145 [board_ahci_mcp77] =
146 {
147 AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP),
148 .flags = AHCI_FLAG_COMMON,
149 .pio_mask = ATA_PIO4,
150 .udma_mask = ATA_UDMA6,
151 .port_ops = &ahci_ops,
152 },
153 [board_ahci_mcp89] =
154 {
155 AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA),
139 .flags = AHCI_FLAG_COMMON, 156 .flags = AHCI_FLAG_COMMON,
140 .pio_mask = ATA_PIO4, 157 .pio_mask = ATA_PIO4,
141 .udma_mask = ATA_UDMA6, 158 .udma_mask = ATA_UDMA6,
@@ -1103,12 +1120,13 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1103 /* prepare host */ 1120 /* prepare host */
1104 if (hpriv->cap & HOST_CAP_NCQ) { 1121 if (hpriv->cap & HOST_CAP_NCQ) {
1105 pi.flags |= ATA_FLAG_NCQ; 1122 pi.flags |= ATA_FLAG_NCQ;
1106 /* Auto-activate optimization is supposed to be supported on 1123 /*
1107 all AHCI controllers indicating NCQ support, but it seems 1124 * Auto-activate optimization is supposed to be
1108 to be broken at least on some NVIDIA MCP79 chipsets. 1125 * supported on all AHCI controllers indicating NCQ
1109 Until we get info on which NVIDIA chipsets don't have this 1126 * capability, but it seems to be broken on some
1110 issue, if any, disable AA on all NVIDIA AHCIs. */ 1127 * chipsets including NVIDIAs.
1111 if (pdev->vendor != PCI_VENDOR_ID_NVIDIA) 1128 */
1129 if (!(hpriv->flags & AHCI_HFLAG_NO_FPDMA_AA))
1112 pi.flags |= ATA_FLAG_FPDMA_AA; 1130 pi.flags |= ATA_FLAG_FPDMA_AA;
1113 } 1131 }
1114 1132