ControlDevice: Fix removal of redirection on hub unplug
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>
This commit is contained in:
parent
e68f982ff7
commit
bf79d6e942
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue