From dcbd0b5c0ef825c02b443e11f501599d801f396a Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 19 May 2011 08:46:53 +0200 Subject: usb-ehci: trace port state Trace usb port operations (attach, detach, reset), drop a few obsolete DPRINTF's. No change in behavior. Signed-off-by: Gerd Hoffmann --- hw/usb-ehci.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'hw/usb-ehci.c') diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index 40a447b..85e5ed9 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -604,8 +604,7 @@ static void ehci_attach(USBPort *port) EHCIState *s = port->opaque; uint32_t *portsc = &s->portsc[port->index]; - DPRINTF("ehci_attach invoked for index %d, portsc 0x%x, desc %s\n", - port->index, *portsc, port->dev->product_desc); + trace_usb_ehci_port_attach(port->index, port->dev->product_desc); *portsc |= PORTSC_CONNECT; *portsc |= PORTSC_CSC; @@ -625,8 +624,7 @@ static void ehci_detach(USBPort *port) EHCIState *s = port->opaque; uint32_t *portsc = &s->portsc[port->index]; - DPRINTF("ehci_attach invoked for index %d, portsc 0x%x\n", - port->index, *portsc); + trace_usb_ehci_port_detach(port->index); *portsc &= ~PORTSC_CONNECT; *portsc |= PORTSC_CSC; @@ -733,11 +731,11 @@ static void handle_port_status_write(EHCIState *s, int port, uint32_t val) *portsc &= ~rwc; if ((val & PORTSC_PRESET) && !(*portsc & PORTSC_PRESET)) { - DPRINTF("port_status_write: USBTRAN Port %d reset begin\n", port); + trace_usb_ehci_port_reset(port, 1); } if (!(val & PORTSC_PRESET) &&(*portsc & PORTSC_PRESET)) { - DPRINTF("port_status_write: USBTRAN Port %d reset done\n", port); + trace_usb_ehci_port_reset(port, 0); usb_attach(&s->ports[port], dev); // TODO how to handle reset of ports with no device -- cgit v1.1