qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] ehci: fix compile error with EHCI_DEBUG enabled


From: Gabriel L. Somlo
Subject: [Qemu-devel] [PATCH] ehci: fix compile error with EHCI_DEBUG enabled
Date: Mon, 12 Nov 2012 09:49:19 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

This patch fixes a few debugging print statements whose arguments fell
out of sync over time with changes being made to the active code base.

Signed-off-by: Gabriel Somlo <address@hidden>
---

On Mon, Nov 12, 2012 at 11:26:18AM +0100, Gerd Hoffmann wrote:
> Seems macos doesn't like something in our ehci emulation ...
> Can you send a trace with all ehci tracepoints enabled?

Turning EHCI_DEBUG on gave me compile errors. This is my best guess
as to what the DPRINTF arguments *should* be, hope I guessed right :)

This patch works against both master and the q35 branch, BTW.

I'll reply to your email again with the debug output, figured I'd get
this out of the way first...

Thanks,
  Gabriel

 hw/usb/hcd-ehci.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c
index d9dc576..e3ccb59 100644
--- a/hw/usb/hcd-ehci.c
+++ b/hw/usb/hcd-ehci.c
@@ -1188,7 +1188,7 @@ static void ehci_execute_complete(EHCIQueue *q)
            p->async == EHCI_ASYNC_FINISHED);
 
     DPRINTF("execute_complete: qhaddr 0x%x, next %x, qtdaddr 0x%x, status 
%d\n",
-            q->qhaddr, q->qh.next, q->qtdaddr, q->usb_status);
+            q->qhaddr, q->qh.next, q->qtdaddr, p->usb_status);
 
     if (p->usb_status < 0) {
         switch (p->usb_status) {
@@ -1305,8 +1305,8 @@ static int ehci_execute(EHCIPacket *p, const char *action)
     trace_usb_ehci_packet_action(p->queue, p, action);
     ret = usb_handle_packet(p->queue->dev, &p->packet);
     DPRINTF("submit: qh %x next %x qtd %x pid %x len %zd endp %x ret %d\n",
-            q->qhaddr, q->qh.next, q->qtdaddr, q->pid,
-            q->packet.iov.size, endp, ret);
+            p->queue->qhaddr, p->queue->qh.next, p->queue->qtdaddr, p->pid,
+            p->packet.iov.size, endp, ret);
 
     if (ret > BUFF_SIZE) {
         fprintf(stderr, "ret from usb_handle_packet > BUFF_SIZE\n");
-- 
1.7.7.6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]