aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-08-04 11:15:07 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-03 11:39:57 -0700
commite4dd9ac202da43712e1725087a7f5c656b79fb51 (patch)
tree3545710b1963591b726c73573443f935be3d84be /drivers/ata
parent088412ec9929d1a1aa58e30aba1304a0fee68c98 (diff)
downloadkernel_samsung_crespo-e4dd9ac202da43712e1725087a7f5c656b79fb51.zip
kernel_samsung_crespo-e4dd9ac202da43712e1725087a7f5c656b79fb51.tar.gz
kernel_samsung_crespo-e4dd9ac202da43712e1725087a7f5c656b79fb51.tar.bz2
pata_via: disable ATAPI DMA on AVERATEC 3200
commit 6d0e194d2eefcaab6dbdca1f639748660144acb5 upstream. On AVERATEC 3200, pata_via causes memory corruption with ATAPI DMA, which often leads to random kernel oops. The cause of the problem is not well understood yet and only small subset of machines using the controller seem affected. Blacklist ATAPI DMA on the machine. Signed-off-by: Tejun Heo <tj@kernel.org> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=11426 Reported-and-tested-by: Jim Bray <jimsantelmo@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_via.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index ac8d7d9..d6d4f57 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -124,6 +124,17 @@ static const struct via_isa_bridge {
{ NULL }
};
+static const struct dmi_system_id no_atapi_dma_dmi_table[] = {
+ {
+ .ident = "AVERATEC 3200",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "AVERATEC"),
+ DMI_MATCH(DMI_BOARD_NAME, "3200"),
+ },
+ },
+ { }
+};
+
struct via_port {
u8 cached_device;
};
@@ -355,6 +366,13 @@ static unsigned long via_mode_filter(struct ata_device *dev, unsigned long mask)
mask &= ~ ATA_MASK_UDMA;
}
}
+
+ if (dev->class == ATA_DEV_ATAPI &&
+ dmi_check_system(no_atapi_dma_dmi_table)) {
+ ata_dev_printk(dev, KERN_WARNING, "controller locks up on ATAPI DMA, forcing PIO\n");
+ mask &= ATA_MASK_PIO;
+ }
+
return mask;
}