dwc2: USB host broken if device is plugged in during boot

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

 



Hi,

i want to report an very old issue (AFAIK this never worked) on Rasberry
Pi boards without onboard USB hub (e.g. Rpi 3 A+ or Zero). In case a USB
device like mouse or keyboard was connected during boot of the board,
USB wasn't functional (device powered, but no reaction to input). A
reconnect of the USB device doesn't have any effect.

The other Raspberry Pi boards like Rpi 3 B+ are not affected by this issue.

In older Kernel versions there were some log messages which made it
clear something is wrong. Example Linux 5.11 (arm/multi_v7_defconfig on
Raspberry Pi 3 A+):

[    4.585706] dwc2 3f980000.usb: supply vusb_d not found, using dummy
regulator
[    4.605224] dwc2 3f980000.usb: supply vusb_a not found, using dummy
regulator
[    4.685398] dwc2 3f980000.usb: DWC OTG Controller
[    4.702017] dwc2 3f980000.usb: new USB bus registered, assigned bus
number 1
[    4.721035] dwc2 3f980000.usb: irq 66, io mem 0x3f980000
[    4.739097] hub 1-0:1.0: USB hub found
[    4.748986] hub 1-0:1.0: 1 port detected
...
[    5.664614] usb 1-1: new full-speed USB device number 2 using dwc2
[    5.675148] systemd[1]: Detected architecture arm.
[    5.688658] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 1 -
ChHltd set, but reason is unknown
[    5.714073] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04000029
[    5.726850] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 2 -
ChHltd set, but reason is unknown
[    5.742845] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04000029
[    5.755884] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 3 -
ChHltd set, but reason is unknown
[    5.771940] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04000029
[    5.784869] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 4 -
ChHltd set, but reason is unknown
[    5.800977] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04000029
[    5.813999] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 5 -
ChHltd set, but reason is unknown
[    5.830259] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04000029
[    5.843498] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 6 -
ChHltd set, but reason is unknown
[    5.859894] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04000029
[    5.859906] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 7 -
ChHltd set, but reason is unknown
[    5.859911] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04000029
[    5.902928] dwc2 3f980000.usb: dwc2_hc_chhltd_intr_dma: Channel 0 -
ChHltd set, but reason is unknown
[    5.919390] dwc2 3f980000.usb: hcint 0x00000002, intsts 0x04000029
[    5.962043] systemd[1]: Set hostname to <raspberrypi>.
[    6.134632] usb 1-1: device descriptor read/64, error -71

In recent Kernel versions like Linux 6.6-rc1 (arm/multi_v7_defconfig on
Raspberry Pi 3 A+) this issue is more subtle and takes some time or
unplugging to appear in the kernel log:

[    4.045700] dwc2 3f980000.usb: supply vusb_d not found, using dummy
regulator
[    4.056537] dwc2 3f980000.usb: supply vusb_a not found, using dummy
regulator
[    4.118096] dwc2 3f980000.usb: DWC OTG Controller
[    4.130409] dwc2 3f980000.usb: new USB bus registered, assigned bus
number 1
[    4.145053] dwc2 3f980000.usb: irq 66, io mem 0x3f980000
[    4.158863] hub 1-0:1.0: USB hub found
[    4.166793] hub 1-0:1.0: 1 port detected
[    4.180552] clk: Disabling unused clocks
...
[   46.124104] irq 66: nobody cared (try booting with the "irqpoll" option)
[   46.124127] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.6.0-rc1 #75
[   46.124135] Hardware name: BCM2835
[   46.124147]  unwind_backtrace from show_stack+0x10/0x14
[   46.124169]  show_stack from dump_stack_lvl+0x40/0x4c
[   46.124186]  dump_stack_lvl from __report_bad_irq+0x38/0xc0
[   46.124204]  __report_bad_irq from note_interrupt+0x2ac/0x2f4
[   46.124222]  note_interrupt from handle_irq_event+0x88/0x8c
[   46.124238]  handle_irq_event from handle_level_irq+0xb4/0x1ac
[   46.124251]  handle_level_irq from generic_handle_domain_irq+0x24/0x34
[   46.124262]  generic_handle_domain_irq from bcm2835_handle_irq+0x78/0x138
[   46.124278]  bcm2835_handle_irq from generic_handle_domain_irq+0x24/0x34
[   46.124291]  generic_handle_domain_irq from
generic_handle_arch_irq+0x34/0x44
[   46.124306]  generic_handle_arch_irq from __irq_svc+0x88/0xb0
[   46.124319] Exception stack(0xc1b01f18 to 0xc1b01f60)
[   46.124326]
1f00:                                                       0001edf4
00000001
[   46.124333] 1f20: 00000000 00000000 c1b09800 c1d593e0 c1b04d18
c1a59ea8 c1b04d70 00000000
[   46.124341] 1f40: 00000000 00000000 c1d58cd8 c1b01f68 c114d98c
c114ed40 60000013 ffffffff
[   46.124347]  __irq_svc from default_idle_call+0x1c/0xb0
[   46.124361]  default_idle_call from do_idle+0x220/0x288
[   46.124378]  do_idle from cpu_startup_entry+0x18/0x1c
[   46.124392]  cpu_startup_entry from rest_init+0xac/0xb0
[   46.124407]  rest_init from arch_post_acpi_subsys_init+0x0/0x8
[   46.124430] handlers:
[   46.124433] [<d1c592c3>] dwc2_handle_common_intr
[   46.124448] [<6d3c6da4>] usb_hcd_irq
[   46.124457] Disabling IRQ #66

Until now the workaround to avoid this issue was to boot the board first
and connect the device later. It would be nice to get some instruction
to narrow this down and solve this issue.

Best regards




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux