Re: KMDF: how can I get usb continuous reader callbacks always in order?



"Maxim S. Shatskih" <maxim@xxxxxxxxxxxxxxxx> wrote in message news:e9g9rk%23aIHA.4684@xxxxxxxxxxxxxxxxxxxxxxx
But reassembling needs special handling, like tcp has for
out of order packets (on behalf on network drivers).
Do you mean that *any* driver needs to do same on SMP?

From what I know, IO completion path in Windows from IopCompleteRequest to user
mode - return from the syscall or GetOverlappedResult or
GetQueuedCompletionStatus - is preemptable.

So, you cannot rely on _completion order_ in Windows.

Nevertheless, with most drivers you can rely on _IRP submit order_, that the
order of data portions in the IRPs will be the same as IRP submit order.

So, just keep a serial number in your IRP context - completion context for
kernel, OVERLAPPED wrapper for user, generate the numbers on IRP submit, and
deal with the (reassembling) in the completion path.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com

Thanks. this makes sense. Even so, I really hope that
the DPCs of the host controller are serialized on same cpu;
and this serialization keeps up to the client callbacks at DISPATCH.
Otherwise it looks like major PITA - especially if this applies also to
other protocol buses like SDIO.

--PA



.



Relevant Pages

  • Re: IRP_MN_QUERY_DEVICE_RELATIONS concurrency
    ... That IRP doesn't change change state, so serialization isn't particularly ... That's a very narrow class of drivers. ...
    (microsoft.public.development.device.drivers)
  • Re: Computer Freezing
    ... There are some known unresolved issues with Catalyst 7.7 with Windows ... does seem like everytime my computer freezes I get this atimtag CRT ... one connected via USB but I never installed the drivers or used it. ... to install all my programming applications (VS, DirectX SDK, V ...
    (microsoft.public.windowsxp.hardware)
  • Re: RUN TIME ERROR!!!
    ... Second suggestion - figure out what is needing to write there.. ... using Windows XP "prettifications". ... Why you should use a computer firewall.. ... You also have hardware on your machine that requires drivers to interface ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: RUN TIME ERROR!!!
    ... Second suggestion - figure out what is needing to write there.. ... using Windows XP "prettifications". ... Why you should use a computer firewall.. ... You also have hardware on your machine that requires drivers to interface ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: Toshiba S100 Problem With RAID Driver
    ... Add RAID drivers and Service Pack 2 to your original Windows CD! ... Windows XP setup CD ... Our next objective is to extract Service Pack 2 to a folder so we can ...
    (comp.sys.laptops)

Loading