qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] ehci: minor updates/bugfixes to debug statements


From: David Ahern
Subject: [Qemu-devel] [PATCH] ehci: minor updates/bugfixes to debug statements
Date: Tue, 20 Apr 2010 21:53:28 -0600

Minor updates/bugfixes to debug statements.

 Signed-off-by: David Ahern <address@hidden>

---
 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 via email to

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