Pass a URB to the USBD class driver from upper filter USB Driver

Hi,

I need to send a vendor specific request to USB storage device. I wrote a
“Upper Filter” driver on top of existing client driver, to send URB to USB
stack, but was not unsuccessful. (IoCallDriver returns
STATUS_NOT_SUPPORTED).

Is there any trick for upper filter driver to call USBD?

Please help.

Thanks
Jim

Chin Chen wrote:

I need to send a vendor specific request to USB storage device. I wrote a
“Upper Filter” driver on top of existing client driver, to send URB to USB
stack, but was not unsuccessful. (IoCallDriver returns
STATUS_NOT_SUPPORTED).

Unfortunately, the function driver that you’re layered on top of is
probably not passing IRP_MJ_INTERNAL_DEVICE_CONTROL requests down the
stack. I’ve always recommended that people writing USB function drivers
do this precisely so that filter drivers like yours could access the
device.

There is no good and legal way to accomplish your goal. Can you possibly
operate as a lower filter, perhaps using the “extra” device object
concept I talk about in ch. 16 of my WDM book (Microsoft calls it a
“control” device object)?

I definitely don’t recommend bypassing the PnP stack to send your URB
directly to the PDO. The problem you would cause thereby is that you
would bypass lower filter drivers that somebody might install for some
very good reason you can’t guess right now.


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com