summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2005-08-25 15:45:03 +0000
committersos <sos@FreeBSD.org>2005-08-25 15:45:03 +0000
commit0ffb7bad2ead0311621edc57a240804d46db5312 (patch)
tree493e443abea9b29911a326afdca3557805cd746b /sys/dev
parentdee5705f2d020e42375c4122af5663a7b9a4fe0c (diff)
downloadFreeBSD-src-0ffb7bad2ead0311621edc57a240804d46db5312.zip
FreeBSD-src-0ffb7bad2ead0311621edc57a240804d46db5312.tar.gz
Dont set default mode to ATA_DMA_MAX on devices not capable of DMA.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata-all.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 3db5df7..632d625 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -615,7 +615,9 @@ ata_getparam(device_t parent, struct ata_device *atadev)
atadev->mode = ATA_DMA_MAX;
}
else {
- if (ata_dma && ch->dma)
+ if (ata_dma && ch->dma &&
+ (ata_umode(&atadev->param) > 0 ||
+ ata_wmode(&atadev->param) > 0))
atadev->mode = ATA_DMA_MAX;
}
}
OpenPOWER on IntegriCloud