- Disable timer queuing code (hackfix for various network driver failures)
- Also needs to be merged into 0.3.12

svn path=/trunk/; revision=48968
This commit is contained in:
Cameron Gutman 2010-10-03 15:18:57 +00:00
parent b01fc3d9a7
commit e14624d8ca

View file

@ -145,7 +145,7 @@ NdisMCancelTimer(
* - call at IRQL <= DISPATCH_LEVEL * - call at IRQL <= DISPATCH_LEVEL
*/ */
{ {
KIRQL OldIrql; //KIRQL OldIrql;
ASSERT_IRQL(DISPATCH_LEVEL); ASSERT_IRQL(DISPATCH_LEVEL);
ASSERT(TimerCancelled); ASSERT(TimerCancelled);
@ -153,6 +153,7 @@ NdisMCancelTimer(
*TimerCancelled = KeCancelTimer (&Timer->Timer); *TimerCancelled = KeCancelTimer (&Timer->Timer);
#if 0
if (*TimerCancelled) if (*TimerCancelled)
{ {
KeAcquireSpinLock(&Timer->Miniport->Lock, &OldIrql); KeAcquireSpinLock(&Timer->Miniport->Lock, &OldIrql);
@ -160,6 +161,7 @@ NdisMCancelTimer(
if (!DequeueMiniportTimer(Timer)) ASSERT(FALSE); if (!DequeueMiniportTimer(Timer)) ASSERT(FALSE);
KeReleaseSpinLock(&Timer->Miniport->Lock, OldIrql); KeReleaseSpinLock(&Timer->Miniport->Lock, OldIrql);
} }
#endif
} }
VOID NTAPI VOID NTAPI
@ -170,6 +172,7 @@ MiniTimerDpcFunction(PKDPC Dpc,
{ {
PNDIS_MINIPORT_TIMER Timer = DeferredContext; PNDIS_MINIPORT_TIMER Timer = DeferredContext;
#if 0
/* Only dequeue if the timer has a period of 0 */ /* Only dequeue if the timer has a period of 0 */
if (!Timer->Timer.Period) if (!Timer->Timer.Period)
{ {
@ -178,6 +181,7 @@ MiniTimerDpcFunction(PKDPC Dpc,
if (!DequeueMiniportTimer(Timer)) ASSERT(FALSE); if (!DequeueMiniportTimer(Timer)) ASSERT(FALSE);
KeReleaseSpinLockFromDpcLevel(&Timer->Miniport->Lock); KeReleaseSpinLockFromDpcLevel(&Timer->Miniport->Lock);
} }
#endif
Timer->MiniportTimerFunction(Dpc, Timer->MiniportTimerFunction(Dpc,
Timer->MiniportTimerContext, Timer->MiniportTimerContext,
@ -240,14 +244,15 @@ NdisMSetPeriodicTimer(
*/ */
{ {
LARGE_INTEGER Timeout; LARGE_INTEGER Timeout;
KIRQL OldIrql; //KIRQL OldIrql;
ASSERT_IRQL(DISPATCH_LEVEL); ASSERT_IRQL(DISPATCH_LEVEL);
ASSERT(Timer); ASSERT(Timer);
/* relative delays are negative, absolute are positive; resolution is 100ns */ /* relative delays are negative, absolute are positive; resolution is 100ns */
Timeout.QuadPart = Int32x32To64(MillisecondsPeriod, -10000); Timeout.QuadPart = Int32x32To64(MillisecondsPeriod, -10000);
#if 0
/* Lock the miniport block */ /* Lock the miniport block */
KeAcquireSpinLock(&Timer->Miniport->Lock, &OldIrql); KeAcquireSpinLock(&Timer->Miniport->Lock, &OldIrql);
@ -260,6 +265,7 @@ NdisMSetPeriodicTimer(
/* Unlock the miniport block */ /* Unlock the miniport block */
KeReleaseSpinLock(&Timer->Miniport->Lock, OldIrql); KeReleaseSpinLock(&Timer->Miniport->Lock, OldIrql);
#endif
KeSetTimerEx(&Timer->Timer, Timeout, MillisecondsPeriod, &Timer->Dpc); KeSetTimerEx(&Timer->Timer, Timeout, MillisecondsPeriod, &Timer->Dpc);
} }
@ -285,7 +291,7 @@ NdisMSetTimer(
*/ */
{ {
LARGE_INTEGER Timeout; LARGE_INTEGER Timeout;
KIRQL OldIrql; //KIRQL OldIrql;
ASSERT_IRQL(DISPATCH_LEVEL); ASSERT_IRQL(DISPATCH_LEVEL);
ASSERT(Timer); ASSERT(Timer);
@ -293,6 +299,7 @@ NdisMSetTimer(
/* relative delays are negative, absolute are positive; resolution is 100ns */ /* relative delays are negative, absolute are positive; resolution is 100ns */
Timeout.QuadPart = Int32x32To64(MillisecondsToDelay, -10000); Timeout.QuadPart = Int32x32To64(MillisecondsToDelay, -10000);
#if 0
/* Lock the miniport block */ /* Lock the miniport block */
KeAcquireSpinLock(&Timer->Miniport->Lock, &OldIrql); KeAcquireSpinLock(&Timer->Miniport->Lock, &OldIrql);
@ -305,6 +312,7 @@ NdisMSetTimer(
/* Unlock the miniport block */ /* Unlock the miniport block */
KeReleaseSpinLock(&Timer->Miniport->Lock, OldIrql); KeReleaseSpinLock(&Timer->Miniport->Lock, OldIrql);
#endif
KeSetTimer(&Timer->Timer, Timeout, &Timer->Dpc); KeSetTimer(&Timer->Timer, Timeout, &Timer->Dpc);
} }