From ad2cab6ddcbf6f517487a74343e2a3950cd09c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 25 Jun 2004 13:34:27 +0000 Subject: [PATCH] Fixed a timeout to the same value it was before. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8165 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/bus_managers/ide/devices.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/bus_managers/ide/devices.c b/src/add-ons/kernel/bus_managers/ide/devices.c index 486f062878..1c64f65326 100644 --- a/src/add-ons/kernel/bus_managers/ide/devices.c +++ b/src/add-ons/kernel/bus_managers/ide/devices.c @@ -1,6 +1,6 @@ /* ** Copyright 2002/03, Thomas Kurschel. All rights reserved. -** Distributed under the terms of the OpenBeOS License. +** Distributed under the terms of the Haiku License. */ /* @@ -208,7 +208,9 @@ scan_device_int(ide_device_info *device, bool atapi) } // do a short wait first - if there's no device at all we could wait forever - if (acquire_sem_etc(bus->sync_wait_sem, 1, B_RELATIVE_TIMEOUT, 1000/*100000*/) == B_TIMED_OUT) { + // ToDo: have a look at this; if it times out (when the time is too short), + // the kernel seems to crash a little later)! + if (acquire_sem_etc(bus->sync_wait_sem, 1, B_RELATIVE_TIMEOUT, 100000) == B_TIMED_OUT) { bool cont; SHOW_FLOW0( 3, "no fast response to inquiry" ); @@ -239,7 +241,7 @@ scan_device_int(ide_device_info *device, bool atapi) acquire_sem(bus->sync_wait_sem); } - // cancel the timeout manually; usuall this is done by wait_for_sync(), but + // cancel the timeout manually; usually this is done by wait_for_sync(), but // we've used the wait semaphore directly cancel_irq_timeout(bus);