qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] ehci: fix compile error with EHCI_DEBUG enabled
       [not found] ` <50A0CECA.9060102@redhat.com>
@ 2012-11-12 14:49   ` Gabriel L. Somlo
  2012-11-16 13:50     ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel L. Somlo @ 2012-11-12 14:49 UTC (permalink / raw)
  To: qemu-devel, qemu-trivial; +Cc: somlo, jbaron, kraxel

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 <somlo@cmu.edu>
---

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH] ehci: fix compile error with EHCI_DEBUG enabled
  2012-11-12 14:49   ` [Qemu-trivial] [PATCH] ehci: fix compile error with EHCI_DEBUG enabled Gabriel L. Somlo
@ 2012-11-16 13:50     ` Stefan Hajnoczi
  2012-11-16 13:54       ` Gerd Hoffmann
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2012-11-16 13:50 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-trivial, jbaron, somlo, qemu-devel, Gabriel L. Somlo

On Mon, Nov 12, 2012 at 09:49:19AM -0500, Gabriel L. Somlo wrote:
> 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 <somlo@cmu.edu>
> ---
> 
> 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 :)

In that case I'll let Gerd confirm whether or not the guesses are
correct.

Gerd: can you review and take this through the USB tree?

Thanks,
Stefan


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-trivial] [Qemu-devel] [PATCH] ehci: fix compile error with EHCI_DEBUG enabled
  2012-11-16 13:50     ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi
@ 2012-11-16 13:54       ` Gerd Hoffmann
  0 siblings, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2012-11-16 13:54 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-trivial, jbaron, somlo, qemu-devel, Gabriel L. Somlo

On 11/16/12 14:50, Stefan Hajnoczi wrote:
> On Mon, Nov 12, 2012 at 09:49:19AM -0500, Gabriel L. Somlo wrote:
>> 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 :)
> 
> In that case I'll let Gerd confirm whether or not the guesses are
> correct.

Already fixed in master.

cheers,
  Gerd



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-16 13:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20121111221650.GA3575@foober.ini.cmu.edu>
     [not found] ` <50A0CECA.9060102@redhat.com>
2012-11-12 14:49   ` [Qemu-trivial] [PATCH] ehci: fix compile error with EHCI_DEBUG enabled Gabriel L. Somlo
2012-11-16 13:50     ` [Qemu-trivial] [Qemu-devel] " Stefan Hajnoczi
2012-11-16 13:54       ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).