Hi all,

If I want to send a URB, followed by Oney's book : Chapter12 - "Working with
the Bus Driver" - function SendAwaitUrb(), I should call
IoBuildDeviceIoControlRequest (IOCTL_INTERNAL_USB_SUBMIT_URB, pdx ->
LowerDeviceObject, ...).
But now I want to send URB from a NDIS-WDM miniport driver, actually, I'm
trying to modify the DDK sample "ndiswdm" which made by Eliyas, how can I
get the "LowerDeviceObject" in the ndis miniport driver?


Many thanks in advance,
Barry

Re: How to get "LowerDeviceObject" in NDIS-WDM driver? by Eliyas

Eliyas
Sat May 29 16:55:26 CDT 2004

Take little time to study the sample code and you will get the answer. Look
for NdisMGetDeviceProperty.

--
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.




"Barry" <gubaoqiang@263.net> wrote in message
news:%23Y7W3oYREHA.3124@TK2MSFTNGP12.phx.gbl...
> Hi all,
>
> If I want to send a URB, followed by Oney's book : Chapter12 - "Working
with
> the Bus Driver" - function SendAwaitUrb(), I should call
> IoBuildDeviceIoControlRequest (IOCTL_INTERNAL_USB_SUBMIT_URB, pdx ->
> LowerDeviceObject, ...).
> But now I want to send URB from a NDIS-WDM miniport driver, actually, I'm
> trying to modify the DDK sample "ndiswdm" which made by Eliyas, how can I
> get the "LowerDeviceObject" in the ndis miniport driver?
>
>
> Many thanks in advance,
> Barry
>
>



Re: How to get "LowerDeviceObject" in NDIS-WDM driver? by Barry

Barry
Mon May 31 08:44:20 CDT 2004

Got it, thanks.

But there is another question: why call NICSendRequest with parameter
(NdisRequestQueryInformation, OID_GEN_LINK_SPEED) in NICInitAdapterWorker()?
I think it only work with NDISPROT protocol, for my irda-usb adapter driver,
I don't have to get the link speed here, am I right?

"Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> worte in message
news:OyU8becREHA.904@TK2MSFTNGP12.phx.gbl...
> Take little time to study the sample code and you will get the answer.
Look
> for NdisMGetDeviceProperty.
>
> --
> --
> -Eliyas
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
>
>
> "Barry" <gubaoqiang@263.net> wrote in message
> news:%23Y7W3oYREHA.3124@TK2MSFTNGP12.phx.gbl...
> > Hi all,
> >
> > If I want to send a URB, followed by Oney's book : Chapter12 - "Working
> with
> > the Bus Driver" - function SendAwaitUrb(), I should call
> > IoBuildDeviceIoControlRequest (IOCTL_INTERNAL_USB_SUBMIT_URB, pdx ->
> > LowerDeviceObject, ...).
> > But now I want to send URB from a NDIS-WDM miniport driver, actually,
I'm
> > trying to modify the DDK sample "ndiswdm" which made by Eliyas, how can
I
> > get the "LowerDeviceObject" in the ndis miniport driver?
> >
> >
> > Many thanks in advance,
> > Barry
> >
> >
>
>



Re: How to get "LowerDeviceObject" in NDIS-WDM driver? by Barry

Barry
Mon May 31 11:42:54 CDT 2004

Dear Eliyas,
I have removed all NICSendRequest() from NICInitAdapterWorker(), I think
it's okay.

But now I found I ended up in a never ending loop: the
NICPostReadsWorkItemCallBack() and NICPostReadRequest() will run in a loop
until I unplug the usb device, and the OS respond every single operation
really slowly. I have read the ndiswdm.htm file about "Receive Packet
handler", but still no idea how to interrupt the loop.

Sorry for disturbing you so much, but I only got four weeks to finish the
driver, and I have spent one week on reading documents, and before that I
know nothing about NDIS driver. Please kindly answer the questions, I will
do my best to study the sample code though.

Thank you very much.
Barry


"Barry" <gubaoqiang@263.net> wrote in message
news:Ok3hETxREHA.2716@tk2msftngp13.phx.gbl...
> Got it, thanks.
>
> But there is another question: why call NICSendRequest with parameter
> (NdisRequestQueryInformation, OID_GEN_LINK_SPEED) in
NICInitAdapterWorker()?
> I think it only work with NDISPROT protocol, for my irda-usb adapter
driver,
> I don't have to get the link speed here, am I right?
>
> "Eliyas Yakub [MSFT]" <eliyasy@online.microsoft.com> worte in message
> news:OyU8becREHA.904@TK2MSFTNGP12.phx.gbl...
> > Take little time to study the sample code and you will get the answer.
> Look
> > for NdisMGetDeviceProperty.
> >
> > --
> > --
> > -Eliyas
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> >
> >
> > "Barry" <gubaoqiang@263.net> wrote in message
> > news:%23Y7W3oYREHA.3124@TK2MSFTNGP12.phx.gbl...
> > > Hi all,
> > >
> > > If I want to send a URB, followed by Oney's book : Chapter12 -
"Working
> > with
> > > the Bus Driver" - function SendAwaitUrb(), I should call
> > > IoBuildDeviceIoControlRequest (IOCTL_INTERNAL_USB_SUBMIT_URB, pdx ->
> > > LowerDeviceObject, ...).
> > > But now I want to send URB from a NDIS-WDM miniport driver, actually,
> I'm
> > > trying to modify the DDK sample "ndiswdm" which made by Eliyas, how
can
> I
> > > get the "LowerDeviceObject" in the ndis miniport driver?
> > >
> > >
> > > Many thanks in advance,
> > > Barry
> > >
> > >
> >
> >
>
>



Re: How to get "LowerDeviceObject" in NDIS-WDM driver? by Eliyas

Eliyas
Wed Jun 02 13:08:30 CDT 2004

>
> But now I found I ended up in a never ending loop: the
> NICPostReadsWorkItemCallBack() and NICPostReadRequest() will run in a loop
> until I unplug the usb device,

Only reason for this call to end up in a tight loop would be if the lower
driver completes the read request *successfully* as soon as it arrives. This
seems unlikely. Check the IRP buffers & status value in a debugger to see if
the USB stack returned any useful data.

--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/hwdev/driver/kb-drv.mspx