I didn’t have time to clarify this question. I was once called in to
consult on a driver which was having serious performance problems. After
the interrupts had been disabled, the device’s throughput dropped
drastically. The client was unable to determine the problem, and asked me
to help.
I studied the code. Interrupts were disabled, but never re-enabled. The
original programmer thought that interrupts were being lost, so added a
timeout that would complete the I/O request (it wasn’t a Windows driver,
but that’s a minor detail) with whatever data was available (programmed
I/O: one byte at most). It took me a long time to find this one. When I
said “Why aren’t you enabling interrupts?” the question got me One Of
Those Looks and the programmer said “You mean they aren’t automatically
enabled when I start an I/O operation?” Apparently he had asked the
previous programmer and gotten the same bad information. So when I said
“define enable/disable” there are many things can happen. If you disable
the device from the device manager plugin, then there should be a sequence
of IRPs that deal with shutting it down, and you can trace these to see
what they are, then examine the code to see what they are doing. If you
are disabling /interrupts/ at some point, don’t forget to re-enable them.
[The original programmer noticed that sometimes the device “hung” because
no interrupts were occurring; rather than figure out what was wrong, the
timeout routine was added. This factoid was not explained to the new
programmer]
OTOH, our printer controller frequently forgot to interrupt the computer
when it had finished printing a line, and we had to add a timeout. It was
frightening to hear it print after this: WHIRR, WHIRR, WHIRR, (pause),
WHIRR,…30 or so…WHIRR, (pause) and so on. As best we could tell, the
interface was completely flaky. But a printer is a slow device, and
timeouts aren’t nearly as bad as if it had been, say, a network card.
joe
Define disable/enable. It might be useful to use a bus analyzer to see if
some weird state is being set to the chip. I don’t know if WinDbg can do
it, but the old SoftICE could break on port writes, and I found this
invaluable in tracking down manydriver problems I wascalled in to fix.
joe
> Can a wdm driver request a warm fundamental reset to its PCIe device?
> The device’s performance goes down after a disable/enable. Instead of
> figuring out every
> detail, I want to see if a broad reset at load time can fix the issue.
>
> I have not worked on PCI drivers since the days of NT 4.0. I have been
> working on
> lesser buses: usb and sdio.
>
> thanks,
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer