A WDM lower edge NDIS driver will not init

I am writing an NDIS miniport driver, with a WDM as its lower edge. (I have a very specific driver for my lower edge that was written here.) NDIS calls in DriverEntry all return success, but the result is error 1058: “The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.”

What’s missing?

I am new to NDIS and new to .INF, which doesn’t help.

Andy

How did you install the driver? Using devcon install or Add New
Hardware Wizard? Is your NDIS device enumerated by some hardware or is
it virtual? If virtual, did you create a root devnode for it?

d

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

I am writing an NDIS miniport driver, with a WDM as its lower edge. (I
have a very specific driver for my lower edge that was written here.)
NDIS calls in DriverEntry all return success, but the result is error
1058: “The service cannot be started, either because it is disabled or
because it has no enabled devices associated with it.”

What’s missing?

I am new to NDIS and new to .INF, which doesn’t help.

Andy


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

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

>>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=256

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

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

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

>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=256

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


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