diff options
author | Dmitry Fleytman <dfleytma@redhat.com> | 2016-09-01 10:36:48 +0300 |
---|---|---|
committer | Dmitry Fleytman <dfleytma@redhat.com> | 2016-09-01 10:36:48 +0300 |
commit | bf79d6e9425b1587aaa542c31912f5f6a574cd64 (patch) | |
tree | 54c4f25d1dbe02e7fd43f38c7ff1a8a10c79ab23 /UsbDk | |
parent | e68f982ff7370f9c75bcabce1b76f3df6d9299be (diff) |
ControlDevice: Fix removal of redirection on hub unplugv1.00-15
On unplug of USB hub that contains a redirected
device, removal of redirection is started when redirected
device PDO is still present in UsbDk device lists.
In this case UsbDk will try to send reset IOCTL to this device
and system will return STATUS_NO_SUCH_DEVICE error code.
This commit changes behavior of redirection removal
logic in a way that it will not interrupt removal
process when such an error is returned by reset.
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Diffstat (limited to 'UsbDk')
-rw-r--r-- | UsbDk/ControlDevice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/UsbDk/ControlDevice.cpp b/UsbDk/ControlDevice.cpp index e86bea4..a7c4d73 100644 --- a/UsbDk/ControlDevice.cpp +++ b/UsbDk/ControlDevice.cpp @@ -373,7 +373,7 @@ NTSTATUS CUsbDkControlDevice::ResetUsbDevice(const USB_DK_DEVICE_ID &DeviceID) PDEVICE_OBJECT PDO = GetPDOByDeviceID(DeviceID); if (PDO == nullptr) { - return STATUS_NOT_FOUND; + return STATUS_NO_SUCH_DEVICE; } CWdmUsbDeviceAccess pdoAccess(PDO); @@ -941,7 +941,7 @@ NTSTATUS CUsbDkControlDevice::RemoveRedirect(const USB_DK_DEVICE_ID &DeviceId) return STATUS_DEVICE_NOT_CONNECTED; } } - else if (res != STATUS_NOT_FOUND) + else if (res != STATUS_NO_SUCH_DEVICE) { TraceEvents(TRACE_LEVEL_ERROR, TRACE_CONTROLDEVICE, "%!FUNC! Usb device reset failed."); return res; |