Author: cgutman
Date: Sat Sep 27 14:54:58 2008
New Revision: 36558
URL:
http://svn.reactos.org/svn/reactos?rev=36558&view=rev
Log:
- Set MiniportBusy to TRUE if a request is pending
- Hold spin lock when setting MiniportBusy (forgot one from last time)
Modified:
branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Sat Sep
27 14:54:58 2008
@@ -815,6 +815,12 @@
default:
Status = NDIS_STATUS_FAILURE;
+ }
+
+ if (Status == NDIS_STATUS_PENDING) {
+ KeAcquireSpinLockAtDpcLevel(&Adapter->NdisMiniportBlock.Lock);
+ Adapter->MiniportBusy = TRUE;
+ KeReleaseSpinLockFromDpcLevel(&Adapter->NdisMiniportBlock.Lock);
}
KeLowerIrql(OldIrql);
@@ -999,8 +1005,11 @@
}
}
- if( NdisStatus != NDIS_STATUS_PENDING )
- Adapter->MiniportBusy = FALSE;
+ if( NdisStatus != NDIS_STATUS_PENDING ) {
+ KeAcquireSpinLock(&Adapter->NdisMiniportBlock.Lock, &OldIrql);
+ Adapter->MiniportBusy = FALSE;
+ KeReleaseSpinLock(&Adapter->NdisMiniportBlock.Lock, OldIrql);
+ }
ExFreePool(WorkItem);
}