raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11.21k stars 5.03k forks source link

Kernel 6.6.16 freeze with rpi2 rev B when using usb device #6100

Open ipoupaille opened 7 months ago

ipoupaille commented 7 months ago

Describe the bug

When using usb device 0658:0200 (zwave stick) with zwave-js-ui inside docker with kernel 6.6 (tried 6.6.16 and 6.6.25), kernel freeze and watchdog reboot device.

Work perfectly with kernel 6.1.77.

All others devices work (usb disk, arduino serial device, dvb-t usb device)

Steps to reproduce the behaviour

Start zwave-js-ui container inside docker with cgroup rule for accessing device. https://hub.docker.com/r/zwavejs/zwave-js-ui

Device (s)

Raspberry Pi 2 Mod. B

System

OS: Alpine 3.19 [ 0.120479] raspberrypi-firmware soc:firmware: Attached to firmware from 2024-03-21T14:33:34, variant start [ 0.130506] raspberrypi-firmware soc:firmware: Firmware hash is c14213886ae1e31951022b74ce776ce7ee7023ee Kernel 6.6.16 (same with 6.6.25). Work with 6.1.77

Usb configuration: 1 zwave stick on port 2 1 powered usb hub on port 3 containing a serial usb device and a dvd-t device 2 powered disks on port 5

lsusb -tv /: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=dwc_otg/1p, 480M ID 1d6b:0002
| Port 001: Dev 002, If 0, Class=[unknown], Driver=hub/5p, 480M ID 0424:9514
|
Port 001: Dev 003, If 0, Class=[unknown], Driver=smsc95xx, 480M ID 0424:ec00
| Port 002: Dev 009, If 0, Class=[unknown], Driver=cdc_acm, 12M ID 0658:0200
|__ Port 002: Dev 009, If 1, Class=[unknown], Driver=cdc_acm, 12M ID 0658:0200
|
Port 003: Dev 004, If 0, Class=[unknown], Driver=hub/4p, 480M ID 214b:7250
| Port 001: Dev 006, If 0, Class=[unknown], Driver=hub/4p, 480M ID 214b:7250
|
Port 001: Dev 007, If 0, Class=[unknown], Driver=cdc_acm, 12M ID 2341:0042
|__ Port 001: Dev 007, If 1, Class=[unknown], Driver=cdc_acm, 12M ID 2341:0042
| Port 002: Dev 008, If 0, Class=[unknown], Driver=em28xx, 480M ID 2040:0265
|
Port 005: Dev 005, If 0, Class=[unknown], Driver=usb-storage, 480M ID 067b:2773

Logs

image

Additional context

No response

ipoupaille commented 7 months ago

It seems that -110 is a timeout error code. I do not know I can investigate. If I disable watchdog, no more reboot, but the kernel is not responsive: no answer to ping, no answer to keyboard. But all of that is working through usb I think.

b3nn0 commented 7 months ago

I have the exact same issue with a TTGO T-Motion board. It reports as ID 0483:5740 STMicroelectronics Virtual COM Port

For me, it helped when I added dtoverlay=dwc2 to config.txt, but that seems more like an ugly workaround.

It does work fine with my Debian Testing desktop on 6.6.15, so I do think it's a PI kernel specific issue.

ipoupaille commented 6 months ago

I tried it with 6.6.29. And there is no more freeze anymore. But my dvb-t stick is not working with tvheadend. I got a poll timeout error. I have not had time yet to investigate. I did not understand what are the consequences of using the dwc2 driver.