Dont set default mode to ATA_DMA_MAX on devices not capable of DMA.

This commit is contained in:
Søren Schmidt 2005-08-25 15:45:03 +00:00
parent 2fa9dad0ef
commit 071e98cbeb

View File

@ -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;
}
}