From: pascal on
when using the sample code PLX9x5x for the my PCI driver it does not handle
the I/O Control request so i added new queue for the I/O Control and callback
routine PCIeEvtIoDeviceControl and added the proper code in the application
for the IOCTL.
each time i called the I/O Control request i Got the 'blue screen' after few
times
i removed the PAGED_CODE(); line and every thing worked.
the PCIeEvtIoDeviceControl routine was copied from other driver and worked
there with the PAGED_CODE();
the question: what i am missing and when to make routine paged no nonpaged?
why did it work when the routine was nonpaged? i thought that it sould be
paged?

Thanks

From: Don Burn on
First, have you run PreFast on the driver? There is a good chance PreFast
will find you are using a function that cannot be called with paged code,
such as a spinlock. Second, you had a crash, the standard rule on all
the discussion groups is we need !analyze -v on the crash to have a hope
of figuring out what went wrong.


Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr



> -----Original Message-----
> From: pascal [mailto:pascal(a)discussions.microsoft.com]
> Posted At: Sunday, June 20, 2010 3:49 AM
> Posted To: microsoft.public.development.device.drivers
> Conversation: how do i know when to set callback to paged or not paged?
> Subject: how do i know when to set callback to paged or not paged?
>
> when using the sample code PLX9x5x for the my PCI driver it does not
> handle
> the I/O Control request so i added new queue for the I/O Control and
> callback
> routine PCIeEvtIoDeviceControl and added the proper code in the
> application
> for the IOCTL.
> each time i called the I/O Control request i Got the 'blue screen' after
> few
> times i removed the PAGED_CODE(); line and every thing worked.
> the PCIeEvtIoDeviceControl routine was copied from other driver and
> worked
> there with the PAGED_CODE(); the question: what i am missing and when
> to make
> routine paged no nonpaged?
> why did it work when the routine was nonpaged? i thought that it sould
> be
> paged?
>
> Thanks
>
>
> __________ Information from ESET Smart Security, version of virus
> signature
> database 5211 (20100620) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>

From: pascal on
1. i did run PreFast on the driver it there were no issus reported there.
2. after runing !analyze -v on the dump files and the error message was
like: routine marked as was paged but should have been unpaged, when i
removed the page_code macro it started to work.
3. when reading the irql level in the PCIeEvtIoDeviceControl it show number
2 = dispatch level, the function it self contains only DbgPrint,TraceEvents
and WdfRequestComplete. nothing else.
4. is it bad that the PCIeEvtIoDeviceControl could not be paged? what the
policy on those cases? to make most code paged?

Thanks

From: Krzysztof Uchronski on
From WDK docs for EvtIoDeviceControl
(http://msdn.microsoft.com/en-us/library/ff541758(VS.85).aspx):
"The EvtIoDeviceControl callback function can be called at IRQL <=
DISPATCH_LEVEL, unless the ExecutionLevel member of the device or driver's
WDF_OBJECT_ATTRIBUTES structure is set to WdfExecutionLevelPassive. (If
your driver is at the top of its driver stack, the callback function is
called at IRQL = PASSIVE_LEVEL.)"

Btw. it's plain bad that you didn't enclose "!analyze -v" output as Don
suggested.

Kris

-----Original Message-----
From: pascal [mailto:pascal(a)discussions.microsoft.com]
Posted At: Tuesday, June 22, 2010 8:02 AM
Posted To: microsoft.public.development.device.drivers
Conversation: how do i know when to set callback to paged or not paged?
Subject: Re: how do i know when to set callback to paged or not paged?

1. i did run PreFast on the driver it there were no issus reported there.
2. after runing !analyze -v on the dump files and the error message was
like: routine marked as was paged but should have been unpaged, when i
removed the page_code macro it started to work.
3. when reading the irql level in the PCIeEvtIoDeviceControl it show
number
2 = dispatch level, the function it self contains only
DbgPrint,TraceEvents
and WdfRequestComplete. nothing else.
4. is it bad that the PCIeEvtIoDeviceControl could not be paged? what the
policy on those cases? to make most code paged?

Thanks