aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2011-09-15 10:27:11 +0800
committerJohn Rigby <john.rigby@linaro.org>2011-11-16 14:49:16 -0700
commitc99ad503e12d87c79382c0a7907feffa92713e39 (patch)
tree4303b680cf5d38a63a038e805d78292fa3d39e85 /drivers
parent05c68a1841d09b31b35ae46787ab571af388d1c8 (diff)
UBUNTU: SAUCE: ata: make DVD drive recognisable on systems with Sandybridge CPT chipset
This quirk patch fixes one kind of bug inside Intel Sandybridge CPT chipset, see reports from LP794642, LP737388, LP758433, ... Many guys have reported the problem. With help from upstream ata maintainer Tejun[1], the problem is found to be caused by 32bit PIO mode, which is introduced in the commit below: commit 0b67c7439fe2a5d76602de36854c88e2beab00b0 Author: Tejun Heo <tj@kernel.org> Date: Mon Jan 11 17:03:11 2010 +0900 ata_piix: enable 32bit PIO on SATA piix Commit 871af1210f13966ab911ed2166e4ab2ce775b99d enabled 32bit PIO for PATA piix but didn't for SATA. There's no reason not to use 32bit PIO on SATA piix. Enable it. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com> so introduce the quirk patch to disable 32bit PIO on SATA piix for Sandybridge CPT chipset, Alan Cox has agreed on the patch[2]. SRU Justification: Impact: - without the patch, DVD drive can't be recognized on Dell optiplex 390. Fix: - After applying the patch, DVD drive can be recognized well on Dell optiplex 390. BugLink: http://bugs.launchpad.net/bugs/794642 Upstream: [1]/[2] [1], https://bugzilla.kernel.org/show_bug.cgi?id=40592 [2], http://marc.info/?t=131528297300002&r=1&w=2 Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/ata_piix.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index cc431d6bc97..769bee1a58e 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -346,11 +346,12 @@ static struct ata_port_operations piix_sata_ops = {
};
static struct ata_port_operations piix_pata_ops = {
- .inherits = &piix_sata_ops,
+ .inherits = &ata_bmdma32_port_ops,
.cable_detect = ata_cable_40wire,
.set_piomode = piix_set_piomode,
.set_dmamode = piix_set_dmamode,
.prereset = piix_pata_prereset,
+ .sff_irq_check = piix_irq_check,
};
static struct ata_port_operations piix_vmw_ops = {
@@ -1612,6 +1613,15 @@ static int __devinit piix_init_one(struct pci_dev *pdev,
"on poweroff and hibernation\n");
}
+ /*
+ * Sandybridge chipset H61/P67/H67 have broken 32 mode up to now
+ * see https://bugzilla.kernel.org/show_bug.cgi?id=40592
+ */
+ if (pdev->vendor == PCI_VENDOR_ID_INTEL && pdev->device == 0x1c00)
+ piix_sata_ops.inherits = &ata_bmdma_port_ops;
+ else
+ piix_sata_ops.inherits = &ata_bmdma32_port_ops;
+
port_info[0] = piix_port_info[ent->driver_data];
port_info[1] = piix_port_info[ent->driver_data];