From patchwork Thu Oct 25 09:47:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 194100 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A69332C00AE for ; Thu, 25 Oct 2012 20:58:48 +1100 (EST) Received: from localhost ([::1]:51974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRKD8-00040w-RC for incoming@patchwork.ozlabs.org; Thu, 25 Oct 2012 05:58:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40117) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRK2v-00012W-AE for qemu-devel@nongnu.org; Thu, 25 Oct 2012 05:48:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRK2q-0006ao-Pj for qemu-devel@nongnu.org; Thu, 25 Oct 2012 05:48:13 -0400 Received: from mail-da0-f45.google.com ([209.85.210.45]:45246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRK2q-0006Ti-Kp for qemu-devel@nongnu.org; Thu, 25 Oct 2012 05:48:08 -0400 Received: by mail-da0-f45.google.com with SMTP id n15so672798dad.4 for ; Thu, 25 Oct 2012 02:48:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:x-gm-message-state; bh=eNZoJk5OhNsJE6YgUCRNvHGRXyNcsod5fAinXZw0wz8=; b=I3Kn6UEacJGgeW/uJ7mj1BP25N+hV4KzOyvPfuTjgG2rqM+EGYDJSzUxpidKyZZX9b pyIwbGxqXTCzM0X67wT5r5xnCVovBkx0JW/ydd3PPexqrM4Ggiera3esYlHux3umPtus 0Uq8QuaTMTeKkCqCeEnS27RmTqSYcL6le2A8gA+c8NhR9zAGO84JhaED88yOCG1s6R4V 5/W4ITBsUvue2zeTkoS+pyAY+dFmEaPKXa1DDUbfSTXrkvZAHZL/WyFI5bos37eL4Kvc ey5iKHjzvfn6+cKyIixr/AGiXAM4bEBvViboWM6aO5al/kBL039OKK1WE4OhbBLxcNWb Hvfw== Received: by 10.66.78.199 with SMTP id d7mr51651411pax.77.1351158488169; Thu, 25 Oct 2012 02:48:08 -0700 (PDT) Received: from localhost ([124.148.20.9]) by mx.google.com with ESMTPS id ve6sm10956217pbc.58.2012.10.25.02.48.05 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 25 Oct 2012 02:48:07 -0700 (PDT) From: Peter Crosthwaite To: qemu-devel@nongnu.org Date: Thu, 25 Oct 2012 19:47:18 +1000 Message-Id: X-Mailer: git-send-email 1.7.0.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQm5quJYZD+slS3Ijns+C6YTlsb4p5LiEVoaJduA/DU+c/xEIGQLvbNtKznEdobOh9vKWJXp X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.45 Cc: vineshp@xilinx.com, peter.maydell@linaro.org, Peter Crosthwaite , john.williams@xilinx.com, kraxel@redhat.com, edgar.iglesias@gmail.com Subject: [Qemu-devel] [PATCH v1 7/8] usb/ehci: Debug mode compile fixes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org A few debug messages in EHCI must have missed out on updates during incremental developments. Fixed. Signed-off-by: Peter Crosthwaite --- hw/usb/hcd-ehci.c | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 394feca..78f9dfd 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1489,8 +1489,8 @@ static void ehci_execute_complete(EHCIQueue *q) assert(p->async == EHCI_ASYNC_INITIALIZED || 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); + DPRINTF("execute_complete: qhaddr 0x%x, next %x, qtdaddr 0x%x\n", + q->qhaddr, q->qh.next, q->qtdaddr); if (p->usb_status < 0) { switch (p->usb_status) { @@ -1549,6 +1549,7 @@ static int ehci_execute(EHCIPacket *p, const char *action) USBEndpoint *ep; int ret; int endp; + EHCIQueue *q = p->queue; assert(p->async == EHCI_ASYNC_NONE || p->async == EHCI_ASYNC_INITIALIZED); @@ -1560,7 +1561,7 @@ static int ehci_execute(EHCIPacket *p, const char *action) p->tbytes = (p->qtd.token & QTD_TOKEN_TBYTES_MASK) >> QTD_TOKEN_TBYTES_SH; if (p->tbytes > BUFF_SIZE) { - ehci_trace_guest_bug(p->queue->ehci, + ehci_trace_guest_bug(q->ehci, "guest requested more bytes than allowed"); return USB_RET_PROCERR; } @@ -1581,8 +1582,8 @@ static int ehci_execute(EHCIPacket *p, const char *action) break; } - endp = get_field(p->queue->qh.epchar, QH_EPCHAR_EP); - ep = usb_ep_get(p->queue->dev, p->pid, endp); + endp = get_field(q->qh.epchar, QH_EPCHAR_EP); + ep = usb_ep_get(q->dev, p->pid, endp); if (p->async == EHCI_ASYNC_NONE) { if (ehci_init_transfer(p) != 0) { @@ -1594,12 +1595,10 @@ static int ehci_execute(EHCIPacket *p, const char *action) p->async = EHCI_ASYNC_INITIALIZED; } - 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 " - "(total %d) endp %x ret %d\n", - q->qhaddr, q->qh.next, q->qtdaddr, q->pid, - q->packet.iov.size, q->tbytes, endp, ret); + trace_usb_ehci_packet_action(q, p, action); + ret = usb_handle_packet(q->dev, &p->packet); + DPRINTF("submit: qh %x next %x qtd %x pid %x (total %d) endp %x ret %d\n", + q->qhaddr, q->qh.next, q->qtdaddr, p->pid, p->tbytes, endp, ret); if (ret > BUFF_SIZE) { fprintf(stderr, "ret from usb_handle_packet > BUFF_SIZE\n");