From patchwork Thu Nov 1 15:54:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 196325 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 A0B7E2C0345 for ; Fri, 2 Nov 2012 05:13:15 +1100 (EST) Received: from localhost ([::1]:52325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTx7Y-0006Zc-PM for incoming@patchwork.ozlabs.org; Thu, 01 Nov 2012 11:55:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTx6a-0004C3-Ot for qemu-devel@nongnu.org; Thu, 01 Nov 2012 11:54:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTx6W-00082m-Bc for qemu-devel@nongnu.org; Thu, 01 Nov 2012 11:54:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTx6W-00081L-2G for qemu-devel@nongnu.org; Thu, 01 Nov 2012 11:54:48 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA1FslCh031737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 1 Nov 2012 11:54:47 -0400 Received: from rincewind.home.kraxel.org (ovpn-116-42.ams2.redhat.com [10.36.116.42]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qA1FskDU000576; Thu, 1 Nov 2012 11:54:46 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id DBD0D42942; Thu, 1 Nov 2012 16:54:44 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 1 Nov 2012 16:54:20 +0100 Message-Id: <1351785284-15384-8-git-send-email-kraxel@redhat.com> In-Reply-To: <1351785284-15384-1-git-send-email-kraxel@redhat.com> References: <1351785284-15384-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 07/31] xhci: add port trace points 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 Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 6 +++++- trace-events | 2 ++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 84d1b26..3259638 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -2391,12 +2391,14 @@ static void xhci_port_update(XHCIPort *port, int is_detach) } } set_field(&port->portsc, pls, PORTSC_PLS); + trace_usb_xhci_port_link(port->portnr, pls); xhci_port_notify(port, PORTSC_CSC); } static void xhci_port_reset(XHCIPort *port) { - DPRINTF("xhci: port %d reset\n", port); + trace_usb_xhci_port_reset(port->portnr); + if (!xhci_port_have_device(port)) { return; } @@ -2408,6 +2410,7 @@ static void xhci_port_reset(XHCIPort *port) case USB_SPEED_FULL: case USB_SPEED_HIGH: set_field(&port->portsc, PLS_U0, PORTSC_PLS); + trace_usb_xhci_port_link(port->portnr, PLS_U0); port->portsc |= PORTSC_PED; break; } @@ -2574,6 +2577,7 @@ static void xhci_port_write(void *ptr, hwaddr reg, /* overwrite PLS only when LWS=1 */ uint32_t pls = get_field(val, PORTSC_PLS); set_field(&portsc, pls, PORTSC_PLS); + trace_usb_xhci_port_link(port->portnr, pls); } /* read/write bits */ portsc &= ~(PORTSC_PP|PORTSC_WCE|PORTSC_WDE|PORTSC_WOE); diff --git a/trace-events b/trace-events index 7ee21e5..0cb991e 100644 --- a/trace-events +++ b/trace-events @@ -333,6 +333,8 @@ usb_xhci_irq_msix_use(uint32_t nr) "nr %d" usb_xhci_irq_msix_unuse(uint32_t nr) "nr %d" usb_xhci_queue_event(uint32_t vector, uint32_t idx, const char *trb, const char *evt, uint64_t param, uint32_t status, uint32_t control) "v %d, idx %d, %s, %s, p %016" PRIx64 ", s %08x, c 0x%08x" usb_xhci_fetch_trb(uint64_t addr, const char *name, uint64_t param, uint32_t status, uint32_t control) "addr %016" PRIx64 ", %s, p %016" PRIx64 ", s %08x, c 0x%08x" +usb_xhci_port_reset(uint32_t port) "port %d" +usb_xhci_port_link(uint32_t port, uint32_t pls) "port %d, pls %d" usb_xhci_slot_enable(uint32_t slotid) "slotid %d" usb_xhci_slot_disable(uint32_t slotid) "slotid %d" usb_xhci_slot_address(uint32_t slotid) "slotid %d"