From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7Qia-0007Wv-Ui for qemu-devel@nongnu.org; Tue, 13 Mar 2012 08:20:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S7Qi8-0000vt-TB for qemu-devel@nongnu.org; Tue, 13 Mar 2012 08:20:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S7Qi8-0000vB-LQ for qemu-devel@nongnu.org; Tue, 13 Mar 2012 08:20:16 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2DCKF0L005727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 13 Mar 2012 08:20:15 -0400 From: Gerd Hoffmann Date: Tue, 13 Mar 2012 13:20:03 +0100 Message-Id: <1331641211-20077-7-git-send-email-kraxel@redhat.com> In-Reply-To: <1331641211-20077-1-git-send-email-kraxel@redhat.com> References: <1331641211-20077-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 06/14] uhci: pass addr to uhci_async_alloc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Also do async->td initialization in uhci_async_alloc now. Prepares for adding tracepoints. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 5c708cf..476db1f 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -198,11 +198,12 @@ static void uhci_queue_free(UHCIQueue *queue) g_free(queue); } -static UHCIAsync *uhci_async_alloc(UHCIQueue *queue) +static UHCIAsync *uhci_async_alloc(UHCIQueue *queue, uint32_t addr) { UHCIAsync *async = g_new0(UHCIAsync, 1); async->queue = queue; + async->td = addr; usb_packet_init(&async->packet); pci_dma_sglist_init(&async->sgl, &queue->uhci->dev, 1); @@ -814,7 +815,7 @@ static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td, uint32_t *in } /* Allocate new packet */ - async = uhci_async_alloc(uhci_queue_get(s, td)); + async = uhci_async_alloc(uhci_queue_get(s, td), addr); if (!async) return 1; @@ -822,7 +823,6 @@ static int uhci_handle_td(UHCIState *s, uint32_t addr, UHCI_TD *td, uint32_t *in * for initial isochronous requests */ async->queue->valid = 32; - async->td = addr; async->isoc = td->ctrl & TD_CTRL_IOS; max_len = ((td->token >> 21) + 1) & 0x7ff; -- 1.7.1