From 42dfe402c071820baf5cfe5933750d08bb1ae5dc Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Tue, 23 Sep 2008 19:02:51 +0000 Subject: [PATCH] got the meaning of configure_dma()'s return value wrong. It respected the failsafe boot option after all. fixed plus few added dprintf() messages to see what's happening. Sorry for the fault. Searching more for the real problem.. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27709 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/bus_managers/ide/dma.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/add-ons/kernel/bus_managers/ide/dma.c b/src/add-ons/kernel/bus_managers/ide/dma.c index 9358be305d..d7a17ef1ec 100644 --- a/src/add-ons/kernel/bus_managers/ide/dma.c +++ b/src/add-ons/kernel/bus_managers/ide/dma.c @@ -57,11 +57,21 @@ get_device_dma_mode(ide_device_info *device) bool configure_dma(ide_device_info *device) { - if ((device->DMA_enabled = device->DMA_supported = device->bus->can_DMA) - && get_device_dma_mode(device) != -1) - return true; + if (get_device_dma_mode(device) != -1) { + device->DMA_enabled = device->DMA_supported = device->bus->can_DMA; + if (device->DMA_enabled) { + dprintf("IDE: enabling DMA\n"); + } + else { + dprintf("IDE: disabling DMA (failsafe option selected)\n"); + } + } + else { + device->DMA_enabled = false; + dprintf("IDE: DMA not possible, disabling\n"); + } - return false; + return true; }