]>
Commit | Line | Data |
---|---|---|
e4de4890 DM |
1 | From bdc358c1311531b459cbd12a22556d6cd62aa7cb Mon Sep 17 00:00:00 2001 |
2 | From: Tejun Heo <tj@kernel.org> | |
3 | Date: Thu, 17 Jun 2010 11:42:22 +0200 | |
4 | Subject: [PATCH] ahci,ata_generic: let ata_generic handle new MBP w/ MCP89 | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | commit c6353b4520788e34098bbf61c73fb9618ca7fdd6 upstream. | |
10 | ||
11 | For yet unknown reason, MCP89 on MBP 7,1 doesn't work w/ ahci under | |
12 | linux but the controller doesn't require explicit mode setting and | |
13 | works fine with ata_generic. Make ahci ignore the controller on MBP | |
14 | 7,1 and let ata_generic take it for now. | |
15 | ||
16 | Reported in bko#15923. | |
17 | ||
18 | https://bugzilla.kernel.org/show_bug.cgi?id=15923 | |
19 | ||
20 | NVIDIA is investigating why ahci mode doesn't work. | |
21 | ||
22 | Signed-off-by: Tejun Heo <tj@kernel.org> | |
23 | Cc: Peer Chen <pchen@nvidia.com> | |
24 | Cc: stable@kernel.org | |
25 | Reported-by: Anders Ă˜sthus <grapz666@gmail.com> | |
26 | Reported-by: Andreas Graf <andreas_graf@csgraf.de> | |
27 | Reported-by: Benoit Gschwind <gschwind@gnu-log.net> | |
28 | Reported-by: Damien Cassou <damien.cassou@gmail.com> | |
29 | Reported-by: tixetsal@juno.com | |
30 | Signed-off-by: Jeff Garzik <jgarzik@redhat.com> | |
31 | [bwh: Adjust context for 2.6.32] | |
32 | --- | |
33 | drivers/ata/ahci.c | 10 ++++++++++ | |
34 | drivers/ata/ata_generic.c | 6 ++++++ | |
35 | include/linux/pci_ids.h | 1 + | |
36 | 3 files changed, 17 insertions(+), 0 deletions(-) | |
37 | ||
38 | diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c | |
39 | index cb05205..e3d9816 100644 | |
40 | --- a/drivers/ata/ahci.c | |
41 | +++ b/drivers/ata/ahci.c | |
42 | @@ -3037,6 +3037,16 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |
43 | if (pdev->vendor == PCI_VENDOR_ID_MARVELL && !marvell_enable) | |
44 | return -ENODEV; | |
45 | ||
46 | + /* | |
47 | + * For some reason, MCP89 on MacBook 7,1 doesn't work with | |
48 | + * ahci, use ata_generic instead. | |
49 | + */ | |
50 | + if (pdev->vendor == PCI_VENDOR_ID_NVIDIA && | |
51 | + pdev->device == PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA && | |
52 | + pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE && | |
53 | + pdev->subsystem_device == 0xcb89) | |
54 | + return -ENODEV; | |
55 | + | |
56 | /* acquire resources */ | |
57 | rc = pcim_enable_device(pdev); | |
58 | if (rc) | |
59 | diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c | |
60 | index ecfd22b..b5aa93c 100644 | |
61 | --- a/drivers/ata/ata_generic.c | |
62 | +++ b/drivers/ata/ata_generic.c | |
63 | @@ -168,6 +168,12 @@ static struct pci_device_id ata_generic[] = { | |
64 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C561), }, | |
65 | { PCI_DEVICE(PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C558), }, | |
66 | { PCI_DEVICE(PCI_VENDOR_ID_CENATEK,PCI_DEVICE_ID_CENATEK_IDE), }, | |
67 | + /* | |
68 | + * For some reason, MCP89 on MacBook 7,1 doesn't work with | |
69 | + * ahci, use ata_generic instead. | |
70 | + */ | |
71 | + { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA, | |
72 | + PCI_VENDOR_ID_APPLE, 0xcb89, }, | |
73 | { PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO), }, | |
74 | { PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1), }, | |
75 | { PCI_DEVICE(PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2), }, | |
76 | diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h | |
77 | index c398cc3..a8ea95f 100644 | |
78 | --- a/include/linux/pci_ids.h | |
79 | +++ b/include/linux/pci_ids.h | |
80 | @@ -1262,6 +1262,7 @@ | |
81 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 | |
82 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_SMBUS 0x07D8 | |
83 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP79_SMBUS 0x0AA2 | |
84 | +#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA 0x0D85 | |
85 | ||
86 | #define PCI_VENDOR_ID_IMS 0x10e0 | |
87 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 | |
88 | -- | |
89 | 1.7.1 | |
90 |