FW: RE: A WDM lower edge NDIS driver will not init

… and now I know the statement is wrong. The very fine PCIDRV sample on
the DDK demonstrates exactly how to build a WDM driver which loads an NDIS
Miniport as an upper filter.

'Ya learn something every day. My appologies to Elias (& others) who took
the time to write it. I should have seen that one earlier.

-dave

-----Original Message-----
From: David R. Cattley [mailto:xxxxx@msn.com]=20
Sent: Thursday, July 12, 2007 9:53 PM
To: ‘Windows System Software Devs Interest List’
Subject: RE: [ntdev] A WDM lower edge NDIS driver will not init

>I don’t think NDIS Miniports can be anything other than the FDO=20

Ignore that remark because I cannot find where I would have got that idea
from. It may be true but I don’t know it to be so. I have not ever
knowingly made an NDIS Minport an upper filter on a device stack but I
surely don’t know that it cannot be done.

-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Thursday, July 12, 2007 9:24 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] A WDM lower edge NDIS driver will not init

=20

>My new driver is virtual (I think). It attaches to a WDM driver
below.
Eventually I will have 4 copies, because there are 4 cards beyond that
driver.

This sounds like you are expecting that independent NDIS Miniports will be
created for each “copy”. How many bus enumerated PDOs are there for the
four cards? Four? One?

I don’t think NDIS Miniports can be anything other than the FDO for a device
stack so consider the possbility that either:

  1. Your current WDM driver needs to be an enumerator to create (a) new
    PDO(s) for the NDIS Miniport to become the FDO for

-or-

  1. The NDIS Miniport needs to be the FDO and you current WDM driver needs
    to be a lower filter to your miniport (to get between the Miniport and the
    PDO).

A whole lot of what the right thing to do will be based on what you hardware
really looks like to the bus (driver) that enumerates it and what you mean
by “attach” in the statement

> It attaches to a WDM driver below.

None the less, asking an NDIS Miniport driver to ‘start’ when NDIS does not
have a PDO to attach it to is a bit of a no-op. The only way you get called
at MiniportInitialize() is if NDIS is asked (after taking over the
DRIVER_OBJECT) to AddDevice() an FDO for some PnP Device Stack.

Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@schange.com
Sent: Thursday, July 12, 2007 8:55 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] A WDM lower edge NDIS driver will not init

The driver was installed with DevCon and OsrLoader. DevCon just leaves
error 31, “A device attached to the system is not functioning.”
OsrLoader is more specific.

I call NdisMInitializeWrapper and NdisMRegisterMiniport, after setting
various characteristics. I do NOT get called back at my initialize handler.

My new driver is virtual (I think). It attaches to a WDM driver below.
Eventually I will have 4 copies, because there are 4 cards beyond that
driver.

How do I create a root devnode for it? I found nothing in the documentation
about making root devnodes. Do I use the .INF, or do I program something in
C?

I am currently running as a NDIS 5.0 driver, though it wouldn’t be hard for
me to make it 5.1. I get more out of 5.0 now.

Andy


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=3D256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=3DListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=3D256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=3DListServer

PCIDRV is also a good example of using WPP tracing.

What is “good” is that a simple change of one definition in the SOURCES file
allows the DebugPrint macro to either generate ordinary debugger messages
OR WPP trace messages.

Thomas F. Divine

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-293589-
xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Thursday, July 12, 2007 10:02 PM
To: Windows System Software Devs Interest List
Subject: FW: RE: [ntdev] A WDM lower edge NDIS driver will not init

… and now I know the statement is wrong. The very fine PCIDRV
sample on
the DDK demonstrates exactly how to build a WDM driver which loads an
NDIS
Miniport as an upper filter.

'Ya learn something every day. My appologies to Elias (& others) who
took
the time to write it. I should have seen that one earlier.

-dave

-----Original Message-----
From: David R. Cattley [mailto:xxxxx@msn.com]=20
Sent: Thursday, July 12, 2007 9:53 PM
To: ‘Windows System Software Devs Interest List’
Subject: RE: [ntdev] A WDM lower edge NDIS driver will not init

>>I don’t think NDIS Miniports can be anything other than the FDO=20

Ignore that remark because I cannot find where I would have got that
idea
from. It may be true but I don’t know it to be so. I have not ever
knowingly made an NDIS Minport an upper filter on a device stack but I
surely don’t know that it cannot be done.

-dave

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of David R. Cattley
Sent: Thursday, July 12, 2007 9:24 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] A WDM lower edge NDIS driver will not init

=20
>>My new driver is virtual (I think). It attaches to a WDM driver
below.
Eventually I will have 4 copies, because there are 4 cards beyond that
driver.

This sounds like you are expecting that independent NDIS Miniports will
be
created for each “copy”. How many bus enumerated PDOs are there for
the
four cards? Four? One?

I don’t think NDIS Miniports can be anything other than the FDO for a
device
stack so consider the possbility that either:

  1. Your current WDM driver needs to be an enumerator to create (a) new
    PDO(s) for the NDIS Miniport to become the FDO for

-or-

  1. The NDIS Miniport needs to be the FDO and you current WDM driver
    needs
    to be a lower filter to your miniport (to get between the Miniport and
    the
    PDO).

A whole lot of what the right thing to do will be based on what you
hardware
really looks like to the bus (driver) that enumerates it and what you
mean
by “attach” in the statement

>> It attaches to a WDM driver below.

None the less, asking an NDIS Miniport driver to ‘start’ when NDIS does
not
have a PDO to attach it to is a bit of a no-op. The only way you get
called
at MiniportInitialize() is if NDIS is asked (after taking over the
DRIVER_OBJECT) to AddDevice() an FDO for some PnP Device Stack.

Good Luck,
Dave Cattley
Consulting Engineer
Systems Software Development

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@schange.com
Sent: Thursday, July 12, 2007 8:55 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] A WDM lower edge NDIS driver will not init

The driver was installed with DevCon and OsrLoader. DevCon just leaves
error 31, “A device attached to the system is not functioning.”
OsrLoader is more specific.

I call NdisMInitializeWrapper and NdisMRegisterMiniport, after setting
various characteristics. I do NOT get called back at my initialize
handler.

My new driver is virtual (I think). It attaches to a WDM driver below.
Eventually I will have 4 copies, because there are 4 cards beyond that
driver.

How do I create a root devnode for it? I found nothing in the
documentation
about making root devnodes. Do I use the .INF, or do I program
something in
C?

I am currently running as a NDIS 5.0 driver, though it wouldn’t be hard
for
me to make it 5.1. I get more out of 5.0 now.

Andy


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=3D256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=3DListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=3D256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=3DListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer