Skip to content

Commit

Permalink
usb: add usb host adapters exit trace
Browse files Browse the repository at this point in the history
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
gongleiarei authored and kraxel committed Aug 29, 2014
1 parent 53c3054 commit d733f74
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hw/usb/hcd-ehci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2473,6 +2473,8 @@ void usb_ehci_realize(EHCIState *s, DeviceState *dev, Error **errp)

void usb_ehci_unrealize(EHCIState *s, DeviceState *dev, Error **errp)
{
trace_usb_ehci_unrealize();

if (s->frame_timer) {
timer_del(s->frame_timer);
timer_free(s->frame_timer);
Expand Down
2 changes: 2 additions & 0 deletions hw/usb/hcd-uhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,8 @@ static void usb_uhci_exit(PCIDevice *dev)
{
UHCIState *s = DO_UPCAST(UHCIState, dev, dev);

trace_usb_uhci_exit();

if (s->frame_timer) {
timer_del(s->frame_timer);
timer_free(s->frame_timer);
Expand Down
2 changes: 2 additions & 0 deletions hw/usb/hcd-xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -3649,6 +3649,8 @@ static void usb_xhci_exit(PCIDevice *dev)
int i;
XHCIState *xhci = XHCI(dev);

trace_usb_xhci_exit();

for (i = 0; i < xhci->numslots; i++) {
xhci_disable_slot(xhci, i + 1);
}
Expand Down
3 changes: 3 additions & 0 deletions trace-events
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ usb_port_release(int bus, const char *port) "bus %d, port %s"

# hw/usb/hcd-ehci.c
usb_ehci_reset(void) "=== RESET ==="
usb_ehci_unrealize(void) "=== UNREALIZE ==="
usb_ehci_opreg_read(uint32_t addr, const char *str, uint32_t val) "rd mmio %04x [%s] = %x"
usb_ehci_opreg_write(uint32_t addr, const char *str, uint32_t val) "wr mmio %04x [%s] = %x"
usb_ehci_opreg_change(uint32_t addr, const char *str, uint32_t new, uint32_t old) "ch mmio %04x [%s] = %x (old: %x)"
Expand Down Expand Up @@ -329,6 +330,7 @@ usb_ehci_dma_error(void) ""

# hw/usb/hcd-uhci.c
usb_uhci_reset(void) "=== RESET ==="
usb_uhci_exit(void) "=== EXIT ==="
usb_uhci_schedule_start(void) ""
usb_uhci_schedule_stop(void) ""
usb_uhci_frame_start(uint32_t num) "nr %d"
Expand Down Expand Up @@ -358,6 +360,7 @@ usb_uhci_td_complete(uint32_t qh, uint32_t td) "qh 0x%x, td 0x%x"

# hw/usb/hcd-xhci.c
usb_xhci_reset(void) "=== RESET ==="
usb_xhci_exit(void) "=== EXIT ==="
usb_xhci_run(void) ""
usb_xhci_stop(void) ""
usb_xhci_cap_read(uint32_t off, uint32_t val) "off 0x%04x, ret 0x%08x"
Expand Down

0 comments on commit d733f74

Please sign in to comment.