Hi all,
As a part of my job i am developing one pci device driver in which
whenever i get the interrupt my system gets restarted.the code that i am
using is simple and as following
first i am regisetering device driver’s InterruptService routine (ISR) by
using
status = IoConnectInterrupt(&devExt->Interrupt,
PciDeviceCInterruptHandler,
devExt, // ISR Context
NULL,
devExt->InterruptVector,
devExt->InterruptLevel,
devExt->InterruptLevel,
devExt->InterruptMode,
TRUE, // shared interrupt
devExt->InterruptAffinity,
FALSE);
and my interrupt handler routine is as following
BOOLEAN
PciDeviceCInterruptHandler(
IN PKINTERRUPT Interupt,
IN PVOID ServiceContext
)
{
BOOLEAN InterruptRecognized = FALSE;
struct DEVICE_EXTENSION *devExt = (struct DEVICE_EXTENSION
*)ServiceContext;
USHORT IntStatus;
DbgPrint(“—> PciDeviceCInterruptHandler\n”);
//IoRequestDpc(devExt->filterDevObj, NULL, devExt);
Pci_Device_Disable_Interrupt(devExt);
KeSetEvent(&devExt->KeInterruptevent, IO_NO_INCREMENT, FALSE);
InterruptRecognized = TRUE;
DbgPrint(“<– NICInterruptHandler\r\n”);
return InterruptRecognized;
}
By using this i am just trying to see weather i am able to get the interrupt
and process it successfully or not i have not added any functionality yet.
but i am suspecting that as i am geting the interrupt my system gets
restarted.
If this is not the right way to handle the iterrupt then please you people
can give me some sample code or any url of the tutorial and any other stuff
that can help me to complete this task successfully.
Thanks
Nayan
Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more. Try MSN
Search http://server1.msn.co.in/Profile/bipashabasu.asp