[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/21] usb-host: trace emulated requests
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 05/21] usb-host: trace emulated requests |
Date: |
Tue, 17 Apr 2012 10:45:10 +0200 |
Add tracepoint to track completion of emulated control requests.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/host-linux.c | 12 +++++++++---
trace-events | 1 +
2 files changed, 10 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 */
diff --git a/trace-events b/trace-events
index a5f276d..8ac1b62 100644
--- a/trace-events
+++ b/trace-events
@@ -315,6 +315,7 @@ usb_host_release_interfaces(int bus, int addr) "dev %d:%d"
usb_host_req_control(int bus, int addr, int req, int value, int index) "dev
%d:%d, req 0x%x, value %d, index %d"
usb_host_req_data(int bus, int addr, int in, int ep, int size) "dev %d:%d, in
%d, ep %d, size %d"
usb_host_req_complete(int bus, int addr, int status) "dev %d:%d, status %d"
+usb_host_req_emulated(int bus, int addr, int status) "dev %d:%d, status %d"
usb_host_urb_submit(int bus, int addr, void *aurb, int length, int more) "dev
%d:%d, aurb %p, length %d, more %d"
usb_host_urb_complete(int bus, int addr, void *aurb, int status, int length,
int more) "dev %d:%d, aurb %p, status %d, length %d, more %d"
usb_host_ep_set_halt(int bus, int addr, int ep) "dev %d:%d, ep %d"
--
1.7.1
- [Qemu-devel] [PULL 00/21] usb patch queue, Gerd Hoffmann, 2012/04/17
- [Qemu-devel] [PATCH 03/21] usb-uhci: queuing fix, Gerd Hoffmann, 2012/04/17
- [Qemu-devel] [PATCH 05/21] usb-host: trace emulated requests,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 17/21] usb: use USBDescriptor for endpoint descriptors., Gerd Hoffmann, 2012/04/17
- [Qemu-devel] [PATCH 01/21] usb/vmstate: add parent dev path, Gerd Hoffmann, 2012/04/17
- [Qemu-devel] [PATCH 11/21] usb-ehci: fix ehci_child_detach, Gerd Hoffmann, 2012/04/17
- [Qemu-devel] [PATCH 14/21] usb: use USBDescriptor for device qualifier descriptors., Gerd Hoffmann, 2012/04/17
- [Qemu-devel] [PATCH 10/21] usb-hub: add tracepoints, Gerd Hoffmann, 2012/04/17
- [Qemu-devel] [PATCH 18/21] usb-host: rewrite usb_linux_update_endp_table, Gerd Hoffmann, 2012/04/17
- [Qemu-devel] [PATCH 21/21] usb-ehci: drop assert(), Gerd Hoffmann, 2012/04/17
- [Qemu-devel] [PATCH 08/21] usb-host: add property to turn off pipelining, Gerd Hoffmann, 2012/04/17
- [Qemu-devel] [PATCH 19/21] usb-ehci: Drop unused sofv value, Gerd Hoffmann, 2012/04/17
- [Qemu-devel] [PATCH 16/21] usb: use USBDescriptor for interface descriptors., Gerd Hoffmann, 2012/04/17