[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/35] usb/ohci: Move trace point and log ep number to help debugg
From: |
Gerd Hoffmann |
Subject: |
[PULL 03/35] usb/ohci: Move trace point and log ep number to help debugging |
Date: |
Fri, 4 Mar 2022 15:20:51 +0100 |
From: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id:
<4e3a05a64b5029a88654eab9a873fb45ac80b1a7.1643117600.git.balaton@eik.bme.hu>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb/hcd-ohci.c | 14 +++++++-------
hw/usb/trace-events | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c
index a93d6b2e9882..f915cc547351 100644
--- a/hw/usb/hcd-ohci.c
+++ b/hw/usb/hcd-ohci.c
@@ -1033,21 +1033,21 @@ static int ohci_service_td(OHCIState *ohci, struct
ohci_ed *ed)
ohci->async_td = 0;
ohci->async_complete = false;
} else {
+ dev = ohci_find_device(ohci, OHCI_BM(ed->flags, ED_FA));
+ if (dev == NULL) {
+ trace_usb_ohci_td_dev_error();
+ return 1;
+ }
+ ep = usb_ep_get(dev, pid, OHCI_BM(ed->flags, ED_EN));
if (ohci->async_td) {
/* ??? The hardware should allow one active packet per
endpoint. We only allow one active packet per controller.
This should be sufficient as long as devices respond in a
timely manner.
*/
- trace_usb_ohci_td_too_many_pending();
+ trace_usb_ohci_td_too_many_pending(ep->nr);
return 1;
}
- dev = ohci_find_device(ohci, OHCI_BM(ed->flags, ED_FA));
- if (dev == NULL) {
- trace_usb_ohci_td_dev_error();
- return 1;
- }
- ep = usb_ep_get(dev, pid, OHCI_BM(ed->flags, ED_EN));
usb_packet_setup(&ohci->usb_packet, pid, ep, 0, addr, !flag_r,
OHCI_BM(td.flags, TD_DI) == 0);
usb_packet_addbuf(&ohci->usb_packet, ohci->usb_buf, pktlen);
diff --git a/hw/usb/trace-events b/hw/usb/trace-events
index b8287b63f15d..9773cb53300d 100644
--- a/hw/usb/trace-events
+++ b/hw/usb/trace-events
@@ -51,7 +51,7 @@ usb_ohci_td_skip_async(void) ""
usb_ohci_td_pkt_hdr(uint32_t addr, int64_t pktlen, int64_t len, const char *s,
int flag_r, uint32_t cbp, uint32_t be) " TD @ 0x%.8x %" PRId64 " of %" PRId64 "
bytes %s r=%d cbp=0x%.8x be=0x%.8x"
usb_ohci_td_pkt_short(const char *dir, const char *buf) "%s data: %s"
usb_ohci_td_pkt_full(const char *dir, const char *buf) "%s data: %s"
-usb_ohci_td_too_many_pending(void) ""
+usb_ohci_td_too_many_pending(int ep) "ep=%d"
usb_ohci_td_packet_status(int status) "status=%d"
usb_ohci_ed_read_error(uint32_t addr) "ED read error at 0x%x"
usb_ohci_ed_pkt(uint32_t cur, int h, int c, uint32_t head, uint32_t tail,
uint32_t next) "ED @ 0x%.8x h=%u c=%u\n head=0x%.8x tailp=0x%.8x next=0x%.8x"
--
2.35.1
- [PULL 00/35] Kraxel 20220304 patches, Gerd Hoffmann, 2022/03/04
- [PULL 01/35] hw/usb: pacify xhciwmi.exe warning, Gerd Hoffmann, 2022/03/04
- [PULL 02/35] hw/usb/dev-mtp: create directories with a+x mode mask, Gerd Hoffmann, 2022/03/04
- [PULL 04/35] usb/ohci: Move cancelling async packet to ohci_stop_endpoints(), Gerd Hoffmann, 2022/03/04
- [PULL 03/35] usb/ohci: Move trace point and log ep number to help debugging,
Gerd Hoffmann <=
- [PULL 05/35] usb/ohci: Move USBPortOps related functions together, Gerd Hoffmann, 2022/03/04
- [PULL 06/35] usb/ohci: Merge ohci_async_cancel_device() into ohci_child_detach(), Gerd Hoffmann, 2022/03/04
- [PULL 08/35] audio: replace open-coded buffer arithmetic, Gerd Hoffmann, 2022/03/04
- [PULL 07/35] usb/ohci: Don't use packet from OHCIState for isochronous transfers, Gerd Hoffmann, 2022/03/04
- [PULL 09/35] audio: move function audio_pcm_hw_clip_out(), Gerd Hoffmann, 2022/03/04
- [PULL 10/35] audio: add function audio_pcm_hw_conv_in(), Gerd Hoffmann, 2022/03/04
- [PULL 12/35] paaudio: increase default latency to 46ms, Gerd Hoffmann, 2022/03/04
- [PULL 11/35] audio: inline function audio_pcm_sw_get_rpos_in(), Gerd Hoffmann, 2022/03/04
- [PULL 13/35] jackaudio: use more jack audio buffers, Gerd Hoffmann, 2022/03/04
- [PULL 14/35] audio: copy playback stream in sequential order, Gerd Hoffmann, 2022/03/04