Commit graph

34 commits

Author SHA1 Message Date
Dmitry Fleytman
eadd31b315 UsbTarget: Trivial: Remove m_ prefix from stack variables names
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2016-03-09 11:03:26 +02:00
Dmitry Fleytman
0a4f4811bc RedirectorStrategy: Add request counters to traces
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2016-02-10 12:03:39 +02:00
Dmitry Fleytman
3d0a2050b3 UsbTarget: Introduce TargetRequest class
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2016-02-10 11:02:14 +02:00
Dmitry Fleytman
0fbeb04527 UsbDk: Trivial: Minor comments fix
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2016-01-14 10:45:44 +02:00
Dmitry Fleytman
3b1f461d5c Revert "RedirectorStrategy: Ensure there are no short buffers on read"
This reverts commit 32aadcb4fe.

Reverting commit because a regression was discovered on some devices.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-25 08:44:38 +02:00
Dmitry Fleytman
910c71c191 UsbTarget: Add trace for ResetDevice
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24 16:40:13 +02:00
Dmitry Fleytman
32aadcb4fe RedirectorStrategy: Ensure there are no short buffers on read
To avoid "BABBLE" conditions.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24 11:25:31 +02:00
Dmitry Fleytman
f322815084 UsbTarget: Protect pipes from concurrent accesses
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-24 11:25:31 +02:00
Dmitry Fleytman
47c5eb6e02 UsbDkTarget: Add tracing for target creation
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-21 18:46:33 +02:00
Dmitry Fleytman
42916dc5ce UsbTarget: Extend error traces
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-12-20 10:01:10 +02:00
Dmitry Fleytman
1a97440166 UsbDk: Propagate USBD errors to user mode clients
WARNING: This patch breaks compilation of client code
due to changes in interface structures.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 13:04:17 +02:00
Dmitry Fleytman
d9de2214ba CWdfUsbTarget: Do not delete USB target explicitely
USB target will be deleted together with its parent device

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-11-24 13:03:43 +02:00
Dmitry Fleytman
29814251f4 UsbDk: Introduce UsbDk_ResetPipe() user mode API
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-05-03 10:36:23 +03:00
Dmitry Fleytman
ec04c9a874 trivial: cleanup comments
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2015-03-25 17:38:00 +02:00
Dmitry Fleytman
00faeaa3bd UsbDk: Always delete old pipes information on reconfiguration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-16 12:02:53 +03:00
Dmitry Fleytman
00effeed26 usbdk: optimize urb.h includes
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-10 11:41:51 +03:00
Dmitry Fleytman
536e35fda8 UsbDk: Make CObjHolder deleter template parameter
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-09-09 18:10:46 +03:00
Dmitry Fleytman
3a9f570d2e UsbDk: Introduce infrastructure for isochronous transfers
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-08-04 17:53:52 +03:00
Pavel Gurvich
bb1e76a829 UsbDk: Remove junk trace on SetAltSettings
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-07-02 18:11:04 +03:00
Pavel Aronsky
701988dd69 UsbDk: Drop dead code
CWdfUrb class and CWdfUsbTarget::ConfigurationDescriptor()
are not used anymore.

Signed-off-by: Pavel Aronsky <pavel.aronsky@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-06-16 15:05:45 +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
0c872018fc UsbDk: trivial: drop unnecessary includes
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-29 15:47:18 +03:00
Pavel Gurvich
32e7243f99 UsbDk: Implement RESET_DEVICE IOCTL
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-26 18:42:51 +03:00
Pavel Gurvich
40154c5bab UsbDk: Implement IOCTL_USBDK_DEVICE_SET_ALTSETTING
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-26 18:41:16 +03:00
Pavel Gurvich
55e7d683fe UsbDk: Add handling of AbortPipe IOCTL
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-20 11:56:27 +03:00
Pavel Gurvich
dfcbfb2d65 UsbDk: Make ControlTransfer asynchronous
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-20 11:56: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
882b77a27d UsbDk: Make control transfer logic method of CWdfUsbTarget
This allows to drop internal object acessor of CWdfUsbTarget
and preserve better encapsulation.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:15 +03:00
Dmitry Fleytman
d680b5b139 UsbDk: Fix ReadPipe/WritePipe number of bytes transferred propagation
Number of bytes transferred returned by ReadFile/WriteFile cannot
be larger then the size of buffer passed to the function.

Since buffer passed to ReadFile/WriteFile is our request
structure and number of bytes transferred to/from usb device
depends on buffer size passed via the request structure and not on
request structure size we have to return actual number of bytes
transferred via some field in request structure and not via system
facilities.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:15 +03:00
Dmitry Fleytman
1447b8d476 UsbDk: disable maximum packet size check for pipes
It's up to client to send packets of allowed size.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:15 +03:00
Dmitry Fleytman
a5bba7bf0c UsbDk: Introduce read/write endpoint logic
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:15 +03:00
Dmitry Fleytman
eb5d30d7d4 UsbDk: Logic for USB device interfaces configuration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:14 +03:00
Dmitry Fleytman
e3662ef431 UsbDk: Generic UsbBuildGetDescriptorRequest() wrapper
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
d2a311752d UsbDk: Introduce CWdfUsbTarget class
Class that encapsulates USB device communication:
 - Descriptors query
 - Pipe transfers (not implemented yet)

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