USB 2.0 on RPI CM4 no longer works on 6.1.28

Development on core packages and the distribution goes on in here.

USB 2.0 on RPI CM4 no longer works on 6.1.28

Postby baslking » Tue May 16, 2023 9:30 am

Linux 6.1.28-3-rpi-ARCH
>uname -a is:
Linux pi-nas 6.1.28-3-rpi-ARCH #1 SMP PREEMPT Mon May 15 12:00:19 MDT 2023 aarch64 GNU/Linux

I upgraded today to from 6.1.27 to 6.1.28 RPI and my USB 2.0 bus (notably a UPS) no longer works correctly.
> usbhid-dump
No matching HID interfaces
> usb-devices
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev=06.01
S: Manufacturer=Linux 6.1.28-3-rpi-ARCH dwc2_hsotg
S: Product=DWC OTG Controller
S: SerialNumber=fe980000.usb
C: #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

Hub but no devices

>lsusb -v struggles (long pause) than prints info indicating there is a device sort of.

I've been running this with dwc2 for a couple years without issues:
dtoverlay=dwc2,dr_mode=host
I tried dwc-otg but it seemed worse.

I get a Kernel trace at boot that is pertinent but way beyond my skill level:
------------[ cut here ]------------
May 16 11:09:01 pi-nas kernel: bcm2835-isp bcm2835-isp: Register capture node 1 with media controller
May 16 11:09:01 pi-nas kernel: dwc2 fe980000.usb: swiotlb addr 0xffffffffffffffff+8 overflow (mask ffffffff, bus limit ffffffff).
May 16 11:09:01 pi-nas kernel: bcm2835-isp bcm2835-isp: Register capture node 2 with media controller
May 16 11:09:01 pi-nas kernel: WARNING: CPU: 1 PID: 155 at kernel/dma/swiotlb.c:885 swiotlb_map+0x2b4/0x2c4
May 16 11:09:01 pi-nas kernel: bcm2835-isp bcm2835-isp: Register capture node 3 with media controller
May 16 11:09:01 pi-nas kernel: Modules linked in: bcm2835_codec(C) bcm2835_v4l2(C) bcm2835_isp(C+) rpivid_hevc(C) rtc_pcf85063 bcm2835_mmal_vchiq(C)
May 16 11:09:01 pi-nas kernel: bcm2835-isp bcm2835-isp: Loaded V4L2 bcm2835-isp
May 16 11:09:01 pi-nas kernel: v4l2_mem2mem videobuf2_vmalloc videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 snd_bcm2835(C) videobuf2_common snd_pcm vc_sm>
May 16 11:09:01 pi-nas kernel: CPU: 1 PID: 155 Comm: kworker/1:2 Tainted: P C O 6.1.28-3-rpi-ARCH #1
May 16 11:09:01 pi-nas kernel: Hardware name: Raspberry Pi Compute Module 4 Rev 1.0 (DT)
May 16 11:09:01 pi-nas kernel: Workqueue: usb_hub_wq hub_event
May 16 11:09:01 pi-nas kernel: pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
May 16 11:09:01 pi-nas kernel: pc : swiotlb_map+0x2b4/0x2c4
May 16 11:09:01 pi-nas kernel: lr : swiotlb_map+0x2b4/0x2c4
May 16 11:09:01 pi-nas kernel: sp : ffffffc0086bb880
May 16 11:09:01 pi-nas kernel: x29: ffffffc0086bb880 x28: ffffffd7660a53a0 x27: ffffff8101111800
May 16 11:09:01 pi-nas kernel: x26: ffffffd7657e2a38 x25: ffffffffffffffff x24: 0000000000000000
May 16 11:09:01 pi-nas kernel: x23: ffffff810020e410 x22: 0000000000000001 x21: 0000000000000000
May 16 11:09:01 pi-nas kernel: x20: 0000000000000008 x19: 000000010924f380 x18: 0000000000000006
May 16 11:09:01 pi-nas kernel: x17: 6d2820776f6c6672 x16: 65766f20382b6666 x15: 6666666666666666
May 16 11:09:01 pi-nas kernel: x14: 0050a68d1f24b046 x13: ffffffd76572b6a0 x12: ffffffd765f28910
May 16 11:09:01 pi-nas kernel: x11: 0000000000000001 x10: 0000000000001a80 x9 : ffffffd7656eee38
May 16 11:09:01 pi-nas kernel: x8 : ffffffc0086bb5f8 x7 : 0000000000000000 x6 : 00000000000000d0
May 16 11:09:01 pi-nas kernel: x5 : ffffffd765f29000 x4 : ffffffd765f29070 x3 : 0000000000000000
May 16 11:09:01 pi-nas kernel: x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffff810322be00
May 16 11:09:01 pi-nas kernel: Call trace:
May 16 11:09:01 pi-nas kernel: swiotlb_map+0x2b4/0x2c4
May 16 11:09:01 pi-nas kernel: dma_map_page_attrs+0xa0/0x200
May 16 11:09:01 pi-nas kernel: usb_hcd_map_urb_for_dma+0x170/0x470
May 16 11:09:01 pi-nas kernel: dwc2_map_urb_for_dma+0x58/0x130 [dwc2]
May 16 11:09:01 pi-nas kernel: usb_hcd_submit_urb+0xb0/0x950
May 16 11:09:01 pi-nas kernel: usb_submit_urb+0x29c/0x5c0
May 16 11:09:01 pi-nas kernel: usb_start_wait_urb+0x78/0x11c
May 16 11:09:01 pi-nas kernel: usb_control_msg+0xc8/0x140
May 16 11:09:01 pi-nas kernel: hub_port_init+0x3dc/0xc80
May 16 11:09:01 pi-nas kernel: hub_event+0x968/0x159c
May 16 11:09:01 pi-nas kernel: process_one_work+0x200/0x474
May 16 11:09:01 pi-nas kernel: worker_thread+0x74/0x43c
May 16 11:09:01 pi-nas kernel: kthread+0xfc/0x110
May 16 11:09:01 pi-nas kernel: ret_from_fork+0x10/0x20
May 16 11:09:01 pi-nas kernel: ---[ end trace 0000000000000000 ]---

Anyone else seen this?
Last edited by baslking on Tue May 16, 2023 12:30 pm, edited 1 time in total.
baslking
 
Posts: 7
Joined: Thu Feb 18, 2021 10:53 pm

Re: USB 2.0 on RPI CM4 no longer works on 6.1.28

Postby graysky » Tue May 16, 2023 10:20 am

What was the last-known-good kernel? Post the output from:
$this->bbcode_second_pass_code('', 'tac /var/log/pacman.log | grep -m 1 'upgraded linux-rpi'')

If you downgrade to that kernel, and reboot (without changing any other packages), does the problem go away?
If it does go away, that suggests an upstream bug. If true, please report it upstream.
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: USB 2.0 on RPI CM4 no longer works on 6.1.28

Postby baslking » Tue May 16, 2023 12:24 pm

Yes I confirm that reverting to 6.1.27-1 solves the problem entirely

I reported an upstream bug:
https://github.com/raspberrypi/linux/issues/5470

The bug reporting is all Raspian centered, hopefully the information that I gave is appropriate
baslking
 
Posts: 7
Joined: Thu Feb 18, 2021 10:53 pm

Re: USB 2.0 on RPI CM4 no longer works on 6.1.28

Postby graysky » Tue May 16, 2023 12:47 pm

I added their commits to the report/let's see what they say.
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: USB 2.0 on RPI CM4 no longer works on 6.1.28

Postby baslking » Tue May 16, 2023 8:01 pm

By setting
otg_mode=1
in /boot/config.txt
in place of
dtoverlay=dwc2
or
dtoverlay=dwc2,dr_mode=host
or
dtoverlay=dwc-otg

The problem seems to be resolved

This option is not in:
/boot/overlays/README
but can be found in https://www.raspberrypi.com/documentati ... g_txt.html
baslking
 
Posts: 7
Joined: Thu Feb 18, 2021 10:53 pm


Return to Arch Linux ARM

Who is online

Users browsing this forum: No registered users and 2 guests