Commit graph

12 commits

Author SHA1 Message Date
Dmitry Fleytman
39144b74ef WdfRequest: Handle buffer-less requests properly
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:30:58 +02:00
Dmitry Fleytman
082be5ea33 WdfRequest: Add some failure traces
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 12:30:57 +02:00
Dmitry Fleytman
4a0354fdcd UsbDk: Perform ReadPipe/WritePipe via IOCTLs
This commit fixes issues with accessing USB devices on
some USB host controllers.

Before this fix UsbDk assumed IO type NEITHER for
ReadFile/WriteFile operations performed on captured
USB device. This assumption is not true in some cases
because UsbDk creates filter devices which use the
same IO type as device being filtered, i.e. IO type
is effectively defined by USB host controller driver.

While some host controllers work in NEITHER IO mode,
others use DIRECT IO instead. When capturing device
plugged into such a controller UsbDk failed to retrieve
ReadFile/WriteFile buffers because there are different API
used different IO types and UsbDk used the wrond one.

This patch changes UsbDk DLL/Driver interface to use IOCTL
for ReadPipe/WritePipe operations. Since IO type for IOCTL
requests is determined by IOCTL code and not by target device
settings UsbDk need not consider IO type used by the host
controller being filtered.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-28 09:11:41 +02:00
Dmitry Fleytman
accb8b6b77 UsbDk: Trivial: Dropping unused functions
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-27 16:00:54 +02:00
Pavel Gurvich
b42b6b2092 UsbDk: Add completion context parameter for CWdfRequest
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-08-03 15:22:36 +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
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
655307e7b3 UsbDk: Fix WdfRequest unsafe buffers interface
1. Fix buffers probing methods semantics
2. Remove template directives where not required

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:15 +03:00
Dmitry Fleytman
b50b2eddb8 UsbDk: Method for sending request with completion
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:15 +03:00
Dmitry Fleytman
167cc7ad4c UsbDk: Introduce CWdfRequest::Detach() operation
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00
Dmitry Fleytman
4566ccdac0 UsbDk: Introduce WDF request forwarding logic
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00
Dmitry Fleytman
ff5f649436 UsbDk: User buffers retrieval for CWdfRequest
Two methods added:
  1. CWdfRequest::FetchSafeReadBuffer()
  2. CWdfRequest::FetchSafeWriteBuffer()

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00