wineusb.sys: Return STATUS_DELETE_PENDING when device is removed.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
84c9206ca7
commit
0b9d1d9ffb
|
@ -726,9 +726,21 @@ static NTSTATUS WINAPI driver_internal_ioctl(DEVICE_OBJECT *device_obj, IRP *irp
|
||||||
ULONG code = stack->Parameters.DeviceIoControl.IoControlCode;
|
ULONG code = stack->Parameters.DeviceIoControl.IoControlCode;
|
||||||
struct usb_device *device = device_obj->DeviceExtension;
|
struct usb_device *device = device_obj->DeviceExtension;
|
||||||
NTSTATUS status = STATUS_NOT_IMPLEMENTED;
|
NTSTATUS status = STATUS_NOT_IMPLEMENTED;
|
||||||
|
BOOL removed;
|
||||||
|
|
||||||
TRACE("device_obj %p, irp %p, code %#x.\n", device_obj, irp, code);
|
TRACE("device_obj %p, irp %p, code %#x.\n", device_obj, irp, code);
|
||||||
|
|
||||||
|
EnterCriticalSection(&wineusb_cs);
|
||||||
|
removed = device->removed;
|
||||||
|
LeaveCriticalSection(&wineusb_cs);
|
||||||
|
|
||||||
|
if (removed)
|
||||||
|
{
|
||||||
|
irp->IoStatus.Status = STATUS_DELETE_PENDING;
|
||||||
|
IoCompleteRequest(irp, IO_NO_INCREMENT);
|
||||||
|
return STATUS_DELETE_PENDING;
|
||||||
|
}
|
||||||
|
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
case IOCTL_INTERNAL_USB_SUBMIT_URB:
|
case IOCTL_INTERNAL_USB_SUBMIT_URB:
|
||||||
|
|
Loading…
Reference in New Issue