Commit graph

83 commits

Author SHA1 Message Date
Dmitry Fleytman
eefbd06435 UsbDk: Supply USB device descriptors on enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
dc8c3a09a4 UsbDk: Make StartRedirect operation synchronous
1. Wait for reset and redirector creation completion on IOCTL handler
2. Return RedirectorID from driver to user mode caller
3. Open corresponding redirector device using RedirectorID returned

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
968a4bbd2c UsbDk: Introduce DoUSBDeviceOp() species with output buffers support
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
a8eb08b2ce UsbDk: Notify control device about redirection activities
This patch make redirectors notify control device
on creation and destruction. These notifications
are needed to make Add/Remove redirection operations
synchronous from user mode client's point of view.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
44aeb7b40e UsbDk: Extend CUsbDkRedirection with notifications
Add logic for redirector device created/deleted notifications
Add storage for assotiated redirector ID

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
ec768841b5 UsbDk: Introduce UsbDkFillIDStruct helper
Just a helper function that fills USB_DK_DEVICE_ID structure
havind DeviceID and InstanceID strings provided.

Available for both user mode and kernel mode.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
b93b71ce45 UsbDk: Add port number to per-device data supplied on enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
0a6379435b UsbDk: Add filter ID to per-device data supplied on enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Dmitry Fleytman
8a0311f624 UsbDk: Make device enumeration return more generic structure
This patch makes device enumeration API return array of
device info structures instead of array of device IDs.

This change is needed to return per-device information
in addition to device ID.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:13 +03:00
Pavel Gurvich
cabdf800c4 UsbDk&UsbDkHelper&UsbDkController: Remove separate reset API
Reset should be part of start/stop redirection. No separate API needed

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:12 +03:00
Dmitry Fleytman
2f94f30148 UsbDk: Trivial: fix control device traces
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:12 +03:00
Dmitry Fleytman
499019813b UsbDk: Fix control device cleanup
Delete control device object on CleanupContext callback

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:12 +03:00
Dmitry Fleytman
84a2ef8762 UsbDk: Test control device queue allocation result
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
d9e2433635 UsbDk: Make child PDO reference counting external
CUsbDkChildDevice should not reference PDO for caller.
It is up to caller to reference PDO when needed.

This change simplifies CUsbDkChildDevice class and
makes its interface more flexible

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
1dc45a2c3d UsbDk: Control device: redirection list access API
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
3d58cc6f75 UsbDk: Make CWdfDevice more generic
Control-device creation related logic moved
to corresponding class

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
76387cf611 UsbDk: Fail redirection of non-existing devices
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
1e946679ef UsbDk: Introduce CUsbDkControlDevice::EnumUsbDevicesByID
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
838d1e3662 UsbDk: Redirections collection management
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
bfa21156bb UsbDk: Introduce class describing redirection entity
CUsbDkRedirection class introduced

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
3d4b8eda14 UsbDkHelper: Isolate common code for some ioctls
All IOCTLs that perform operation on USB device
identified by USB_DK_DEVICE_ID are pretty similar,
common code may be isolated.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
0f4406c1ed UsbDk: Make control device use CWdfRequest
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
653ce6b4ad UsbDk: Drop ping IOCTL and children dump logic
Debugging code removed.

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Pavel Gurvich
75dfc650a5 UsbDk: Implement ResedDevice IOCTL functionality in kernel
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
37c665c52b UsbDk: ControlDevice: Make all USB devices enumeration code generic
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Dmitry Fleytman
8ad530b07d UsbDk: Fix USB devices enumeration
USB devices enumeration logic  placed device information
into output buffer improperly

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:11 +03:00
Pavel Gurvich
139457073b UsbDk: add enumeration of USB devices to ControlDevice
Add functionality to ControlDevice that allows counting and enumerating USB devices

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:10 +03:00
Pavel Gurvich
771555ed40 UsbDk: prepare FilterDevice for device enumeration
FilterDevice: fix functions of CUsbDkChildDevice;
add GetChildrenCount() to CUsbDkFilterDevice;
Make m_ChildDevices counting list

Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:10 +03:00
Dmitry Fleytman
1a1edc7f5a UsbDk: CUsbDkControl: Dump all children devices on PING
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:10 +03:00
Dmitry Fleytman
53c79ec79e UsbDk/Helper: Introduce data structure for device enumeration
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:10 +03:00
Dmitry Fleytman
6ee40a363b UsbDk: Introduce UsbDkFilterDevice class
- Introduce filtering logic class
 - Make control device creation logic object oriented
 - Integrate control device creation with filter devices creation

Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:10 +03:00
Dmitry Fleytman
244ade2a35 UsbDkHelper: Introduce UsbDkDriverAccess class and PING IOCTL
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:10 +03:00
Dmitry Fleytman
1ec2fc3e40 UsbDk: Introduce control device class
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
2014-05-11 19:26:09 +03:00