The problem I am seeing is that my driver successfully
requests new PCI memory in the Filter Resource IRP when
installed directly but fails when installed through
MIcorsofts multifunction mf.sys.

I need to allocate an additional PCI Memory Region for a
driver to fix a HW config problem. Support Win2000 and
later, testing on Win XP.

In the IRP_MN_FILTER_RESOURCE_REQUIREMENTS, I allocate
memory for a new IO_RESOURCE_REQUIREMENTS_LIST, copy the
existing list to the new one, append the new memory region
to the end, update count and size, clear and free existing
list, link the new one into the IRP, and pass the IRP down.

When I install this driver directly for the PCI
Vendor/Device ID it works. In the Start Device IRP I see
the original resources plus the new resource that I have
allocated. After installing, in the Driver Properties
Resource Tab, I see the original resources plus the new
resource. Driver works fine.

The problem comes when I use multifunction mf.sys to
enumerate the functions and install the exact same driver
in the enumerated function. My .inf installs mf.sys for
the PCI Device and Vendor ID and currently enumerates one
function. When the driver is installed for that function,
I see the Filter Resource IRP but never receive the Start
Device IRP. The driver fails to start and indicates it
can not find enough free resources and to restart.
Restarting does not help still gives same error.

Any thoughts or ideas on what could be going wrong?
Why does mf.sys effect allocating new resources?

I did notice that the resource list is not the same
between the two cases. The actual memory and IRQ regions
are identical but the standalone driver has some Private
Data (Type 0x81) entries as well.

Thanks,

Stefan L

RE: IRP FilterResourceReq. and mf.sys not working by johnei

johnei
Thu Dec 11 10:47:03 CST 2003

------=_NextPart_0001_43588E17
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Stefan

The DDK specialist most familiar with this area is not able to respond at
this time. You should receive a response by close of business on Friday,
Pacific time.

Thank you for choosing the MSDN Managed Newsgroups,

John Eikanger
Microsoft Developer Support

This posting is provided ?AS IS? with no warranties, and confers no rights.
"Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer?s security."
--------------------
Content-Class: urn:content-classes:message
From: "Stefan L" <stefanatnospam@technobox.com>
Sender: "Stefan L" <stefanatnospam@technobox.com>
Subject: IRP FilterResourceReq. and mf.sys not working
Date: Tue, 9 Dec 2003 08:56:32 -0800
X-Tomcat-NG: microsoft.public.development.device.drivers

The problem I am seeing is that my driver successfully
requests new PCI memory in the Filter Resource IRP when
installed directly but fails when installed through
MIcorsofts multifunction mf.sys.

I need to allocate an additional PCI Memory Region for a
driver to fix a HW config problem. Support Win2000 and
later, testing on Win XP.

In the IRP_MN_FILTER_RESOURCE_REQUIREMENTS, I allocate
memory for a new IO_RESOURCE_REQUIREMENTS_LIST, copy the
existing list to the new one, append the new memory region
to the end, update count and size, clear and free existing
list, link the new one into the IRP, and pass the IRP down.

When I install this driver directly for the PCI
Vendor/Device ID it works. In the Start Device IRP I see
the original resources plus the new resource that I have
allocated. After installing, in the Driver Properties
Resource Tab, I see the original resources plus the new
resource. Driver works fine.

The problem comes when I use multifunction mf.sys to
enumerate the functions and install the exact same driver
in the enumerated function. My .inf installs mf.sys for
the PCI Device and Vendor ID and currently enumerates one
function. When the driver is installed for that function,
I see the Filter Resource IRP but never receive the Start
Device IRP. The driver fails to start and indicates it
can not find enough free resources and to restart.
Restarting does not help still gives same error.

Any thoughts or ideas on what could be going wrong?
Why does mf.sys effect allocating new resources?

I did notice that the resource list is not the same
between the two cases. The actual memory and IRQ regions
are identical but the standalone driver has some Private
Data (Type 0x81) entries as well.

Thanks,

Stefan L


------=_NextPart_0001_43588E17
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 Hi, Stefan
\par
\par The DDK specialist most familiar with this area is not able to respond at this time. You should receive a response by close of business on Friday, Pacific time.
\par
\par Thank you for choosing the MSDN Managed Newsgroups,
\par
\par John Eikanger
\par Microsoft Developer Support
\par
\par This posting is provided \ldblquote AS IS\rdblquote with no warranties, and confers no rights.
\par "Microsoft highly recommends to all of our customers that they visit the http://www.microsoft.com/protect site and perform the three straightforward steps listed to improve your computer\rquote s security."
\par \pard\li720 --------------------
\par Content-Class: urn:content-classes:message
\par From: "Stefan L" <stefanatnospam@technobox.com>
\par Sender: "Stefan L" <stefanatnospam@technobox.com>
\par Subject: IRP FilterResourceReq. and mf.sys not working
\par Date: Tue, 9 Dec 2003 08:56:32 -0800
\par X-Tomcat-NG: microsoft.public.development.device.drivers
\par
\par The problem I am seeing is that my driver successfully
\par requests new PCI memory in the Filter Resource IRP when
\par installed directly but fails when installed through
\par MIcorsofts multifunction mf.sys.
\par
\par I need to allocate an additional PCI Memory Region for a
\par driver to fix a HW config problem. Support Win2000 and
\par later, testing on Win XP.
\par
\par In the IRP_MN_FILTER_RESOURCE_REQUIREMENTS, I allocate
\par memory for a new IO_RESOURCE_REQUIREMENTS_LIST, copy the
\par existing list to the new one, append the new memory region
\par to the end, update count and size, clear and free existing
\par list, link the new one into the IRP, and pass the IRP down.
\par
\par When I install this driver directly for the PCI
\par Vendor/Device ID it works. In the Start Device IRP I see
\par the original resources plus the new resource that I have
\par allocated. After installing, in the Driver Properties
\par Resource Tab, I see the original resources plus the new
\par resource. Driver works fine.
\par
\par The problem comes when I use multifunction mf.sys to
\par enumerate the functions and install the exact same driver
\par in the enumerated function. My .inf installs mf.sys for
\par the PCI Device and Vendor ID and currently enumerates one
\par function. When the driver is installed for that function,
\par I see the Filter Resource IRP but never receive the Start
\par Device IRP. The driver fails to start and indicates it
\par can not find enough free resources and to restart.
\par Restarting does not help still gives same error.
\par
\par Any thoughts or ideas on what could be going wrong?
\par Why does mf.sys effect allocating new resources?
\par
\par I did notice that the resource list is not the same
\par between the two cases. The actual memory and IRQ regions
\par are identical but the standalone driver has some Private
\par Data (Type 0x81) entries as well.
\par
\par Thanks,
\par
\par Stefan L
\par
\par \pard
\par
\par }
------=_NextPart_0001_43588E17--


RE: IRP FilterResourceReq. and mf.sys not working by DougHowe

DougHowe
Fri Dec 12 16:42:53 CST 2003

------=_NextPart_0001_49C4C76B
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hello,

It would be helpful to compare the debug PnP output for the success and
failure cases.

After you install a checked build of the kernel and HAL, you can enable
debug PnP output either via WinDbg or from editing the registry:

Enabling PnP debug output from Windbg:
ed NT!Kd_NTOSPNP_Mask 0xFFFFFFFF
ed NT!Kd_PNPMGR_Mask 0xFFFFFFFF

Enabling PnP debug output using the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Debug
Print Filter
NTOSPNP = REG_DWORD: 0xFFFFFFFF
PNPMGR = REG_DWORD: 0xFFFFFFFF

I would be interested in helping you compare the logs, in order to identify
what might be happening in the MF case.

Regards,
Doug Howe
Microsoft DDK Support
doughowe@microsoft.com


This posting is provided "AS IS" with no warranties, and confers no rights.
------=_NextPart_0001_49C4C76B
Content-Type: text/x-rtf
Content-Transfer-Encoding: 7bit

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\f0\fs20 Hello,
\par
\par It would be helpful to compare the debug PnP output for the success and failure cases.
\par
\par After you install a checked build of the kernel and HAL, you can enable debug PnP output either via WinDbg or from editing the registry:
\par
\par Enabling PnP debug output from Windbg:
\par ed NT!Kd_NTOSPNP_Mask 0xFFFFFFFF
\par ed NT!Kd_PNPMGR_Mask 0xFFFFFFFF
\par
\par Enabling PnP debug output using the registry:
\par HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Debug Print Filter
\par NTOSPNP = REG_DWORD: 0xFFFFFFFF
\par PNPMGR = REG_DWORD: 0xFFFFFFFF
\par
\par I would be interested in helping you compare the logs, in order to identify what might be happening in the MF case.
\par
\par Regards,
\par Doug Howe
\par Microsoft DDK Support
\par doughowe@microsoft.com
\par
\par
\par This posting is provided "AS IS" with no warranties, and confers no rights.
\par }
------=_NextPart_0001_49C4C76B--


Re: IRP FilterResourceReq. and mf.sys not working by Mark

Mark
Fri Dec 12 18:21:57 CST 2003

Just a thought: have you tried filtering below mf.sys rather than
below your function driver enumerated off of mf.sys?


On Thu, 11 Dec 2003 16:47:03 GMT, johnei@online.microsoft.com ("John
Eikanger [MSFT]") wrote:

>Hi, Stefan
>
>The DDK specialist most familiar with this area is not able to respond at
>this time. You should receive a response by close of business on Friday,
>Pacific time.
>
>Thank you for choosing the MSDN Managed Newsgroups,
>
>John Eikanger
>Microsoft Developer Support
>
>This posting is provided ?AS IS? with no warranties, and confers no rights.
>"Microsoft highly recommends to all of our customers that they visit the
>http://www.microsoft.com/protect site and perform the three straightforward
>steps listed to improve your computer?s security."
>--------------------
>Content-Class: urn:content-classes:message
>From: "Stefan L" <stefanatnospam@technobox.com>
>Sender: "Stefan L" <stefanatnospam@technobox.com>
>Subject: IRP FilterResourceReq. and mf.sys not working
>Date: Tue, 9 Dec 2003 08:56:32 -0800
>X-Tomcat-NG: microsoft.public.development.device.drivers
>
>The problem I am seeing is that my driver successfully
>requests new PCI memory in the Filter Resource IRP when
>installed directly but fails when installed through
>MIcorsofts multifunction mf.sys.
>
>I need to allocate an additional PCI Memory Region for a
>driver to fix a HW config problem. Support Win2000 and
>later, testing on Win XP.
>
>In the IRP_MN_FILTER_RESOURCE_REQUIREMENTS, I allocate
>memory for a new IO_RESOURCE_REQUIREMENTS_LIST, copy the
>existing list to the new one, append the new memory region
>to the end, update count and size, clear and free existing
>list, link the new one into the IRP, and pass the IRP down.
>
>When I install this driver directly for the PCI
>Vendor/Device ID it works. In the Start Device IRP I see
>the original resources plus the new resource that I have
>allocated. After installing, in the Driver Properties
>Resource Tab, I see the original resources plus the new
>resource. Driver works fine.
>
>The problem comes when I use multifunction mf.sys to
>enumerate the functions and install the exact same driver
>in the enumerated function. My .inf installs mf.sys for
>the PCI Device and Vendor ID and currently enumerates one
>function. When the driver is installed for that function,
>I see the Filter Resource IRP but never receive the Start
>Device IRP. The driver fails to start and indicates it
>can not find enough free resources and to restart.
>Restarting does not help still gives same error.
>
>Any thoughts or ideas on what could be going wrong?
>Why does mf.sys effect allocating new resources?
>
>I did notice that the resource list is not the same
>between the two cases. The actual memory and IRQ regions
>are identical but the standalone driver has some Private
>Data (Type 0x81) entries as well.
>
>Thanks,
>
>Stefan L




=====================
Mark Roddy
Windows XP/2000/NT Consulting, Microsoft DDK MVP
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com
For Windows Device Driver Training: see www.azius.com