Interrupt handling

HI, I have a driver which controls at least three devices. When there is one
device, the driver can be successfully loaded. When there are more than 2
devices, the driver can not start. I traced the code and find out that the
driver execution stops at IoConnectInterruct after it creates the second
device object.

The code looks like this:
bus loop
device loop
function number loop
CreateDevice ()

in CreateDevice()
tcb = ExAllocatePool();
IoCreateDevice()
IoConnectInterrupt()

It means that it creates interrupt for each object. for one device it is ok,
but the second device is added into driver, the driver has to handle the
interrupt issued from first device which may lock all the CPU resources and
therefore it can not handle the second interrupt. Am I right? Could somebody
give me a better suggestion? Thanks.

Z.S.Wang

==================================
Zhongsheng Wang
P. O. Box 500, M/S 50-480
Beaverton, OR 97077
Email: xxxxx@tek.com
Phone: (503) 627-5260

> HI, I have a driver which controls at least three devices.

When there is one
device, the driver can be successfully loaded. When there are
more than 2
devices, the driver can not start. I traced the code and find
out that the
driver execution stops at IoConnectInterruct after it creates
the second
device object.

The obvious things that come to mind (although may not be right) are:
– Use your debugger and set a break point in your ISR before you
run the second IoConnectInterrupt; perhaps the logic in your ISR isn’t quite
right.
– Did you mark your interrupt for sharing?
– Are you on PCI or ISA? If ISA, sharing must have some hardware
support by not driving the line when it is not interrupting.