OID_GEN_LINK_SPEED in NDIS miniport

I have a few questions hope somebody knows about them…

1 - I have a dummy NDIS miniport which is causing system crash at load time.
This happens right after my MiniportQueryInformation() receives
OID_GEN_LINK_SPEED twice. What is confusing me is
why this OID is being sent twice in a row. Since the driver is without a
hardware I am returning success with 10*10000 value I saw e100bex (a sample
ndis miniport in win2k ddk) returning at startup. Is this OID normally called
twice ? Why ?

2 - Also I am passing ‘NdisInterfaceInternal’ to the NdisMSetAttributesEx call
(in my MiniportInitialize() routine )…where people would normally use
NdisInterfacePci if the underlying bus is PCI. Is it a correct use ?

3- Is it possible to break into the driver while its in DriverEntry using
windbg ?

Thanks for any help/comments.

Hassan


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

You shouldn’t receive that twice, AFAIK. Check you’re
storing the value where it expects, and returning success.
And not falling through a case statement to the next
OID’s instructions. (Like I did. :slight_smile:

Hmm. An Intermediate driver (which yours technically is)
should pass ‘0’ for the bus type, I think. It should
mention that in the DDK.

a)Either DbgBreakPoint() in DriverEntry or
b)‘bp mydriver!DriverEntry’ in windbg, before your driver
loads. (IE At initial breakpoint time if you’re loading
with the system) You may get ‘deferred breakpoint’
warning but that’s actually good. When your module loads,
the location will be resolves.

Note that b) requires windbg to be able to find your
symbols. And both require that you’re kernel debugging
with windbg (IE serial cable style)

=========================================================
Paul “TBBle” Hampson
xxxxx@Pobox.Com

Even a mosquito doesn’t get a slap
on the back until it starts to work.

Random signature generator 2.0 by TBBle

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Hassan Khan
Sent: Tuesday, 13 March 2001 1:51
To: NT Developers Interest List
Subject: [ntdev] OID_GEN_LINK_SPEED in NDIS miniport

I have a few questions hope somebody knows about them…

1 - I have a dummy NDIS miniport which is causing system crash at
load time.
This happens right after my MiniportQueryInformation() receives
OID_GEN_LINK_SPEED twice. What is confusing me is
why this OID is being sent twice in a row. Since the driver is without a
hardware I am returning success with 10*10000 value I saw
e100bex (a sample
ndis miniport in win2k ddk) returning at startup. Is this OID
normally called
twice ? Why ?

2 - Also I am passing ‘NdisInterfaceInternal’ to the
NdisMSetAttributesEx call
(in my MiniportInitialize() routine )…where people would normally use
NdisInterfacePci if the underlying bus is PCI. Is it a correct use ?

3- Is it possible to break into the driver while its in DriverEntry using
windbg ?

Thanks for any help/comments.

Hassan


You are currently subscribed to ntdev as: xxxxx@Pobox.Com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

The ODI for speed is called many times in a row, infact I see it upto 15
times in a row.
This is beacuse the hardware is not always ready and the values can change,
when it finds that the numbers being returned are consistent
it stops querying. ( this is what I have seen )

U can try passing 0 to the interface.

Yes u can break into the driver entry.

Ramit.
----- Original Message -----
From: Hassan Khan
To: NT Developers Interest List
Sent: Tuesday, March 13, 2001 8:21 AM
Subject: [ntdev] OID_GEN_LINK_SPEED in NDIS miniport

I have a few questions hope somebody knows about them…

1 - I have a dummy NDIS miniport which is causing system crash at load time.
This happens right after my MiniportQueryInformation() receives
OID_GEN_LINK_SPEED twice. What is confusing me is
why this OID is being sent twice in a row. Since the driver is without a
hardware I am returning success with 10*10000 value I saw e100bex (a sample
ndis miniport in win2k ddk) returning at startup. Is this OID normally
called
twice ? Why ?

2 - Also I am passing ‘NdisInterfaceInternal’ to the NdisMSetAttributesEx
call
(in my MiniportInitialize() routine )…where people would normally use
NdisInterfacePci if the underlying bus is PCI. Is it a correct use ?

3- Is it possible to break into the driver while its in DriverEntry using
windbg ?

Thanks for any help/comments.

Hassan


You are currently subscribed to ntdev as: xxxxx@wipro.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Thanks a bunch for responding guys. I tested with another working NDIS driver
and found that OID_GEN_LINK_SPEED can be called
multiple times. Its subject to the whims of NDIS library or the protocol
driver up there but surely not my big concern.
My problem is still not resolved though. My MiniportQueryInformation( )
returns fine (before the exception) with everything right but later somewhere
inside the
OS an exception 0xC0000005 is generated. It looks like below:

“exception c0000005@00000000 caught in fastio.c: 1536”

I can’t figure out what is it that I can do wrong. There is so little code
here and I am honestly filling the number of bytes exactly equal to what I am
actually writing to InformationBuffer field and returning
status = NDIS_STATUS_SUCCESS each time I do that.

Surely not a good place to stuck so early in my development of miniport driver
! : )

thanks for your help/comments:
Hassan

Paul "TBBle" Hampson wrote:

1)You shouldn’t receive that twice, AFAIK. Check you’re
storing the value where it expects, and returning success.
And not falling through a case statement to the next
OID’s instructions. (Like I did. :slight_smile:

Hmm. An Intermediate driver (which yours technically is)
should pass ‘0’ for the bus type, I think. It should
mention that in the DDK.

a)Either DbgBreakPoint() in DriverEntry or
b)‘bp mydriver!DriverEntry’ in windbg, before your driver
loads. (IE At initial breakpoint time if you’re loading
with the system) You may get ‘deferred breakpoint’
warning but that’s actually good. When your module loads,
the location will be resolves.

Note that b) requires windbg to be able to find your
symbols. And both require that you’re kernel debugging
with windbg (IE serial cable style)

=========================================================
Paul “TBBle” Hampson
xxxxx@Pobox.Com

Even a mosquito doesn’t get a slap
on the back until it starts to work.

Random signature generator 2.0 by TBBle

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Hassan Khan
> Sent: Tuesday, 13 March 2001 1:51
> To: NT Developers Interest List
> Subject: [ntdev] OID_GEN_LINK_SPEED in NDIS miniport
>
>
> I have a few questions hope somebody knows about them…
>
> 1 - I have a dummy NDIS miniport which is causing system crash at
> load time.
> This happens right after my MiniportQueryInformation() receives
> OID_GEN_LINK_SPEED twice. What is confusing me is
> why this OID is being sent twice in a row. Since the driver is without a
> hardware I am returning success with 10*10000 value I saw
> e100bex (a sample
> ndis miniport in win2k ddk) returning at startup. Is this OID
> normally called
> twice ? Why ?
>
> 2 - Also I am passing ‘NdisInterfaceInternal’ to the
> NdisMSetAttributesEx call
> (in my MiniportInitialize() routine )…where people would normally use
> NdisInterfacePci if the underlying bus is PCI. Is it a correct use ?
>
> 3- Is it possible to break into the driver while its in DriverEntry using
> windbg ?
>
> Thanks for any help/comments.
>
> Hassan
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@Pobox.Com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>


You are currently subscribed to ntdev as: xxxxx@trimedia.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com