Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4R0S-0006NZ-7j for qemu-devel@nongnu.org; Tue, 20 Apr 2010 23:53:44 -0400 Received: from [140.186.70.92] (port=37848 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4R0Q-0006KL-Hy for qemu-devel@nongnu.org; Tue, 20 Apr 2010 23:53:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4R0O-0007jO-N4 for qemu-devel@nongnu.org; Tue, 20 Apr 2010 23:53:42 -0400 Received: from sj-iport-4.cisco.com ([171.68.10.86]:38055) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4R0O-0007jA-II for qemu-devel@nongnu.org; Tue, 20 Apr 2010 23:53:40 -0400 From: David Ahern Date: Tue, 20 Apr 2010 21:53:28 -0600 Message-Id: <1271822008-22337-1-git-send-email-daahern@cisco.com> Subject: [Qemu-devel] [PATCH] ehci: minor updates/bugfixes to debug statements List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Minor updates/bugfixes to debug statements. Signed-off-by: David Ahern --- 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