1 From bd1c78528cbd45629fe31127f5bde708263d6e17 Mon Sep 17 00:00:00 2001
2 From: Gerd Hoffmann <kraxel@redhat.com>
3 Date: Fri, 31 Aug 2012 12:41:43 +0200
4 Subject: [PATCH] ehci: add doorbell trace events
6 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
7 (cherry picked from commit 1defcbd1e81d67476b6e4e486bcd4d869162900d)
9 Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
11 hw/usb/hcd-ehci.c | 3 ++-
13 2 files changed, 4 insertions(+), 1 deletion(-)
15 diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
16 index 4564615..398f5e0 100644
17 --- a/hw/usb/hcd-ehci.c
18 +++ b/hw/usb/hcd-ehci.c
19 @@ -1241,6 +1241,7 @@ static void ehci_mem_writel(void *ptr, target_phys_addr_t addr, uint32_t val)
21 s->async_stepdown = 0;
22 qemu_bh_schedule(s->async_bh);
23 + trace_usb_ehci_doorbell_ring();
26 if (((USBCMD_RUNSTOP | USBCMD_PSE | USBCMD_ASE) & val) !=
27 @@ -2335,7 +2336,7 @@ static void ehci_advance_async_state(EHCIState *ehci)
28 if (ehci->usbcmd & USBCMD_IAAD) {
29 /* Remove all unseen qhs from the async qhs queue */
30 ehci_queues_rip_unused(ehci, async, 1);
31 - DPRINTF("ASYNC: doorbell request acknowledged\n");
32 + trace_usb_ehci_doorbell_ack();
33 ehci->usbcmd &= ~USBCMD_IAAD;
34 ehci_raise_irq(ehci, USBSTS_IAA);
36 diff --git a/trace-events b/trace-events
37 index 5112a47..10bc04e 100644
40 @@ -264,6 +264,8 @@ usb_ehci_queue_action(void *q, const char *action) "q %p: %s"
41 usb_ehci_packet_action(void *q, void *p, const char *action) "q %p p %p: %s"
42 usb_ehci_irq(uint32_t level, uint32_t frindex, uint32_t sts, uint32_t mask) "level %d, frindex 0x%04x, sts 0x%x, mask 0x%x"
43 usb_ehci_guest_bug(const char *reason) "%s"
44 +usb_ehci_doorbell_ring(void) ""
45 +usb_ehci_doorbell_ack(void) ""
48 usb_uhci_reset(void) "=== RESET ==="