aboutsummaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2012-03-22 15:10:55 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-04-17 10:23:27 +0200
commite382e751ef7848b237be2d569815dcc4f8097306 (patch)
tree32270555acda13ffe5c081728073646064ec3dac /hw/usb
parent65bb3a5c11b00671c1067ee27ea364b6d7e6e2ac (diff)
downloadqemu-e382e751ef7848b237be2d569815dcc4f8097306.zip
qemu-e382e751ef7848b237be2d569815dcc4f8097306.tar.gz
qemu-e382e751ef7848b237be2d569815dcc4f8097306.tar.bz2
usb-host: trace emulated requests
Add tracepoint to track completion of emulated control requests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/host-linux.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c
index 5eb6916..912ce23 100644
--- a/hw/usb/host-linux.c
+++ b/hw/usb/host-linux.c
@@ -1035,13 +1035,19 @@ static int usb_host_handle_control(USBDevice *dev, USBPacket *p,
switch (request) {
case DeviceOutRequest | USB_REQ_SET_ADDRESS:
- return usb_host_set_address(s, value);
+ ret = usb_host_set_address(s, value);
+ trace_usb_host_req_emulated(s->bus_num, s->addr, ret);
+ return ret;
case DeviceOutRequest | USB_REQ_SET_CONFIGURATION:
- return usb_host_set_config(s, value & 0xff);
+ ret = usb_host_set_config(s, value & 0xff);
+ trace_usb_host_req_emulated(s->bus_num, s->addr, ret);
+ return ret;
case InterfaceOutRequest | USB_REQ_SET_INTERFACE:
- return usb_host_set_interface(s, index, value);
+ ret = usb_host_set_interface(s, index, value);
+ trace_usb_host_req_emulated(s->bus_num, s->addr, ret);
+ return ret;
}
/* The rest are asynchronous */