Passing an IOCTL_INTERNAL_USB_SUBMIT_URB from one PDO to another.

From: Lars-Åke Berg (lars-ake.berg_at_nibland.org)
Date: 10/28/04


Date: Thu, 28 Oct 2004 23:01:10 +0200

All,

I hope that you will be able to need help me with the following problem.

I'm developing a functional driver that fixes a class id problem in the usb
chip in a device.

The function driver creates a 'virtual' PDO that is enumerated by the PnP
Manager. This PDO reports the correct class id (this works).

Now to the actual problem:

When a higher driver sends an IRP_MJ_INTERNAL_DEVICE_CONTROL
(IOCTL_INTERNAL_USB_SUBMIT_URB), I receive it in my dedicated Dispatch
function.

How do I forward this request to the 'real' PDO in a lower driver (my
'virtual' PDO is at the stack bottom according to the upper driver, so an
ordinary IoSkipCurrentStackLocation(pIrp);IoCallDriver(.) gives an
exception) and when done report back the result to the original IRP sent by
upper driver (from my functional driver view)?

Pleas advice, now I get a data alignment exception in the usbhub all the
time (I'm probably forwarding the wrong data from the original IRP). I
forward the request by building a new IRP dedicated for the lower drivers
(using IoBuildDeviceIoControlRequest for which I may use the wrong data from
original IRP as input buffer, output buffer, and length etc.).

/Lars-Åke Berg



Relevant Pages

  • Re: new sk driver [was: nve timeout (and down) regression?]
    ... kind of strange getting a new release with a known not functional driver ... I am running 2 systems with the sk driver. ... The problem is appearing on SMP machines ... strokes it and it crashes in minutes or imediatly soon the network is up ...
    (freebsd-stable)
  • Re: Vista Driver query
    ... Could you please explain the "This driver registers the USB device" point? ... Does it pre-install the PnP functional driver? ... I have a static driver which should load during OS ... loaded due to manual registry entries created under ...
    (microsoft.public.development.device.drivers)
  • WDM USB driver not unloading
    ... I am writing a functional driver for one USB adapter. ... Next time when I plug the device, it is calling the AddDevice ...
    (microsoft.public.win32.programmer.kernel)
  • Re: new sk driver [was: nve timeout (and down) regression?]
    ... so more testing to see if it crashes more? ... These are just the simple facts of software development. ... IMO it would make sense to be replaced by Pyuns driver because the original is ... kind of strange getting a new release with a known not functional driver ...
    (freebsd-stable)
  • Re: How do I Load a new Driver?
    ... Then you go into device manager, right click on your device and pick Update Driver and point the wizard at your driver package. ... Now I want to create a PDO that controls access to the hardware and demand load a functional driver that creates its own FDO, rooted with the PDO I've created in my bus enumerator. ...
    (microsoft.public.development.device.drivers)