Skip to content

Commit

Permalink
Always return STATUS_PENDING after WskSend
Browse files Browse the repository at this point in the history
Signed-off-by: Vadym Hrynchyshyn <vadimgrn@gmail.com>
  • Loading branch information
vadimgrn committed Dec 1, 2024
1 parent d6e8e85 commit be1ee44
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions drivers/ude/device_ioctl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,10 @@ auto send(_In_opt_ UDECXUSBENDPOINT endpoint, _In_ wsk_context_ptr &ctx, _Inout_
NTSTATUS st;
{
wdf::Lock lck(dev.send_lock); // EvtUsbEndpointPurge, EvtIoInternalDeviceControl on other queues
st = send(dev.sock(), &buf, WSK_FLAG_NODELAY, wsk_irp);
}

switch (st) {
case STATUS_PENDING:
case STATUS_SUCCESS:
TraceWSK("req %04x -> wsk irp %04x, %Iu bytes, %!STATUS!", ptr04x(request), ptr04x(wsk_irp), buf.Length, st);
break;
default:
Trace(TRACE_LEVEL_ERROR, "req %04x -> wsk irp %04x, %!STATUS!", ptr04x(request), ptr04x(wsk_irp), st);
// WskSend does not complete IRP for this status only
if (st == STATUS_NOT_SUPPORTED && device::remove_request(dev, request, false)) {
complete(request, st);
}
st = send(dev.sock(), &buf, WSK_FLAG_NODELAY, wsk_irp); // completion handler will be called anyway
}
TraceWSK("req %04x -> wsk irp %04x, %Iu bytes, %!STATUS!",
ptr04x(request), ptr04x(wsk_irp), buf.Length, st);

return STATUS_PENDING;
}
Expand Down

0 comments on commit be1ee44

Please # to comment.