NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-evbarm/54696: Kernel panic in bus_dma.c on Raspberry Pi 3B/3B+
On 24/11/2019 13:50, sc.dying%gmail.com@localhost wrote:
The following reply was made to PR port-arm/54696; it has been noted by GNATS.
From: sc.dying%gmail.com@localhost
To: Nick Hudson <nick.hudson%gmx.co.uk@localhost>, gnats-bugs%netbsd.org@localhost,
skrll%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost,
dhop%nwlink.com@localhost
Cc:
Subject: Re: port-evbarm/54696: Kernel panic in bus_dma.c on Raspberry Pi
3B/3B+
Date: Sun, 24 Nov 2019 13:46:50 +0000
On 2019/11/24 10:21, Nick Hudson wrote:
> New diff... Please provide a dwc2debug = 1 debug output log and maybe a
> dwc2debug = 3 debug, but that'll be very verbose iirc
>
> nick
Here.
dwc2debug=1
[snip]
I still dont know why dwc2 thinks it's sending/receiving (which is it,
sorry?) 4 bytes per isoc frame.
dwc2debug=3 is probably needed here - new diff which adds the ability
to change dwc2debug via sysctl(8) so you can change it to 3 just before
you run your audio program.
Nick
Index: sys/external/bsd/dwc2/dwc2.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/dwc2/dwc2.c,v
retrieving revision 1.59
diff -u -p -r1.59 dwc2.c
--- sys/external/bsd/dwc2/dwc2.c 19 Mar 2019 08:17:46 -0000 1.59
+++ sys/external/bsd/dwc2/dwc2.c 24 Nov 2019 10:15:31 -0000
@@ -947,7 +947,7 @@ dwc2_device_start(struct usbd_xfer *xfer
uint32_t off = 0;
int retval, err;
int alloc_bandwidth = 0;
- int i;
+ size_t i;
DPRINTFN(1, "xfer=%p pipe=%p\n", xfer, xfer->ux_pipe);
@@ -987,6 +987,13 @@ dwc2_device_start(struct usbd_xfer *xfer
DPRINTFN(3, "req = %p dma = %" PRIxBUSADDR " len %d dir %s\n",
KERNADDR(&dpipe->req_dma, 0), DMAADDR(&dpipe->req_dma, 0),
len, dir == UE_DIR_IN ? "in" : "out");
+ } else if (xfertype == UE_ISOCHRONOUS) {
+ DPRINTFN(3, "xfer=%p nframes=%d flags=%d addr=%d endpt=%d,"
+ " mps=%d dir %s\n", xfer, xfer->ux_nframes, xfer->ux_flags, addr,
+ epnum, mps, dir == UT_READ ? "in" :"out");
+
+ for (len = i = 0; i < xfer->ux_nframes; i++)
+ len += xfer->ux_frlengths[i];
} else {
DPRINTFN(3, "xfer=%p len=%d flags=%d addr=%d endpt=%d,"
" mps=%d dir %s\n", xfer, xfer->ux_length, xfer->ux_flags, addr,
@@ -1081,7 +1088,7 @@ dwc2_device_start(struct usbd_xfer *xfer
"nframes %d xfertype %d\n", xfer->ux_nframes, xfertype);
for (off = i = 0; i < xfer->ux_nframes; ++i) {
- DPRINTFN(3, "xfer=%p frame=%d offset=%d length=%d\n", xfer, i,
+ DPRINTFN(3, "xfer=%p frame=%zd offset=%d length=%d\n", xfer, i,
off, xfer->ux_frlengths[i]);
dwc2_hcd_urb_set_iso_desc_params(dwc2_urb, i, off,
@@ -1477,8 +1484,11 @@ void dwc2_host_complete(struct dwc2_hsot
xfer->ux_frlengths[i] =
dwc2_hcd_urb_get_iso_desc_actual_length(
urb, i);
+ DPRINTFN(1, "xfer=%p frame=%d length=%d\n", xfer, i,
+ xfer->ux_frlengths[i]);
xfer->ux_actlen += xfer->ux_frlengths[i];
}
+ DPRINTFN(1, "xfer=%p actlen=%d (isoc)\n", xfer, xfer->ux_actlen);
}
if (xfertype == UE_ISOCHRONOUS && dbg_perio()) {
Home |
Main Index |
Thread Index |
Old Index