]>
Commit | Line | Data |
---|---|---|
82094b55 AF |
1 | From: Tejun Heo <teheo@suse.de> |
2 | Subject: ahci: disable NCQ on Aspire 3810t | |
3 | References: bnc#522790 | |
4 | ||
5 | Aspire 3810t issues SATA feature enable commands via _GTF without | |
6 | coordinating with the host controller side leading to NCQ command | |
7 | failures. Proper fix is to filter those _GTF commands but the | |
8 | necessary change is too pervasive. Disable NCQ on Aspire 3810t | |
9 | instead. | |
10 | ||
11 | Proper fix is upstream in 2.6.32. | |
12 | ||
13 | Signed-off-by: Tejun Heo <teheo@suse.de> | |
14 | --- | |
15 | drivers/ata/ahci.c | 33 +++++++++++++++++++++++++++++++++ | |
16 | 1 file changed, 33 insertions(+) | |
17 | ||
18 | Index: linux-2.6.27-SLE11_BRANCH/drivers/ata/ahci.c | |
19 | =================================================================== | |
20 | --- linux-2.6.27-SLE11_BRANCH.orig/drivers/ata/ahci.c | |
21 | +++ linux-2.6.27-SLE11_BRANCH/drivers/ata/ahci.c | |
22 | @@ -2544,6 +2544,37 @@ static void ahci_p5wdh_workaround(struct | |
23 | } | |
24 | } | |
25 | ||
26 | +static void ahci_aspire_3810t_workaround(struct ata_host *host) | |
27 | +{ | |
28 | + static const struct dmi_system_id sysids[] = { | |
29 | + /* | |
30 | + * Aspire 3810T issues a bunch of SATA enable commands | |
31 | + * via _GTF including an invalid one and one which is | |
32 | + * rejected by the device. Among the successful ones | |
33 | + * is FPDMA non-zero offset enable which when enabled | |
34 | + * only on the drive side leads to NCQ command | |
35 | + * failures. Disable NCQ. | |
36 | + */ | |
37 | + { | |
38 | + .ident = "Aspire 3810T", | |
39 | + .matches = { | |
40 | + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | |
41 | + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 3810T"), | |
42 | + }, | |
43 | + }, | |
44 | + { } | |
45 | + }; | |
46 | + int i; | |
47 | + | |
48 | + if (dmi_check_system(sysids)) { | |
49 | + dev_printk(KERN_INFO, host->dev, | |
50 | + "Aspire 3810T detected, disabling NCQ\n"); | |
51 | + | |
52 | + for (i = 0; i < host->n_ports; i++) | |
53 | + host->ports[i]->flags &= ~ATA_FLAG_NCQ; | |
54 | + } | |
55 | +} | |
56 | + | |
57 | static bool ahci_broken_system_poweroff(struct pci_dev *pdev) | |
58 | { | |
59 | static const struct dmi_system_id broken_systems[] = { | |
60 | @@ -2710,6 +2741,8 @@ static int ahci_init_one(struct pci_dev | |
61 | /* apply workaround for ASUS P5W DH Deluxe mainboard */ | |
62 | ahci_p5wdh_workaround(host); | |
63 | ||
64 | + ahci_aspire_3810t_workaround(host); | |
65 | + | |
66 | /* initialize adapter */ | |
67 | rc = ahci_configure_dma_masks(pdev, hpriv->cap & HOST_CAP_64); | |
68 | if (rc) |