Two UMDF drivers in device stack

Hi,
I have a requirement to have two UMDF drivers in device stack. Generally IO
request can be forwarded to low level driver pdo. Is there way I can pass
request to low level UMDF driver through device handle and ioctl calls?
Thanks,
Krishna.

What bigger problem are you trying to solve? Do you author both drivers or are you trying to reuse a third party driver?

d

Bent from my phone


From: s.v.krishna reddymailto:xxxxx
Sent: ?9/?10/?2014 10:38 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Two UMDF drivers in device stack

Hi,
I have a requirement to have two UMDF drivers in device stack. Generally IO request can be forwarded to low level driver pdo. Is there way I can pass request to low level UMDF driver through device handle and ioctl calls?
Thanks,
Krishna.

— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

I have a generic umdf device driver for USB devices by sending ioctl to win
usb using win usb library. Driver has a library in c which do not expect to
call cpp function to forward the request to low level driver. My device
also has spi interface which has IO functionality in another umdf driver
down the stack. I don’t want to call member function from c library to
forward request to IO driver. I also have tools using the libraries in c to
test device, which needs to send ioctl to low level IO driver directly. For
better maintainability I need upper umdf driver to send ioctl to lower umdf
driver. Would it be possible? If so how can it be done?
Thanks,
Krishna.
On 10 Sep 2014 23:20, “Doron Holan” wrote:

> What bigger problem are you trying to solve? Do you author both drivers
> or are you trying to reuse a third party driver?
>
> d
>
> Bent from my phone
> ------------------------------
> From: s.v.krishna reddy
> Sent: ‎9/‎10/‎2014 10:38 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Two UMDF drivers in device stack
>
> Hi,
> I have a requirement to have two UMDF drivers in device stack. Generally
> IO request can be forwarded to low level driver pdo. Is there way I can
> pass request to low level UMDF driver through device handle and ioctl
> calls?
> Thanks,
> Krishna.
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

If you have two UMDF drivers on top of a device (remember they have to be contiguous in the stack – no KM drivers between them) then the upper driver’s default IO target will send IO to the lower driver.

What I’m unclear about is what “by sending ioctl to win usb using win usb library” means. Are you trying to call WinUSB functions inside the upper UMDF driver, and hoping that the DeviceIoControl calls the library makes will get forwarded to the lower driver? That won’t happen – you can’t get a file handle for the lower driver to give the WINUSB library.

-p

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of s.v.krishna reddy
Sent: Wednesday, September 10, 2014 11:06 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Two UMDF drivers in device stack

I have a generic umdf device driver for USB devices by sending ioctl to win usb using win usb library. Driver has a library in c which do not expect to call cpp function to forward the request to low level driver. My device also has spi interface which has IO functionality in another umdf driver down the stack. I don’t want to call member function from c library to forward request to IO driver. I also have tools using the libraries in c to test device, which needs to send ioctl to low level IO driver directly. For better maintainability I need upper umdf driver to send ioctl to lower umdf driver. Would it be possible? If so how can it be done?
Thanks,
Krishna.
On 10 Sep 2014 23:20, “Doron Holan” > wrote:
What bigger problem are you trying to solve? Do you author both drivers or are you trying to reuse a third party driver?

d

Bent from my phone
________________________________
From: s.v.krishna reddymailto:xxxxx
Sent: ‎9/‎10/‎2014 10:38 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Two UMDF drivers in device stack

Hi,
I have a requirement to have two UMDF drivers in device stack. Generally IO request can be forwarded to low level driver pdo. Is there way I can pass request to low level UMDF driver through device handle and ioctl calls?
Thanks,
Krishna.
— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

I know the request can be forwarded to lower driver through forward
request device class member. Question is how can i send request through
ioctls.
usb device stack does not have issue for me. My device umdf driver
sits on win usb.sys, requests go down though ioctl. For spi solution it
sits on another umdf spi IO driver.

Thanks,
Krishna.
On 11 Sep 2014 03:17, “Peter Wieland” wrote:

> If you have two UMDF drivers on top of a device (remember they have to
> be contiguous in the stack – no KM drivers between them) then the upper
> driver’s default IO target will send IO to the lower driver.
>
>
>
> What I’m unclear about is what “by sending ioctl to win usb using win usb
> library” means. Are you trying to call WinUSB functions inside the upper
> UMDF driver, and hoping that the DeviceIoControl calls the library makes
> will get forwarded to the lower driver? That won’t happen – you can’t get
> a file handle for the lower driver to give the WINUSB library.
>
>
>
> -p
>
>
>
>
>
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] *On Behalf Of *s.v.krishna reddy
> Sent: Wednesday, September 10, 2014 11:06 AM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] Two UMDF drivers in device stack
>
>
>
> I have a generic umdf device driver for USB devices by sending ioctl to
> win usb using win usb library. Driver has a library in c which do not
> expect to call cpp function to forward the request to low level driver. My
> device also has spi interface which has IO functionality in another umdf
> driver down the stack. I don’t want to call member function from c library
> to forward request to IO driver. I also have tools using the libraries in c
> to test device, which needs to send ioctl to low level IO driver directly.
> For better maintainability I need upper umdf driver to send ioctl to lower
> umdf driver. Would it be possible? If so how can it be done?
> Thanks,
> Krishna.
>
> On 10 Sep 2014 23:20, “Doron Holan” wrote:
>
> What bigger problem are you trying to solve? Do you author both drivers
> or are you trying to reuse a third party driver?
>
> d
>
> Bent from my phone
> ------------------------------
>
> *From: *s.v.krishna reddy
> *Sent: *‎9/‎10/‎2014 10:38 AM
> *To: *Windows System Software Devs Interest List
> *Subject: *[ntdev] Two UMDF drivers in device stack
>
> Hi,
> I have a requirement to have two UMDF drivers in device stack. Generally
> IO request can be forwarded to low level driver pdo. Is there way I can
> pass request to low level UMDF driver through device handle and ioctl
> calls?
> Thanks,
> Krishna.
>
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>