From c7edae4bc259b1d25d748583bc3012cb6dac850c Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Fri, 27 Jan 2012 21:52:59 +0000 Subject: [PATCH] Using ATA_CAM along with ATAPI DMA causes data corruption with ALI_NEW and CMD controllers for reasons unknown so disable it. PR: 164226 --- sys/dev/ata/chipsets/ata-acerlabs.c | 4 ++++ sys/dev/ata/chipsets/ata-siliconimage.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/dev/ata/chipsets/ata-acerlabs.c b/sys/dev/ata/chipsets/ata-acerlabs.c index dfcc3cfc2be9..8281d0f79511 100644 --- a/sys/dev/ata/chipsets/ata-acerlabs.c +++ b/sys/dev/ata/chipsets/ata-acerlabs.c @@ -213,6 +213,10 @@ ata_ali_ch_attach(device_t dev) if (ch->dma.max_iosize > 256 * 512) ch->dma.max_iosize = 256 * 512; } +#ifdef ATA_CAM + if (ctlr->chip->cfg2 & ALI_NEW) + ch->flags |= ATA_NO_ATAPI_DMA; +#endif return 0; } diff --git a/sys/dev/ata/chipsets/ata-siliconimage.c b/sys/dev/ata/chipsets/ata-siliconimage.c index 4ec9a5b1a380..ce170a1f568b 100644 --- a/sys/dev/ata/chipsets/ata-siliconimage.c +++ b/sys/dev/ata/chipsets/ata-siliconimage.c @@ -240,6 +240,10 @@ ata_cmd_ch_attach(device_t dev) if (ctlr->chip->cfg2 & SII_INTR) ch->hw.status = ata_cmd_status; +#ifdef ATA_CAM + ch->flags |= ATA_NO_ATAPI_DMA; +#endif + return 0; }