From faca873f769be6fb339e5766d4ca0fee5d4df846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Wed, 11 May 2005 12:41:35 +0000 Subject: [PATCH] Fix ATAPI DMA. We need to set the proper flags for DMA modes. --- sys/dev/ata/ata-lowlevel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/ata/ata-lowlevel.c b/sys/dev/ata/ata-lowlevel.c index c6aeb3355cc0..cb8ca58d8ef7 100644 --- a/sys/dev/ata/ata-lowlevel.c +++ b/sys/dev/ata/ata-lowlevel.c @@ -670,9 +670,11 @@ ata_generic_command(struct ata_request *request) int timeout = 5000; /* issue packet command to controller */ + if (request->flags & ATA_R_DMA) + ATA_IDX_OUTB(ch, ATA_FEATURE, ATA_F_DMA); ATA_IDX_OUTB(ch, ATA_CYL_LSB, request->transfersize); ATA_IDX_OUTB(ch, ATA_CYL_MSB, request->transfersize >> 8); - ATA_IDX_OUTB(ch, ATA_COMMAND, ATA_PACKET_CMD); + ATA_IDX_OUTB(ch, ATA_COMMAND, ATA_PACKET_CMD); /* command interrupt device ? just return and wait for interrupt */ if ((atadev->param.config & ATA_DRQ_MASK) == ATA_DRQ_INTR)