Commit graph

30 commits

Author SHA1 Message Date
Yuri Benditovich
6da5b27ca6 Alloc: Make non-paged allocation from Nx pool on Win8 and later
This is requirement of DeviceGuard and HyperVisor Code
Integrity Readiness Test on Win10/Server2016.
We use Nx allocations for all the systems where Nx pool
is implemented, i.e. for Windows 8 and later.

Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2017-04-02 17:24:35 +03:00
Dmitry Fleytman
fa23267405 DeviceAccess: Drop UsbDkWdmUsbDeviceIsHub
This function is not used anymore.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2016-01-28 15:55:11 +02:00
Pavel Gurvich
4eeee4b356 UsbDk: treat USB 1.x devices as full speed on Windows XP
Windows API doesn't provide means to distinguish between
low and full speed USB devices.

This patch changes XP code to make it wor the same way
Windows Vista+ code works.

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-18 16:00:56 +03:00
Pavel Gurvich
eb9942e5dc UsbDk: drop unused DeviceAccess logic
This patch removes CWdfDeviceAccess class,
merges CDeviceAccess with CWdmDeviceAccess
and removes unused CWdmDeviceAccess code.

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-11 10:25:06 +03:00
Pavel Gurvich
5db75d296e UsbDk: Fill DEVICE_CAPABILITIES as required for QueryCapabilities IRP
The problem revealed while testing with driver verifier.

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-08-20 17:28:53 +03:00
Pavel Gurvich
f36902947a Revert "UsbDk: Fix never completed IOCTLs issue"
This reverts commit eb1e6fc61d.

The fix is not needed. The problem observed was related to HW.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-08-20 17:28:51 +03:00
Pavel Gurvich
eb1e6fc61d UsbDk: Fix never completed IOCTLs issue
In some cases driver sends IOCTLS to the underlying devices.
It uses IoBuildDeviceIoControlRequest() function to allocate
IOCTL IRP.

This function allocates threaded IRP which has a number of
limitations for contexts it may be sent from.
In particular it must be sent from PASSIVE_LEVEL
and non-arbitrary thread context to complete successfully.

Since this is not always true for contexts driver sends IRPs from,
never completed IOCTLs were observed on load tests.

This patch fixes the problem by using IoAllocateIrp()
function to allocate IOCTL IRPs.

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-08-17 09:30:53 +03:00
Pavel Aronsky
746614d717 UsbDk: added support for WinXP; get device speed
Signed-off-by: Pavel Aronsky <pavel.aronsky@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-06-16 15:05:47 +03:00
Dmitry Fleytman
e20b3aa48f UsbDk-XP: Drop annoying assertions in unimplemented functions
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-06-09 11:50:29 +03:00
Dmitry Fleytman
d5d51dfd47 UsbDk: place all system includes into stdafx.h
This makes include policy more strict and ensures
all system includes properly wrapped with extern "C"

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-06-09 11:50:26 +03:00
Dmitry Fleytman
447de6ad71 build: add XP/2003 configurations
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-06-01 23:01:13 +03:00
Dmitry Fleytman
d141a9fc60 UsbDk: Introduce USB device speed fetcher function
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-29 15:34:05 +03:00
Dmitry Fleytman
f7a82043b5 UsbDk: Introduce USBD wrapper class
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-29 15:34:04 +03:00
Pavel Gurvich
a77d8161e4 UsbDk: Add license-related files and headers
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-20 11:56:20 +03:00
Dmitry Fleytman
6d5b7151ee UsbDk: Trivial: Replace NULL with nullptr
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:15 +03:00
Dmitry Fleytman
e602d6c4cc UsbDk: Trivial: traces cleanup/fixes
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:15 +03:00
Dmitry Fleytman
267311dcfe UsbDk: Introduce UsbDeviceIsHub helper
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00
Dmitry Fleytman
9935ca0aa7 UsbDk: Make device access process non-existing properties properly
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00
Dmitry Fleytman
e763ac9a98 UsbDk: Fix memory allocation failure handling
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00
Dmitry Fleytman
98584c1d6f UsbDk: Query configuration descriptor method for WDM device accessor
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
400e6e1c9f UsbDk: Introduce send URB helper
Function UsbDkSendUrbSynchronously() introduced

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
c174d4011b UsbDk: Query device descriptor method for WDM device accessor
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
46dc023f46 UsbDk: Introduce UsbDkGetWdmDeviceIdentity() helper
This helper function encapsulates device IDs query
and corresponding error handling.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
ec0af1e178 UsbDk: Add API to query device address in CDeviceAccess
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
780ea265cd UsbDk: Make CWdmDeviceAccess return non-paged buffers
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:12 +03:00
Dmitry Fleytman
2f421af937 UsbDk: Introduce USB WDM device access class with reset logic
class CWdmUsbDeviceAccess introduced

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
462c365327 UsbDk: CDeviceAccess class factory dropped
Doesn't bring any added value, just makes code more complex

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:10 +03:00
Dmitry Fleytman
bad42d21cd UsbDk: CDeviceAccess coding style fixes
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:09 +03:00
Dmitry Fleytman
c07eb5c45a RHUsd: Introduce functions for BUS IDs queries
CDeviceAccess classes extended with new functionality

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:09 +03:00
Dmitry Fleytman
b02ea0b736 UsbDk: Introduce CDeviceAccess classes
Classes for WDF/WDM device object abstraction

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:09 +03:00