mirror of
https://github.com/reactos/reactos.git
synced 2024-11-19 21:48:10 +00:00
Wait a little between retries. Fixes bug #106.
svn path=/trunk/; revision=8086
This commit is contained in:
parent
97ea59d7c9
commit
2a78934eed
2 changed files with 10 additions and 4 deletions
|
@ -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,9 +2076,13 @@ TryAgain:
|
|||
/* FIXME: Wait a little if we got a timeout error */
|
||||
|
||||
if (RetryCount--)
|
||||
{
|
||||
RetryWait.QuadPart = - RETRY_WAIT;
|
||||
KeDelayExecutionThread(KernelMode, FALSE, &RetryWait);
|
||||
goto TryAgain;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Status = STATUS_SUCCESS;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue