xref: /reactos/drivers/network/dd/e1000/interrupt.c (revision 4561998a)
1 /*
2  * PROJECT:     ReactOS Intel PRO/1000 Driver
3  * LICENSE:     GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE:     Interrupt handlers
5  * COPYRIGHT:   Copyright 2013 Cameron Gutman (cameron.gutman@reactos.org)
6  *              Copyright 2018 Mark Jansen (mark.jansen@reactos.org)
7  */
8 
9 #include "nic.h"
10 
11 #include <debug.h>
12 
13 VOID
14 NTAPI
15 MiniportISR(
16     OUT PBOOLEAN InterruptRecognized,
17     OUT PBOOLEAN QueueMiniportHandleInterrupt,
18     IN NDIS_HANDLE MiniportAdapterContext)
19 {
20     PE1000_ADAPTER Adapter = (PE1000_ADAPTER)MiniportAdapterContext;
21 
22     //
23     // FIXME: We need to synchronize with this ISR for changes to InterruptPending,
24     // LinkChange, MediaState, and LinkSpeedMbps. We can get away with IRQL
25     // synchronization on non-SMP machines because we run a DIRQL here.
26     //
27 
28     Adapter->InterruptPending |= NICInterruptRecognized(Adapter, InterruptRecognized);
29     if (!(*InterruptRecognized))
30     {
31         /* This is not ours. */
32         *QueueMiniportHandleInterrupt = FALSE;
33         return;
34     }
35 
36     UNIMPLEMENTED;
37 
38     /* Acknowledge the interrupt and mark the events pending service */
39     NICAcknowledgeInterrupts(Adapter);
40     *QueueMiniportHandleInterrupt = TRUE;
41 }
42 
43 VOID
44 NTAPI
45 MiniportHandleInterrupt(
46     IN NDIS_HANDLE MiniportAdapterContext)
47 {
48     NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
49 }
50