Hi Minas, On Tue, Jun 29, 2021 at 6:30 PM Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx> wrote: > > Hi Alan, > > On Tue, Jun 29, 2021 at 6:18 PM Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > [...] > > > > usbcore.autosuspend=-1 > > > wow, this helps indeed > > > my steps are: > > > - power off my Odroid-C1+ > > > - unplug all USB devices > > > - boot with usbcore.autosuspend=-1 in the kernel cmdline > > > - plugin my Corsair Voyager USB 3.0 flash drive (which was only > > > detected before if an additional USB 2.0 flash drive was plugged in > > > during boot) > > > -> without any lsusb magic the device was immediately recognized > > > > That does show pretty convincingly that runtime suspend is causing the > > problem. But I still have no idea why the problem affects some devices > > and not others. It's a mystery. > Maybe because there's two related problems (I am guessing here): > The first issue is that USB hotplug is not working at all on my > Odroid-C1+ (which means: dwc2 + GL852G USB hub). > The second issue is that the workaround we had before (running lsusb > -vv to make "hot plugged" devices show up) is not working for some USB > devices. > > It seems that using a different workaround (usbcore.autosuspend=-1) > makes *all* USB devices show up - even without any "lsusb -vv" call. > So I think we should focus on the first issue as it may also fix the > other problem as well. above paragraph sums up the issues which Matt and I are seeing (on Odroid-C1+ and Odroid-C2) in case you didn't follow the full email thread > [...] > > > after rebooting without usbcore.autosuspend=-1 (and no USB device > > > plugged in during boot): > > > # grep "" /sys/bus/usb/devices/*/power/autosuspend > > > /sys/bus/usb/devices/1-1/power/autosuspend:0 > > > /sys/bus/usb/devices/usb1/power/autosuspend:0 > > > > > > I think the next step is narrowing down which component is causing this issue. > > > > Maybe Minas can help. He knows a lot more about dwc2 than I do (which > > is practically nothing). > I'll wait for Minas then I have attached the dwc2 debugfs output to this email as well as I think that it'll be useful unfortunately I could not attach the "regdump" because that hangs my Odroid-C1+ (not sure but this seems like an unrelated issue?) in params.c dwc2_set_amlogic_params is used to override a few hardware parameters. power_down is one of them (although Alan's comment suggests that it may not be related) is overwritten there to DWC2_POWER_DOWN_PARAM_NONE. When removing that overriding then the value (probably as set by the designer) is DWC2_POWER_DOWN_PARAM_PARTIAL. Best regards, Martin
/sys/kernel/debug/usb/c90c0000.usb/dr_mode:host /sys/kernel/debug/usb/c90c0000.usb/fifo:Non-periodic FIFOs: /sys/kernel/debug/usb/c90c0000.usb/fifo:RXFIFO: Size 512 /sys/kernel/debug/usb/c90c0000.usb/fifo:NPTXFIFO: Size 500, Start 0x00000200 /sys/kernel/debug/usb/c90c0000.usb/fifo: /sys/kernel/debug/usb/c90c0000.usb/fifo:Periodic TXFIFOs: /sys/kernel/debug/usb/c90c0000.usb/hw_params:op_mode : 5 /sys/kernel/debug/usb/c90c0000.usb/hw_params:arch : 2 /sys/kernel/debug/usb/c90c0000.usb/hw_params:dma_desc_enable : 1 /sys/kernel/debug/usb/c90c0000.usb/hw_params:enable_dynamic_fifo : 1 /sys/kernel/debug/usb/c90c0000.usb/hw_params:en_multiple_tx_fifo : 0 /sys/kernel/debug/usb/c90c0000.usb/hw_params:rx_fifo_size : 2048 /sys/kernel/debug/usb/c90c0000.usb/hw_params:host_nperio_tx_fifo_size : 2048 /sys/kernel/debug/usb/c90c0000.usb/hw_params:dev_nperio_tx_fifo_size : 0 /sys/kernel/debug/usb/c90c0000.usb/hw_params:host_perio_tx_fifo_size : 2048 /sys/kernel/debug/usb/c90c0000.usb/hw_params:nperio_tx_q_depth : 4 /sys/kernel/debug/usb/c90c0000.usb/hw_params:host_perio_tx_q_depth : 4 /sys/kernel/debug/usb/c90c0000.usb/hw_params:dev_token_q_depth : 8 /sys/kernel/debug/usb/c90c0000.usb/hw_params:max_transfer_size : 524287 /sys/kernel/debug/usb/c90c0000.usb/hw_params:max_packet_count : 1023 /sys/kernel/debug/usb/c90c0000.usb/hw_params:host_channels : 16 /sys/kernel/debug/usb/c90c0000.usb/hw_params:hs_phy_type : 1 /sys/kernel/debug/usb/c90c0000.usb/hw_params:fs_phy_type : 0 /sys/kernel/debug/usb/c90c0000.usb/hw_params:i2c_enable : 0 /sys/kernel/debug/usb/c90c0000.usb/hw_params:num_dev_ep : 2 /sys/kernel/debug/usb/c90c0000.usb/hw_params:num_dev_perio_in_ep : 0 /sys/kernel/debug/usb/c90c0000.usb/hw_params:total_fifo_size : 1984 /sys/kernel/debug/usb/c90c0000.usb/hw_params:power_optimized : 1 /sys/kernel/debug/usb/c90c0000.usb/hw_params:utmi_phy_data_width : 1 /sys/kernel/debug/usb/c90c0000.usb/hw_params:snpsid : 0x4f54310a /sys/kernel/debug/usb/c90c0000.usb/hw_params:dev_ep_dirs : 0x0 /sys/kernel/debug/usb/c90c0000.usb/params:otg_cap : 2 /sys/kernel/debug/usb/c90c0000.usb/params:dma_desc_enable : 0 /sys/kernel/debug/usb/c90c0000.usb/params:dma_desc_fs_enable : 0 /sys/kernel/debug/usb/c90c0000.usb/params:speed : 0 /sys/kernel/debug/usb/c90c0000.usb/params:enable_dynamic_fifo : 1 /sys/kernel/debug/usb/c90c0000.usb/params:en_multiple_tx_fifo : 0 /sys/kernel/debug/usb/c90c0000.usb/params:host_rx_fifo_size : 512 /sys/kernel/debug/usb/c90c0000.usb/params:host_nperio_tx_fifo_size : 500 /sys/kernel/debug/usb/c90c0000.usb/params:host_perio_tx_fifo_size : 500 /sys/kernel/debug/usb/c90c0000.usb/params:max_transfer_size : 524287 /sys/kernel/debug/usb/c90c0000.usb/params:max_packet_count : 1023 /sys/kernel/debug/usb/c90c0000.usb/params:host_channels : 16 /sys/kernel/debug/usb/c90c0000.usb/params:phy_type : 1 /sys/kernel/debug/usb/c90c0000.usb/params:phy_utmi_width : 16 /sys/kernel/debug/usb/c90c0000.usb/params:phy_ulpi_ddr : 0 /sys/kernel/debug/usb/c90c0000.usb/params:phy_ulpi_ext_vbus : 0 /sys/kernel/debug/usb/c90c0000.usb/params:i2c_enable : 0 /sys/kernel/debug/usb/c90c0000.usb/params:ipg_isoc_en : 0 /sys/kernel/debug/usb/c90c0000.usb/params:ulpi_fs_ls : 0 /sys/kernel/debug/usb/c90c0000.usb/params:host_support_fs_ls_low_power : 0 /sys/kernel/debug/usb/c90c0000.usb/params:host_ls_low_power_phy_clk : 0 /sys/kernel/debug/usb/c90c0000.usb/params:activate_stm_fs_transceiver : 0 /sys/kernel/debug/usb/c90c0000.usb/params:activate_stm_id_vb_detection : 0 /sys/kernel/debug/usb/c90c0000.usb/params:ts_dline : 0 /sys/kernel/debug/usb/c90c0000.usb/params:reload_ctl : 1 /sys/kernel/debug/usb/c90c0000.usb/params:ahbcfg : 0xa /sys/kernel/debug/usb/c90c0000.usb/params:uframe_sched : 1 /sys/kernel/debug/usb/c90c0000.usb/params:external_id_pin_ctl : 0 /sys/kernel/debug/usb/c90c0000.usb/params:power_down : 0 /sys/kernel/debug/usb/c90c0000.usb/params:lpm : 0 /sys/kernel/debug/usb/c90c0000.usb/params:lpm_clock_gating : 0 /sys/kernel/debug/usb/c90c0000.usb/params:besl : 0 /sys/kernel/debug/usb/c90c0000.usb/params:hird_threshold_en : 0 /sys/kernel/debug/usb/c90c0000.usb/params:hird_threshold : 0 /sys/kernel/debug/usb/c90c0000.usb/params:service_interval : 0 /sys/kernel/debug/usb/c90c0000.usb/params:host_dma : 1 /sys/kernel/debug/usb/c90c0000.usb/params:g_dma : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_dma_desc : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_rx_fifo_size : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_np_tx_fifo_size : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[0] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[1] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[2] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[3] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[4] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[5] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[6] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[7] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[8] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[9] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[10] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[11] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[12] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[13] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[14] : 0 /sys/kernel/debug/usb/c90c0000.usb/params:g_tx_fifo_size[15] : 0