render / rpms / qemu

Forked from rpms/qemu 9 months ago
Clone

Blame 0312-ehci-add-doorbell-trace-events.patch

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