On Monday, March 8, 2021 3:47 PM, Marcus Glocker <[email protected]> wrote:
> Does this patch make a difference?
>
> Index: sys/dev/usb/dwc2/dwc2.c
>
very cool, it didn't take long at all to build the patched kernel.
After rebooting:
uhub0 at usb0 configuration 1 interface 0 "Broadcom DWC2 root hub" rev
2.00/1.00 addr 1
panic: kernel diagnostic assertion "dwc2_urb->packet_count == xfer->nframes"
failed: file "/usr/src/sys/dev/usb/dwc2/dwc2.c", line 1238
Stopped at panic+0x158: mov w0, w20
TID PID UID PRFLAGS PFLAGS CPU COMMAND
*335639 18049 0 0x14000 0x200 0K usbtask
db_enter() at panic+0x154
panic() at __assert+0x24
panic() at dwc2_device_start+0x518
dwc2_device_start() at usbd_transfer+0x154
usbd_transfer() at usbd_do_request_flags+0x168
usbd_do_request_flags() at usbd_get_desc+0x40
usbd_get_desc() at usbd_new_device+0x294
https://www.openbsd.org/ddb.html describes the minimum info required in bug
reports. Insufficient info makes it difficult to find and fix bugs.
ddb{0}> show panic
kernel diagnostic assertion "dwc2_urb->packet_count == xfer->nframes" failed: f
ile "/usr/src/sys/dev/usb/dwc2/dwc2.c", line 1238
ddb{0}> trace
db_enter() at panic+0x154
panic() at __assert+0x24
panic() at dwc2_device_start+0x518
dwc2_device_start() at usbd_transfer+0x154
usbd_transfer() at usbd_do_request_flags+0x168
usbd_do_request_flags() at usbd_get_desc+0x40
usbd_get_desc() at usbd_new_device+0x294
usbd_new_device() at uhub_port_connect+0x180
uhub_port_connect() at uhub_explore+0xe0
uhub_explore() at usb_explore+0x124
usb_explore() at usb_task_thread+0xec
usb_task_thread() at proc_trampoline+0x10
ddb{0}> show registers
x0 0x1
x1 0xffffff8025213000
x2 0x40 $d.1+0x2d
x3 0x8
x4 0xffffff8025277a30
x5 0xffffff8000232600 _dmamap_sync
x6 0xb9b61bfcda4f6223
x7 0xb9b61bfcda4f6223
x8 0x1
x9 0x74ce1a129df56ed9
x10 0x8
x11 0x8
x12 0xffffffc8
x13 0x6
x14 0xffffffff
x15 0x40832055752b02bc
x16 0
x17 0x1
x18 0xffffff8025277a90
x19 0xffffff8000c1d5a4 $d.4
x20 0x100 $d.1+0xed
x21 0xffffff8000e026d8 kprintf_mutex
x22 0xffffff8000eab000 rtpcb_pool+0x110
x23 0xffffff8025277ae0
x24 0x8
x25 0
x26 0
x27 0xffffff8004a95f80 _end+0x3b41348
x28 0x1
x29 0xffffff8025277a90
x30 0
sp 0xffffff8025277a90
spsr 0x60000305
elr 0xffffff8000377450 db_enter+0x14
lr 0xffffff800029d36c panic+0x158
panic+0x158: mov w0, w20
ddb{0}> ps
PID TID PPID UID S FLAGS WAIT COMMAND
88664 425210 0 0 3 0x14200 bored crynlk
27254 105165 0 0 3 0x14200 bored crypto
19732 77573 0 0 3 0x14200 bored tztq
65386 181990 0 0 3 0x14200 hcintr sdmmc1
50323 101641 0 0 3 0x14200 bored sensors
*18049 335639 0 0 7 0x14200 usbtask
93006 370026 0 0 3 0x14200 usbatsk usbatsk
58903 336848 0 0 3 0x14200 bored dwc2
37884 260267 0 0 3 0x14200 mmctsk sdmmc0
72456 388299 0 0 1 0x14200 idle3
54895 100546 0 0 1 0x14200 idle2
60650 336070 0 0 1 0x14200 idle1
28151 15432 0 0 3 0x14200 bored softnet
83890 248860 0 0 3 0x14200 bored systqmp
97034 120580 0 0 3 0x14200 bored systq
84289 378707 0 0 3 0x40014200 bored softclock
15780 155517 0 0 3 0x40014200 idle0
54830 417921 0 0 3 0x14200 kmalloc kmthread
1 25187 0 0 3 0 initexec swapper
0 0 -1 0 3 0x10200 cfpend swapper