summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Schmidt <sos@FreeBSD.org>2003-10-09 14:33:06 +0000
committerSøren Schmidt <sos@FreeBSD.org>2003-10-09 14:33:06 +0000
commitfa9dc8d090c99444f2ed7e57b91a511027da4de7 (patch)
tree3bf006803bb961ea558268392efa814592dbc1cd
parentea924c4cd376401390120ecad69135ea69d16ed8 (diff)
Notes
-rw-r--r--sys/dev/ata/ata-lowlevel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ata/ata-lowlevel.c b/sys/dev/ata/ata-lowlevel.c
index f25e7400ee72..184a7e708f66 100644
--- a/sys/dev/ata/ata-lowlevel.c
+++ b/sys/dev/ata/ata-lowlevel.c
@@ -73,8 +73,9 @@ ata_transaction(struct ata_request *request)
request->device->channel->running = request;
/* disable ATAPI DMA writes if HW doesn't support it */
- if (request->flags & (ATA_R_ATAPI | ATA_R_DMA | ATA_R_WRITE) &&
- request->device->channel->flags & ATA_ATAPI_DMA_RO)
+ if ((request->device->channel->flags & ATA_ATAPI_DMA_RO) &&
+ ((request->flags & (ATA_R_ATAPI | ATA_R_DMA | ATA_R_WRITE)) ==
+ (ATA_R_ATAPI | ATA_R_DMA | ATA_R_WRITE)))
request->flags &= ~ATA_R_DMA;
switch (request->flags & (ATA_R_ATAPI | ATA_R_DMA)) {