]> git.proxmox.com Git - pve-kernel-2.6.32.git/blame - ahci-ata_generic-let-ata_generic-handle-new-MBP-w-MCP89.patch
update to vzkernel-2.6.32-042stab040.1.src.rpm
[pve-kernel-2.6.32.git] / ahci-ata_generic-let-ata_generic-handle-new-MBP-w-MCP89.patch
CommitLineData
e4de4890
DM
1From bdc358c1311531b459cbd12a22556d6cd62aa7cb Mon Sep 17 00:00:00 2001
2From: Tejun Heo <tj@kernel.org>
3Date: Thu, 17 Jun 2010 11:42:22 +0200
4Subject: [PATCH] ahci,ata_generic: let ata_generic handle new MBP w/ MCP89
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9commit c6353b4520788e34098bbf61c73fb9618ca7fdd6 upstream.
10
11For yet unknown reason, MCP89 on MBP 7,1 doesn't work w/ ahci under
12linux but the controller doesn't require explicit mode setting and
13works fine with ata_generic. Make ahci ignore the controller on MBP
147,1 and let ata_generic take it for now.
15
16Reported in bko#15923.
17
18 https://bugzilla.kernel.org/show_bug.cgi?id=15923
19
20NVIDIA is investigating why ahci mode doesn't work.
21
22Signed-off-by: Tejun Heo <tj@kernel.org>
23Cc: Peer Chen <pchen@nvidia.com>
24Cc: stable@kernel.org
25Reported-by: Anders Ă˜sthus <grapz666@gmail.com>
26Reported-by: Andreas Graf <andreas_graf@csgraf.de>
27Reported-by: Benoit Gschwind <gschwind@gnu-log.net>
28Reported-by: Damien Cassou <damien.cassou@gmail.com>
29Reported-by: tixetsal@juno.com
30Signed-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
38diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
39index 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)
59diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
60index 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), },
76diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
77index 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--
891.7.1
90