qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <daahern@cisco.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] ehci: minor updates/bugfixes to debug statements
Date: Tue, 20 Apr 2010 21:53:28 -0600	[thread overview]
Message-ID: <1271822008-22337-1-git-send-email-daahern@cisco.com> (raw)

Minor updates/bugfixes to debug statements.

 Signed-off-by: David Ahern <daahern@cisco.com>

---
 hw/usb-ehci.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
index 218d590..c91a6b5 100644
--- a/hw/usb-ehci.c
+++ b/hw/usb-ehci.c
@@ -899,7 +899,7 @@ static int ehci_buffer_rw(uint8_t *buffer, EHCIqh *qh, int bytes, int rw)
     }
 
     offset = qh->bufptr[0] & ~QTD_BUFPTR_MASK;
-    DPRINTF("ehci_buffer_rw: %sing %d bytes %08x cpage %d offset\n",
+    DPRINTF("ehci_buffer_rw: %sing %d bytes %08x cpage %d offset %d\n",
            rw ? "writ" : "read", bytes, qh->bufptr[0], cpage, offset);
 
     do {
@@ -962,8 +962,8 @@ static int ehci_execute_complete(EHCIState *ehci,
     i = ehci->async_port_in_progress;
     ehci->async_port_in_progress = -1;
 
-    DPRINTF("execute_complete: qhaddr 0x%x, qtdaddr 0x%x, status %d\n",
-           ehci->qhaddr, ehci->qtdaddr, ret);
+    DPRINTF("execute_complete: qhaddr 0x%x, next %x, qtdaddr 0x%x, status %d\n",
+           ehci->qhaddr, qh->next, ehci->qtdaddr, ret);
 
     if (ret < 0) {
 err:
@@ -1139,8 +1139,8 @@ static int ehci_execute(EHCIState *ehci, EHCIqh *qh)
 
         ret = dev->info->handle_packet(dev, &ehci->usb_packet);
 
-        DPRINTF("submit: qh %x qtd %x pid %x len %d (total %d) endp %x ret %d\n",
-                ehci->qhaddr, ehci->qtdaddr, ehci->pid,
+        DPRINTF("submit: qh %x next %x qtd %x pid %x len %d (total %d) endp %x ret %d\n",
+                ehci->qhaddr, qh->next, ehci->qtdaddr, ehci->pid,
                 ehci->usb_packet.len, ehci->tbytes, endp, ret);
 
         if (ret != USB_RET_NODEV)
@@ -1372,14 +1372,14 @@ static int ehci_state_fetchentry(EHCIState *ehci, int async, int *state)
 
     switch (NLPTR_TYPE_GET(entry)) {
     case NLPTR_TYPE_QH:
-        DPRINTF_ST("FETCHENTRY: entry %X is a Queue Head\n", *entry);
+        DPRINTF_ST("FETCHENTRY: entry %X is a Queue Head\n", entry);
         *state = EST_FETCHQH;
         ehci->qhaddr = entry;
         again = 1;
         break;
 
     case NLPTR_TYPE_ITD:
-        DPRINTF_ST("FETCHENTRY: entry %X is an ITD\n", *entry);
+        DPRINTF_ST("FETCHENTRY: entry %X is an ITD\n", entry);
         *state = EST_FETCHITD;
         ehci->itdaddr = entry;
         again = 1;
@@ -1416,7 +1416,7 @@ static int ehci_state_fetchqh(EHCIState *ehci, int async, int *state)
         }
     }
 
-#if 0
+#if EHCI_DEBUG
     if (ehci->qhaddr != qh->next) {
     DPRINTF("FETCHQH:  QH 0x%08x (h %x halt %x active %x) next 0x%08x\n",
                ehci->qhaddr, 
@@ -1495,9 +1495,9 @@ static int ehci_state_advqueue(EHCIState *ehci, int async, int *state)
     if (((ehci->qh.token & QTD_TOKEN_TBYTES_MASK) != 0) &&
         (NLPTR_TBIT(ehci->qh.altnext_qtd) == 0)) {
         DPRINTF_ST("ADVQUEUE: goto alt next qTD. "
-                   "curr 0x%08x next 0x%08x alt 0x%08x\n",
+                   "curr 0x%08x next 0x%08x alt 0x%08x (next qh %x)\n",
                    ehci->qh.current_qtd, ehci->qh.altnext_qtd,
-                   ehci->qh.next_qtd);
+                   ehci->qh.next_qtd, ehci->qh.next);
         ehci->qtdaddr = ehci->qh.altnext_qtd;
         *state = EST_FETCHQTD;
 
@@ -1505,9 +1505,9 @@ static int ehci_state_advqueue(EHCIState *ehci, int async, int *state)
      *  next qTD is valid
      */
     } else if (NLPTR_TBIT(ehci->qh.next_qtd) == 0) {
-        DPRINTF_ST("ADVQUEUE: next qTD. curr 0x%08x next 0x%08x alt 0x%08x\n",
+        DPRINTF_ST("ADVQUEUE: next qTD. curr 0x%08x next 0x%08x alt 0x%08x (next qh %x)\n",
                    ehci->qh.current_qtd, ehci->qh.altnext_qtd, 
-                   ehci->qh.next_qtd);
+                   ehci->qh.next_qtd, ehci->qh.next);
         ehci->qtdaddr = ehci->qh.next_qtd;
         *state = EST_FETCHQTD;
 
-- 
1.6.6.1

             reply	other threads:[~2010-04-21  3:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-21  3:53 David Ahern [this message]
2010-04-23  7:53 ` [Qemu-devel] Re: [PATCH] ehci: minor updates/bugfixes to debug statements Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1271822008-22337-1-git-send-email-daahern@cisco.com \
    --to=daahern@cisco.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).