Skip to content

Commit

Permalink
pata_via: disable ATAPI DMA on AVERATEC 3200
Browse files Browse the repository at this point in the history
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>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Aug 19, 2011
1 parent ebd1699 commit 6d0e194
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/ata/pata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down Expand Up @@ -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_warn(dev, "controller locks up on ATAPI DMA, forcing PIO\n");
mask &= ATA_MASK_PIO;
}

return mask;
}

Expand Down

0 comments on commit 6d0e194

Please sign in to comment.