From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXvKK-0007l4-Mj for qemu-devel@nongnu.org; Mon, 12 Nov 2012 09:49:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXvKH-00038C-Kh for qemu-devel@nongnu.org; Mon, 12 Nov 2012 09:49:28 -0500 Date: Mon, 12 Nov 2012 09:49:19 -0500 From: "Gabriel L. Somlo" Message-ID: <20121112144918.GA2107@hedwig.ini.cmu.edu> References: <20121111221650.GA3575@foober.ini.cmu.edu> <50A0CECA.9060102@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50A0CECA.9060102@redhat.com> Subject: [Qemu-devel] [PATCH] ehci: fix compile error with EHCI_DEBUG enabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Cc: somlo@cmu.edu, jbaron@redhat.com, kraxel@redhat.com 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 --- 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