mvadkert / rpms / qemu

Forked from rpms/qemu 6 years ago
Clone
c8dfc65
From 77e3a7e6bf15a85040101e7c0990dd82abdc9e9c Mon Sep 17 00:00:00 2001
c8dfc65
From: Gerd Hoffmann <kraxel@redhat.com>
c8dfc65
Date: Fri, 31 Aug 2012 12:41:43 +0200
c8dfc65
Subject: [PATCH 312/366] ehci: add doorbell trace events
c8dfc65
c8dfc65
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
c8dfc65
---
c8dfc65
 hw/usb/hcd-ehci.c | 3 ++-
c8dfc65
 trace-events      | 2 ++
c8dfc65
 2 files changed, 4 insertions(+), 1 deletion(-)
c8dfc65
c8dfc65
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
c8dfc65
index 4564615..398f5e0 100644
c8dfc65
--- a/hw/usb/hcd-ehci.c
c8dfc65
+++ b/hw/usb/hcd-ehci.c
c8dfc65
@@ -1241,6 +1241,7 @@ static void ehci_mem_writel(void *ptr, target_phys_addr_t addr, uint32_t val)
c8dfc65
              */
c8dfc65
             s->async_stepdown = 0;
c8dfc65
             qemu_bh_schedule(s->async_bh);
c8dfc65
+            trace_usb_ehci_doorbell_ring();
c8dfc65
         }
c8dfc65
 
c8dfc65
         if (((USBCMD_RUNSTOP | USBCMD_PSE | USBCMD_ASE) & val) !=
c8dfc65
@@ -2335,7 +2336,7 @@ static void ehci_advance_async_state(EHCIState *ehci)
c8dfc65
         if (ehci->usbcmd & USBCMD_IAAD) {
c8dfc65
             /* Remove all unseen qhs from the async qhs queue */
c8dfc65
             ehci_queues_rip_unused(ehci, async, 1);
c8dfc65
-            DPRINTF("ASYNC: doorbell request acknowledged\n");
c8dfc65
+            trace_usb_ehci_doorbell_ack();
c8dfc65
             ehci->usbcmd &= ~USBCMD_IAAD;
c8dfc65
             ehci_raise_irq(ehci, USBSTS_IAA);
c8dfc65
         }
c8dfc65
diff --git a/trace-events b/trace-events
c8dfc65
index 5112a47..10bc04e 100644
c8dfc65
--- a/trace-events
c8dfc65
+++ b/trace-events
c8dfc65
@@ -264,6 +264,8 @@ usb_ehci_queue_action(void *q, const char *action) "q %p: %s"
c8dfc65
 usb_ehci_packet_action(void *q, void *p, const char *action) "q %p p %p: %s"
c8dfc65
 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"
c8dfc65
 usb_ehci_guest_bug(const char *reason) "%s"
c8dfc65
+usb_ehci_doorbell_ring(void) ""
c8dfc65
+usb_ehci_doorbell_ack(void) ""
c8dfc65
 
c8dfc65
 # hw/usb/hcd-uhci.c
c8dfc65
 usb_uhci_reset(void) "=== RESET ==="
c8dfc65
-- 
c8dfc65
1.7.12
c8dfc65