]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
pata_hpt366: no ATAPI DMA
authorTejun Heo <tj@kernel.org>
Tue, 9 Dec 2008 08:14:04 +0000 (17:14 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Tue, 16 Dec 2008 10:40:34 +0000 (05:40 -0500)
IDE hpt366 driver doesn't allow DMA for ATAPI devices and MWDMA2 on
ATAPI device locks up pata_hpt366.  Follow the suit.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/pata_hpt366.c

index 4824821745a23d5efe4a4e6f8b8f23e1f88347be..e0c4f05d7d579a807becb30af2bf44b3a9ea7260 100644 (file)
@@ -183,7 +183,9 @@ static unsigned long hpt366_filter(struct ata_device *adev, unsigned long mask)
                        mask &= ~(0xF8 << ATA_SHIFT_UDMA);
                if (hpt_dma_blacklisted(adev, "UDMA4", bad_ata66_4))
                        mask &= ~(0xF0 << ATA_SHIFT_UDMA);
-       }
+       } else if (adev->class == ATA_DEV_ATAPI)
+               mask &= ~(ATA_MASK_MWDMA | ATA_MASK_UDMA);
+
        return ata_bmdma_mode_filter(adev, mask);
 }