NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-arm/54614: playing with uaudio panics on rpi



>Number:         54614
>Category:       port-arm
>Synopsis:       playing with uaudio panics on rpi
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-arm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 12 13:25:00 +0000 2019
>Originator:     sc.dying%gmail.com@localhost
>Release:        NetBSD/earmv7hf 9.99.15
>Organization:
>Environment:
System: evbarm/conf/GENERIC on RPI3B
Architecture: earmv7hf
Machine: evbarm
Boardtype: Raspberry Pi 3 Model B Rev 1.2
>Description:

 Kernel panics on RPI3B while playing with uaudio(4).
Looks like zero length bus_dmamap_sync.


[  26.9767799] panic: kernel diagnostic assertion "len > 0 && offset + len <= map->dm_mapsize" failed: file "/usr/src/sys/arch/arm/arm32/bus_dma.c", line 1058 len 0 offset 0 mapsize 4096
[  26.9953700] cpu0: Begin traceback...
[  26.9953700] 0x9af2dbf4: netbsd:db_panic+0x14
[  26.9953700] 0x9af2dc0c: netbsd:vpanic+0x194
[  27.0059049] 0x9af2dc24: netbsd:__aeabi_uldivmod
[  27.0059049] 0x9af2dc94: netbsd:_bus_dmamap_sync+0xe4
[  27.0153756] 0x9af2dcb4: netbsd:usb_syncmem+0x50
[  27.0153756] 0x9af2dd14: netbsd:dwc2_device_start+0x144
[  27.0253799] 0x9af2dd34: netbsd:dwc2_device_isoc_transfer+0x48
[  27.0253799] 0x9af2dd64: netbsd:usbd_transfer+0xb0
[  27.0362750] 0x9af2dd84: netbsd:uaudio_trigger_output+0x74
[  27.0362750] 0x9af2ddcc: netbsd:audio_pmixer_output+0xf8
[  27.0473653] 0x9af2ddf4: netbsd:audio_pmixer_start+0x94
[  27.0473653] 0x9af2de64: netbsd:audio_write.isra.27+0x334
[  27.0583110] 0x9af2debc: netbsd:dofilewrite+0x80
[  27.0583110] 0x9af2deec: netbsd:sys_write+0x5c
[  27.0684191] 0x9af2dfac: netbsd:syscall+0x12c
[  27.0684191] cpu0: End traceback...
Stopped in pid 13.1 (amp) at    netbsd:cpu_Debugger+0x4:        bx      r14

 At line 1032 of sys/external/bsd/dwc2/dwc2.c usb_syncmem is called.

>		usb_syncmem(&xfer->ux_dmabuf, 0, len,
>		    dir == UE_DIR_IN ?
>			BUS_DMASYNC_PREREAD : BUS_DMASYNC_PREWRITE);

len = xfer->ux_length, however, ux_length is always 0 for isoc transfers.


>How-To-Repeat:

1. Connect uaudio device to your RPI.
If you see `ignored audio interface with X endpoints' in dmesg,
rebuild kernel with `options UAUDIO_MULTIPLE_ENDPOINTS'
2. Play music.

>Fix:

Yes, please.



Home | Main Index | Thread Index | Old Index