Author: hpoussin
Date: Tue Dec 11 15:58:05 2007
New Revision: 31141
URL:
http://svn.reactos.org/svn/reactos?rev=31141&view=rev
Log:
Get some more details about interrupt in resource list.
This lets ne2000 share its interrupt with another device
Modified:
trunk/reactos/drivers/network/dd/ne2000/include/ne2000.h
trunk/reactos/drivers/network/dd/ne2000/ne2000/main.c
Modified: trunk/reactos/drivers/network/dd/ne2000/include/ne2000.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/dd/ne2000/…
==============================================================================
--- trunk/reactos/drivers/network/dd/ne2000/include/ne2000.h (original)
+++ trunk/reactos/drivers/network/dd/ne2000/include/ne2000.h Tue Dec 11 15:58:05 2007
@@ -29,6 +29,8 @@
#define DRIVER_DEFAULT_IO_BASE_ADDRESS 0x280 /* bochs default */
#define DRIVER_DEFAULT_INTERRUPT_NUMBER 9 /* bochs default */
+#define DRIVER_DEFAULT_INTERRUPT_SHARED FALSE
+#define DRIVER_DEFAULT_INTERRUPT_MODE NdisInterruptLatched
#define DRIVER_MAX_MULTICAST_LIST_SIZE 8
@@ -80,6 +82,8 @@
ULONG IoBaseAddress;
ULONG InterruptLevel;
ULONG InterruptVector;
+ BOOLEAN InterruptShared;
+ KINTERRUPT_MODE InterruptMode;
/* Mapped address of the I/O base port */
PUCHAR IOBase;
Modified: trunk/reactos/drivers/network/dd/ne2000/ne2000/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/dd/ne2000/…
==============================================================================
--- trunk/reactos/drivers/network/dd/ne2000/ne2000/main.c (original)
+++ trunk/reactos/drivers/network/dd/ne2000/ne2000/main.c Tue Dec 11 15:58:05 2007
@@ -190,6 +190,9 @@
case CmResourceTypeInterrupt:
Adapter->InterruptLevel = Descriptor->u.Interrupt.Level;
Adapter->InterruptVector = Descriptor->u.Interrupt.Vector;
+ Adapter->InterruptShared = (Descriptor->ShareDisposition ==
CmResourceShareShared);
+ Adapter->InterruptMode = Descriptor->Flags &
CM_RESOURCE_INTERRUPT_LATCHED ?
+ NdisInterruptLatched :
NdisInterruptLevelSensitive;
break;
case CmResourceTypePort:
Adapter->IoBaseAddress = Descriptor->u.Port.Start.LowPart;
@@ -252,6 +255,8 @@
Adapter->IoBaseAddress = DRIVER_DEFAULT_IO_BASE_ADDRESS;
Adapter->InterruptLevel = DRIVER_DEFAULT_INTERRUPT_NUMBER;
Adapter->InterruptVector = DRIVER_DEFAULT_INTERRUPT_NUMBER;
+ Adapter->InterruptShared = DRIVER_DEFAULT_INTERRUPT_SHARED;
+ Adapter->InterruptMode = DRIVER_DEFAULT_INTERRUPT_MODE;
Adapter->MaxMulticastListSize = DRIVER_MAX_MULTICAST_LIST_SIZE;
Adapter->InterruptMask = DRIVER_INTERRUPT_MASK;
Adapter->LookaheadSize = DRIVER_MAXIMUM_LOOKAHEAD;
@@ -392,8 +397,8 @@
Adapter->InterruptVector,
Adapter->InterruptLevel,
FALSE,
- FALSE,
- NdisInterruptLatched);
+ Adapter->InterruptShared,
+ Adapter->InterruptMode);
if (Status != NDIS_STATUS_SUCCESS) {
NDIS_DbgPrint(MIN_TRACE, ("Cannot register interrupt. Status
(0x%X).\n", Status));
MiniportHalt((NDIS_HANDLE)Adapter);