Revision 025b168c

b/hw/usb-ehci.c
600 600

  
601 601
static void ehci_trace_qh(EHCIQueue *q, target_phys_addr_t addr, EHCIqh *qh)
602 602
{
603
    trace_usb_ehci_qh(q, addr, qh->next,
604
                      qh->current_qtd, qh->next_qtd, qh->altnext_qtd,
605
                      get_field(qh->epchar, QH_EPCHAR_RL),
606
                      get_field(qh->epchar, QH_EPCHAR_MPLEN),
607
                      get_field(qh->epchar, QH_EPCHAR_EPS),
608
                      get_field(qh->epchar, QH_EPCHAR_EP),
609
                      get_field(qh->epchar, QH_EPCHAR_DEVADDR),
610
                      (bool)(qh->epchar & QH_EPCHAR_C),
611
                      (bool)(qh->epchar & QH_EPCHAR_H),
612
                      (bool)(qh->epchar & QH_EPCHAR_DTC),
613
                      (bool)(qh->epchar & QH_EPCHAR_I));
603
    /* need three here due to argument count limits */
604
    trace_usb_ehci_qh_ptrs(q, addr, qh->next,
605
                           qh->current_qtd, qh->next_qtd, qh->altnext_qtd);
606
    trace_usb_ehci_qh_fields(addr,
607
                             get_field(qh->epchar, QH_EPCHAR_RL),
608
                             get_field(qh->epchar, QH_EPCHAR_MPLEN),
609
                             get_field(qh->epchar, QH_EPCHAR_EPS),
610
                             get_field(qh->epchar, QH_EPCHAR_EP),
611
                             get_field(qh->epchar, QH_EPCHAR_DEVADDR));
612
    trace_usb_ehci_qh_bits(addr,
613
                           (bool)(qh->epchar & QH_EPCHAR_C),
614
                           (bool)(qh->epchar & QH_EPCHAR_H),
615
                           (bool)(qh->epchar & QH_EPCHAR_DTC),
616
                           (bool)(qh->epchar & QH_EPCHAR_I));
614 617
}
615 618

  
616 619
static void ehci_trace_qtd(EHCIQueue *q, target_phys_addr_t addr, EHCIqtd *qtd)
617 620
{
618
    trace_usb_ehci_qtd(q, addr, qtd->next, qtd->altnext,
619
                       get_field(qtd->token, QTD_TOKEN_TBYTES),
620
                       get_field(qtd->token, QTD_TOKEN_CPAGE),
621
                       get_field(qtd->token, QTD_TOKEN_CERR),
622
                       get_field(qtd->token, QTD_TOKEN_PID),
623
                       (bool)(qtd->token & QTD_TOKEN_IOC),
624
                       (bool)(qtd->token & QTD_TOKEN_ACTIVE),
625
                       (bool)(qtd->token & QTD_TOKEN_HALT),
626
                       (bool)(qtd->token & QTD_TOKEN_BABBLE),
627
                       (bool)(qtd->token & QTD_TOKEN_XACTERR));
621
    /* need three here due to argument count limits */
622
    trace_usb_ehci_qtd_ptrs(q, addr, qtd->next, qtd->altnext);
623
    trace_usb_ehci_qtd_fields(addr,
624
                              get_field(qtd->token, QTD_TOKEN_TBYTES),
625
                              get_field(qtd->token, QTD_TOKEN_CPAGE),
626
                              get_field(qtd->token, QTD_TOKEN_CERR),
627
                              get_field(qtd->token, QTD_TOKEN_PID));
628
    trace_usb_ehci_qtd_bits(addr,
629
                            (bool)(qtd->token & QTD_TOKEN_IOC),
630
                            (bool)(qtd->token & QTD_TOKEN_ACTIVE),
631
                            (bool)(qtd->token & QTD_TOKEN_HALT),
632
                            (bool)(qtd->token & QTD_TOKEN_BABBLE),
633
                            (bool)(qtd->token & QTD_TOKEN_XACTERR));
628 634
}
629 635

  
630 636
static void ehci_trace_itd(EHCIState *s, target_phys_addr_t addr, EHCIitd *itd)
b/trace-events
201 201
disable usb_ehci_mmio_change(uint32_t addr, const char *str, uint32_t new, uint32_t old) "ch mmio %04x [%s] = %x (old: %x)"
202 202
disable usb_ehci_usbsts(const char *sts, int state) "usbsts %s %d"
203 203
disable usb_ehci_state(const char *schedule, const char *state) "%s schedule %s"
204
disable usb_ehci_qh(void *q, uint32_t addr, uint32_t next, uint32_t c_qtd, uint32_t n_qtd, uint32_t a_qtd, int rl, int mplen, int eps, int ep, int devaddr, int c, int h, int dtc, int i) "q %p - QH @ %08x: next %08x qtds %08x,%08x,%08x - rl %d, mplen %d, eps %d, ep %d, dev %d, c %d, h %d, dtc %d, i %d"
205
disable usb_ehci_qtd(void *q, uint32_t addr, uint32_t next, uint32_t altnext, int tbytes, int cpage, int cerr, int pid, int ioc, int active, int halt, int babble, int xacterr) "q %p - QTD @ %08x: next %08x altnext %08x - tbytes %d, cpage %d, cerr %d, pid %d, ioc %d, active %d, halt %d, babble %d, xacterr %d"
204
disable usb_ehci_qh_ptrs(void *q, uint32_t addr, uint32_t next, uint32_t c_qtd, uint32_t n_qtd, uint32_t a_qtd) "q %p - QH @ %08x: next %08x qtds %08x,%08x,%08x"
205
disable usb_ehci_qh_fields(uint32_t addr, int rl, int mplen, int eps, int ep, int devaddr) "QH @ %08x - rl %d, mplen %d, eps %d, ep %d, dev %d"
206
disable usb_ehci_qh_bits(uint32_t addr, int c, int h, int dtc, int i) "QH @ %08x - c %d, h %d, dtc %d, i %d"
207
disable usb_ehci_qtd_ptrs(void *q, uint32_t addr, uint32_t next, uint32_t altnext) "q %p - QTD @ %08x: next %08x altnext %08x"
208
disable usb_ehci_qtd_fields(uint32_t addr, int tbytes, int cpage, int cerr, int pid) "QTD @ %08x - tbytes %d, cpage %d, cerr %d, pid %d"
209
disable usb_ehci_qtd_bits(uint32_t addr, int ioc, int active, int halt, int babble, int xacterr) "QTD @ %08x - ioc %d, active %d, halt %d, babble %d, xacterr %d"
206 210
disable usb_ehci_itd(uint32_t addr, uint32_t next, uint32_t mplen, uint32_t mult, uint32_t ep, uint32_t devaddr) "ITD @ %08x: next %08x - mplen %d, mult %d, ep %d, dev %d"
207 211
disable usb_ehci_port_attach(uint32_t port, const char *device) "attach port #%d - %s"
208 212
disable usb_ehci_port_detach(uint32_t port) "detach port #%d"

Also available in: Unified diff