summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-12-25Revert "RedirectorStrategy: Ensure there are no short buffers on read"v1.00-10Dmitry Fleytman4-84/+4
This reverts commit 32aadcb4fe2b13fce8df679f729ad24e64c746a7. Reverting commit because a regression was discovered on some devices. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24UsdDkController: Clarify redirection option in the help screenv1.00-9Dmitry Fleytman1-1/+4
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24UsbTarget: Add trace for ResetDeviceDmitry Fleytman1-0/+4
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24FilterStrategy: Simplify requests forwarding codeDmitry Fleytman2-15/+6
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24RedirectorStrategy: Ensure there are no short buffers on readDmitry Fleytman4-4/+84
To avoid "BABBLE" conditions. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24UsbTarget: Protect pipes from concurrent accessesDmitry Fleytman2-72/+115
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24Utils: Introduce RW-locksDmitry Fleytman1-0/+73
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24Utils: Generalize auto-locking mechanismsDmitry Fleytman1-11/+15
This patch makes code ready for other lock types like RW-locks Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24Utils: Make spinlock copying prohibitedDmitry Fleytman1-0/+3
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24Utils: Replace dummy class with aliasDmitry Fleytman1-9/+1
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24UsbDk: Trivial: Ditch dummy TODOsDmitry Fleytman2-4/+0
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24Control/Hider: Trivial: Simplify queues creationDmitry Fleytman2-6/+6
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24UsbDk: Make USB transfers execute at dispatch levelDmitry Fleytman5-10/+12
Change ExecutionLevel for redirector data queue to WdfExecutionLevelDispatch. There is no real reason to force USB transfers exection on PASSIVE_LEVEL and DISPATCH_LEVEL execution is definitely faster. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24RedirectorStrategy: Trivial: Make variable names follow the conventionDmitry Fleytman1-19/+19
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24RedirectorStrategy: Extend transfer error tracesDmitry Fleytman3-15/+66
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-21UsbDk: Make WdfRequest constructor explicitDmitry Fleytman1-1/+1
To avoid implicit CWdfRequest objects construction and requests completion. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-21UsbDkTarget: Add tracing for target creationDmitry Fleytman2-2/+30
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-20UsbDk: Trivial: Drop extra empty lineDmitry Fleytman1-1/+0
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-20UsbTarget: Extend error tracesDmitry Fleytman1-6/+6
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-01UsbDk: Use precompiled headers to speed-up compilationDmitry Fleytman3-18/+369
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24UsbDk: Propagate USBD errors to user mode clientsv1.00-8Dmitry Fleytman5-44/+62
WARNING: This patch breaks compilation of client code due to changes in interface structures. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24UsbDk: Eliminate camelCase notation from interface definitionsDmitry Fleytman3-22/+22
This is a cosmetic change that unifies naming convention in UsbDk public API. WARNING: This change breaks compilation of client code. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24UsbDkData: Trivial: typo fixedDmitry Fleytman1-1/+1
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24CWdfUsbTarget: Do not delete USB target explicitelyDmitry Fleytman2-9/+0
USB target will be deleted together with its parent device Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24CWdfDevice: Pacify excessive tracesDmitry Fleytman1-1/+0
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24CWdmSet: Prohibit copyingDmitry Fleytman1-0/+3
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24CWdmList: Prohibit copyingDmitry Fleytman1-0/+3
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24CWdmSet: Eliminate unlocked internal list accessesDmitry Fleytman1-0/+4
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24CWdmSet: Avoid entries destruction under lockDmitry Fleytman1-15/+47
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24UsbDk: Drop uneeded dynamic memory allocationsDmitry Fleytman9-87/+37
2015-11-24Utils: Make List/Set classes support reference counting bjectsDmitry Fleytman2-18/+18
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24FilterDevice: Protect filter objects from deletion while in useDmitry Fleytman4-12/+18
This patch makes filter object reference counting objects and ensures reference is help to filter objects while they are in use. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24ControlDevice: Never delete redirection object explicitelyDmitry Fleytman3-3/+16
Redirection object is a refcountong object and cannot be leter with operator delete(). Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24WdfDevice: Cache device name on creationDmitry Fleytman2-8/+35
Needed to allow user mode handle creation attempts after underlying WDF device deletion. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24Redirector: Drop empty Delete() overrideDmitry Fleytman2-6/+0
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24Redirector: Introduce additional tracesDmitry Fleytman1-0/+2
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24ControlDevice: Refactoring: Rename some private membersDmitry Fleytman2-3/+3
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24Redirector: Make some debug traces more clearDmitry Fleytman1-2/+2
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24Redirector: allow zero length pipe Read/Write requestsDmitry Fleytman1-42/+36
This patch fixes issue reported at https://github.com/daynix/UsbDk/issues/11 Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24WdfRequest: Handle buffer-less requests properlyDmitry Fleytman1-0/+12
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24MemoryBuffer: Handle empty memory objects properlyDmitry Fleytman1-2/+11
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24WdfRequest: Add some failure tracesDmitry Fleytman3-5/+33
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24WdfRequest: Drop unused functionsDmitry Fleytman1-6/+0
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24ControlDevice: Do not process AddRedirect in IoInCallerContextDmitry Fleytman4-29/+97
This commit moves processing of AddRedirect IOCTL from IoInCallerContext callback of control device to normal default queue DeviceIoControl callback. This change eliminates posibility for parallel execution of AddRedirect and other operations, particularly RemoveRedirect. Initially AddRedirect was perfomed in IoInCallerContext callback to open user mode handle to the device being redirected in context of correct user mode process. This patch achieves the same goal by storing caller's process handle in request context in IoInCallerContext callback and duplicating handle to the original calling process from queue's DeviceIoControl callback. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-16Utils: Introduce helper for opening current process handleDmitry Fleytman3-1/+25
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-16ControlDevice: Make WDF allocate context area for control requestsDmitry Fleytman2-24/+50
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-10UsbDk: Added documentation on creating and sharing crash dumpsLeonid Bloch1-0/+80
Signed-off-by: Leonid Bloch <leonid@daynix.com> Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-28msi: Add 32-bit UsbDkHelper.dll to 64-bit MSIsv1.00-7Dmitry Fleytman2-1/+13
Needed for WoW64 clients. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-10-28UsbDk: Perform ReadPipe/WritePipe via IOCTLsDmitry Fleytman11-187/+159
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-28UsbDk: trivial: make function parameters constDmitry Fleytman2-4/+9
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>