From 2c08a1043904b55f5a6a326ce4d0688120021f85 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 19 Apr 2009 00:57:57 +0000 Subject: [PATCH] * Wait slightly longer before falling into passive poll mode. * Cause scheduler invokation when we handled an interrupt as the transfering thread can continue immediately. This brings small block transfer rates to a comparable level to the old IDE bus_manager. For large block transfers there is no speed difference at all. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30257 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp b/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp index f4c2835628..42384e2d5d 100644 --- a/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp +++ b/src/add-ons/kernel/bus_managers/ata/ATAChannel.cpp @@ -379,7 +379,7 @@ ATAChannel::Wait(uint8 setBits, uint8 clearedBits, uint32 flags, // The device may be ready almost immediatelly. If it isn't, // poll often during the first 20ms, otherwise poll lazyly. - if (elapsedTime < 500) + if (elapsedTime < 1000) spin(1); else if (elapsedTime < 20000) snooze(1000); @@ -692,7 +692,7 @@ ATAChannel::Interrupt(uint8 status) } fInterruptCondition.NotifyAll(); - return B_HANDLED_INTERRUPT; + return B_INVOKE_SCHEDULER; }