Commit a525551d86 for qemu.org
commit a525551d86aed37fe0e7425049be523b777a1fd5
Author: Ziyi Fu <ziyi.fu@cyberus-technology.de>
Date: Fri Jun 26 10:05:53 2026 +0200
hw/usb: record async control completion for parameter transfers
Record the completion side of parameter-based control transfers when they
complete asynchronously. This lets pcap captures include descriptor
response data for requests such as GET_DESCRIPTOR from usb-host devices.
The synchronous path already recorded the completion, but the async
SETUP_STATE_PARAM path was missing it.
Signed-off-by: Ziyi Fu <ziyi.fu@cyberus-technology.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Fixes: 0f6dba145a4b ("usb: add pcap support.")
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/usb/core.c b/hw/usb/core.c
index 9572a870cc..d71204c5c8 100644
--- a/hw/usb/core.c
+++ b/hw/usb/core.c
@@ -345,6 +345,7 @@ void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p)
p->actual_length = 0;
usb_packet_copy(p, s->data_buf, s->setup_len);
}
+ usb_pcap_ctrl(p, false);
break;
default: