Wait a little between retries. Fixes bug #106.

svn path=/trunk/; revision=8086
This commit is contained in:
Gé van Geldorp 2004-02-07 21:36:56 +00:00
parent 97ea59d7c9
commit 2a78934eed
2 changed files with 10 additions and 4 deletions

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: class2.c,v 1.46 2003/11/13 14:18:53 ekohl Exp $
/* $Id: class2.c,v 1.47 2004/02/07 21:36:56 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -1971,6 +1971,7 @@ ScsiClassSendSrbSynchronous(PDEVICE_OBJECT DeviceObject,
PKEVENT Event;
PIRP Irp;
NTSTATUS Status;
LARGE_INTEGER RetryWait;
DPRINT("ScsiClassSendSrbSynchronous() called\n");
@ -2075,7 +2076,11 @@ TryAgain:
/* FIXME: Wait a little if we got a timeout error */
if (RetryCount--)
goto TryAgain;
{
RetryWait.QuadPart = - RETRY_WAIT;
KeDelayExecutionThread(KernelMode, FALSE, &RetryWait);
goto TryAgain;
}
}
}
else

View file

@ -1,4 +1,4 @@
/* $Id: class2.h,v 1.4 2003/11/01 16:32:47 ekohl Exp $
/* $Id: class2.h,v 1.5 2004/02/07 21:36:56 gvg Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -13,7 +13,8 @@
#include "ntddscsi.h"
#include "srb.h"
#define MAXIMUM_RETRIES 4
#define MAXIMUM_RETRIES 15
#define RETRY_WAIT 2000000 /* 200 ms in units of 100 ns */
struct _CLASS_INIT_DATA;