Author: cgutman
Date: Wed Oct 1 21:04:57 2008
New Revision: 36620
URL:
http://svn.reactos.org/svn/reactos?rev=36620&view=rev
Log:
- Only call MiniportISR if the miniport driver called NdisMRegisterInterrupt with
RequestIsr TRUE
- If RequestIsr is FALSE call the MiniportDisableInterrupt handler
Modified:
branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/drivers/network/ndis/ndis/io.c [iso-8859-1] Wed Oct 1
21:04:57 2008
@@ -60,22 +60,31 @@
* TRUE if a miniport controlled device generated the interrupt
*/
{
- BOOLEAN InterruptRecognized;
- BOOLEAN QueueMiniportHandleInterrupt;
+ BOOLEAN InterruptRecognized = FALSE;
+ BOOLEAN QueueMiniportHandleInterrupt = FALSE;
PLOGICAL_ADAPTER Adapter = ServiceContext;
NDIS_DbgPrint(MAX_TRACE, ("Called. Adapter (0x%X)\n", Adapter));
- (*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.ISRHandler)(
- &InterruptRecognized,
- &QueueMiniportHandleInterrupt,
- Adapter->NdisMiniportBlock.MiniportAdapterContext);
+ if (Adapter->NdisMiniportBlock.Interrupt->IsrRequested) {
+
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.ISRHandler)(
+ &InterruptRecognized,
+ &QueueMiniportHandleInterrupt,
+ Adapter->NdisMiniportBlock.MiniportAdapterContext);
+
+ } else if
(Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.DisableInterruptHandler)
{
+
(*Adapter->NdisMiniportBlock.DriverHandle->MiniportCharacteristics.DisableInterruptHandler)(
+ Adapter->NdisMiniportBlock.MiniportAdapterContext);
+ QueueMiniportHandleInterrupt = TRUE;
+ InterruptRecognized = TRUE;
+ }
+
if (QueueMiniportHandleInterrupt)
- {
- NDIS_DbgPrint(MAX_TRACE, ("Queueing DPC.\n"));
+ {
+ NDIS_DbgPrint(MAX_TRACE, ("Queuing DPC.\n"));
KeInsertQueueDpc(&Adapter->NdisMiniportBlock.Interrupt->InterruptDpc,
NULL, NULL);
- }
+ }
NDIS_DbgPrint(MAX_TRACE, ("Leaving.\n"));
@@ -767,6 +776,7 @@
KeInitializeEvent(&Interrupt->DpcsCompletedEvent, NotificationEvent, FALSE);
Interrupt->SharedInterrupt = SharedInterrupt;
+ Interrupt->IsrRequested = RequestIsr;
Adapter->NdisMiniportBlock.Interrupt = Interrupt;