From: sudheer on
Hi

Can any one please explain the communication between NDISEDGE driver
and PCIDriver sample codes.

I mean
1. How they are interlinked for tranferring data.

2. How NDISEDGE driver gets NextDevice object as PCIDriver stack when
called with NdisMGetDeviceProperty () in MiniPortInitialize () without
registering the PCI device with NdisMRegisterDevice () function ?.

3. Will NdisMInitializeWrapper () loads PCI device object ? (and
NdisMRegisterMiniport () registers some of the entry point functions
of NDIS library, if i am not wrong)

4. Will the use of NdisMRegisterDevice () is only for intermediate
( pass thru ) NDIS drivers ?

I have found that in PCIDrv.h there are function prototypes like
DRIVER_INITIALIZE and EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL. But these
types are not documented any where (AFAIK) (Please point me where can
i find these types in ddk/wdk).

>From google seach, came to know that these prototypes are used when
accessing NextDevice member of _DEVICE_OBJECT. Is this correct? How it
will effect if i declare it normally with just NTSTATUS return type.
Cant i get the device object ?

How can we configure SDIO device in NDISEDGE driver after getting the
deviceobject NdisMGetDeviceProperty (). as SDIO driver uses only
SdBusSubmitRequest () not IoCallDriver as in USB.

As i am new to drivers, some of the above questions may be very basic.
Please let me know

Thanks & Regards
Sudheer


From: Stephan Wolf [MVP] on
If you get no answer, try and open a new thread with NDISEDGE in the
subject.

HTH, Stephan
---
On May 18, 11:05 am, sudheer <sudheer.papo...(a)gmail.com> wrote:
> Hi
>
> Can any one please explain the communication between NDISEDGE driver
> and PCIDriver sample codes.
>
> I mean
> 1. How they are interlinked for tranferring data.
>
> 2. How NDISEDGE driver gets NextDevice object as PCIDriver stack when
> called with NdisMGetDeviceProperty () in MiniPortInitialize () without
> registering the PCI device with NdisMRegisterDevice () function ?.
>
> 3. Will NdisMInitializeWrapper () loads PCI device object ? (and
> NdisMRegisterMiniport () registers some of the entry point functions
> of NDIS library, if i am not wrong)
>
> 4. Will the use of NdisMRegisterDevice () is only for intermediate
> ( pass thru ) NDIS drivers ?
>
> I have found that in PCIDrv.h there are function prototypes like
> DRIVER_INITIALIZE and EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL. But these
> types are not documented any where (AFAIK) (Please point me where can
> i find these types in ddk/wdk).
>
> >From google seach, came to know that these prototypes are used when
>
> accessing NextDevice member of _DEVICE_OBJECT. Is this correct? How it
> will effect if i declare it normally with just NTSTATUS return type.
> Cant i get the device object ?
>
> How can we configure SDIO device in NDISEDGE driver after getting the
> deviceobject NdisMGetDeviceProperty (). as SDIO driver uses only
> SdBusSubmitRequest () not IoCallDriver as in USB.
>
> As i am new to drivers, some of the above questions may be very basic.
> Please let me know
>
> Thanks & Regards
> Sudheer


From: Stephan Wolf [MVP] on
If you still get no answer, try and email the developer of NDISEDGE
and most other NDIS samples in the DDK:

Eliyas Yakub <eliyasy(a)microsoft.com>

Eliyas is usually very responsive. Get back to me if you get no answer
from him.

Stephan
---
On May 21, 12:06 pm, "Stephan Wolf [MVP]" <stew...(a)hotmail.com> wrote:
> If you get no answer, try and open a new thread with NDISEDGE in the
> subject.
>
> HTH, Stephan
> ---
> On May 18, 11:05 am, sudheer <sudheer.papo...(a)gmail.com> wrote:
>
>
>
> > Hi
>
> > Can any one please explain the communication between NDISEDGE driver
> > and PCIDriver sample codes.
>
> > I mean
> > 1. How they are interlinked for tranferring data.
>
> > 2. How NDISEDGE driver gets NextDevice object as PCIDriver stack when
> > called with NdisMGetDeviceProperty () in MiniPortInitialize () without
> > registering the PCI device with NdisMRegisterDevice () function ?.
>
> > 3. Will NdisMInitializeWrapper () loads PCI device object ? (and
> > NdisMRegisterMiniport () registers some of the entry point functions
> > of NDIS library, if i am not wrong)
>
> > 4. Will the use of NdisMRegisterDevice () is only for intermediate
> > ( pass thru ) NDIS drivers ?
>
> > I have found that in PCIDrv.h there are function prototypes like
> > DRIVER_INITIALIZE and EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL. But these
> > types are not documented any where (AFAIK) (Please point me where can
> > i find these types in ddk/wdk).
>
> > >From google seach, came to know that these prototypes are used when
>
> > accessing NextDevice member of _DEVICE_OBJECT. Is this correct? How it
> > will effect if i declare it normally with just NTSTATUS return type.
> > Cant i get the device object ?
>
> > How can we configure SDIO device in NDISEDGE driver after getting the
> > deviceobject NdisMGetDeviceProperty (). as SDIO driver uses only
> > SdBusSubmitRequest () not IoCallDriver as in USB.
>
> > As i am new to drivers, some of the above questions may be very basic.
> > Please let me know
>
> > Thanks & Regards
> > Sudheer- Hide quoted text -
>
> - Show quoted text -

From: Don Burn on
Comments inline;
"sudheer" <sudheer.papothi(a)gmail.com> wrote in message
news:1179479147.760691.96160(a)k79g2000hse.googlegroups.com...
> Hi
>
> Can any one please explain the communication between NDISEDGE driver
> and PCIDriver sample codes.
>
> I mean
> 1. How they are interlinked for tranferring data.

The NDISEDGE driver sends IRP's to the lower driver using standard WDF
calls, for instance the routine NICPostWriteRequest is the packet send.

>
> 2. How NDISEDGE driver gets NextDevice object as PCIDriver stack when
> called with NdisMGetDeviceProperty () in MiniPortInitialize () without
> registering the PCI device with NdisMRegisterDevice () function ?.

Look at NdisMRegisterDevice in DriverEntry
>
> 3. Will NdisMInitializeWrapper () loads PCI device object ? (and
> NdisMRegisterMiniport () registers some of the entry point functions
> of NDIS library, if i am not wrong)

No the driver is loaded because of the INX file, which attaches it to the
stack with the device object from PCIDRV below it.

>
> 4. Will the use of NdisMRegisterDevice () is only for intermediate
> ( pass thru ) NDIS drivers ?
>
> I have found that in PCIDrv.h there are function prototypes like
> DRIVER_INITIALIZE and EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL. But these
> types are not documented any where (AFAIK) (Please point me where can
> i find these types in ddk/wdk).

The DRIVER_INITIALIZE is a type declaration for DriverEntry, this approach
is being done to support the static analysis tools such as PreFast.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply





From: sudheer on
Thanks Stephan and Don for your kind support.

Few more Queries:

1. In INF file, what should be the value of the BusType for SD bus
(as the BusType = 5 for PCI Bus)

2. There are different interface types provided by Microsoft as
follows

#define NIC_INTERFACE_TYPE NdisInterfaceInternal
#define NIC_INTERFACE_TYPE NdisInterfacePci
#define NIC_INTERFACE_TYPE NdisInterfacePcMcia
#define NIC_INTERFACE_TYPE NdisInterfaceTurboChannel
#define NIC_INTERFACE_TYPE NdisInterfaceMca
#define NIC_INTERFACE_TYPE NdisInterfaceEisa
#define NIC_INTERFACE_TYPE NdisInterfaceIsa
#define NIC_INTERFACE_TYPE NdisInterfacePcMcia

Which of the above NIC_INTERFACE_TYPE is used for SD Bus ?