Showing results for 
Search instead for 
Did you mean: 

STM32MP1 RNDIS not working after cable reconnect



I have stm32mp157c,

my own board and usb type-c for rndis.

I saw the topic

But it wasn't helpful for me.

This is the error I get when I reconnect cable:

dwc2 49000000.usb-otg: new device is high-speed
dwc2 49000000.usb-otg: dwc2_hsotg_enqueue_setup: failed queue (-11)

I was thinking about creating my own VBUS int line, but If I disconnect cable and call stop

I get the error:

root@myir:~# stop
Stop usb gadget
[   46.169190] dwc2 49000000.usb-otg: dwc2_hsotg_ep_enable: No suitable fifo found
[   46.175052] ------------[ cut here ]------------
[   46.179674] WARNING: CPU: 1 PID: 1058 at kernel/dma/mapping.c:335 dma_free_attrs+0xc4/0xc8
[   46.187912] Modules linked in: brcmfmac(E) cfg80211(E) brcmutil(E) hci_uart(E) btbcm(E) spi_stm32(E) sch_fq_codel(E) ipv6(E) nf_defrag_ipv6(E)
[   46.200701] CPU: 1 PID: 1058 Comm: ifconfig Tainted: G            E     5.4.31 #1
[   46.208171] Hardware name: STM32 (Device Tree Support)
[   46.213331] [<c01124dc>] (unwind_backtrace) from [<c010d784>] (show_stack+0x10/0x14)
[   46.221056] [<c010d784>] (show_stack) from [<c0bf2854>] (dump_stack+0xb0/0xc4)
[   46.228269] [<c0bf2854>] (dump_stack) from [<c0125b24>] (__warn+0xd0/0xf8)
[   46.235138] [<c0125b24>] (__warn) from [<c0125ecc>] (warn_slowpath_fmt+0x64/0xc4)
[   46.242614] [<c0125ecc>] (warn_slowpath_fmt) from [<c0196f88>] (dma_free_attrs+0xc4/0xc8)
[   46.250790] [<c0196f88>] (dma_free_attrs) from [<c01971a4>] (dmam_free_coherent+0x38/0x9c)
[   46.259050] [<c01971a4>] (dmam_free_coherent) from [<c07f6c44>] (dwc2_hsotg_ep_enable+0x5e4/0x674)
[   46.268001] [<c07f6c44>] (dwc2_hsotg_ep_enable) from [<c084e738>] (usb_ep_enable+0x38/0x110)
[   46.276431] [<c084e738>] (usb_ep_enable) from [<c08613f0>] (eth_stop+0x9c/0xa8)
[   46.283737] [<c08613f0>] (eth_stop) from [<c0a48fb0>] (__dev_close_many+0xa4/0x124)
[   46.291390] [<c0a48fb0>] (__dev_close_many) from [<c0a55be4>] (__dev_change_flags+0xb8/0x1d4)
[   46.299906] [<c0a55be4>] (__dev_change_flags) from [<c0a55d18>] (dev_change_flags+0x18/0x48)
[   46.308342] [<c0a55d18>] (dev_change_flags) from [<c0b0a658>] (devinet_ioctl+0x5e0/0x718)
[   46.316512] [<c0b0a658>] (devinet_ioctl) from [<c0b0deb4>] (inet_ioctl+0x214/0x38c)
[   46.324164] [<c0b0deb4>] (inet_ioctl) from [<c0a2d654>] (sock_ioctl+0x544/0x688)
[   46.331554] [<c0a2d654>] (sock_ioctl) from [<c02d8598>] (do_vfs_ioctl+0x404/0x7c8)
[   46.339119] [<c02d8598>] (do_vfs_ioctl) from [<c02d8990>] (ksys_ioctl+0x34/0x60)
[   46.346505] [<c02d8990>] (ksys_ioctl) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[   46.354146] Exception stack(0xd1347fa8 to 0xd1347ff0)
[   46.359195] 7fa0:                   0006e374 bef04d5c 00000003 00008914 bef04b88 0006e374
[   46.367366] 7fc0: 0006e374 bef04d5c bef04d5c 00000036 0006e544 00000000 0006e364 00000003
[   46.375534] 7fe0: 0008e1cc bef04b1c 0002c98b 410c6058
[   46.380574] ---[ end trace c3db4fda114c650a ]---

But If I call the stop command while usb connected, It stops well, so I can disconnect cable, call start command and plug cable then It works fine.

This is how my device tree look like:

&usbotg_hs {
        compatible = "st,stm32mp15-hsotg", "snps,dwc2";
        phys = <&usbphyc_port1 0>;
        phy-names = "usb2-phy";
        dr_mode = "peripheral";
        status = "okay";

The only reason I need the usb is to use rndis, so I don't want to buy stusb1600.

Would be great If you could help me,

Thank you,



Accepted Solutions

The problem was in linux kernel version 5.4.31-r0

Moved to 5.10 and solved

Thank you

View solution in original post


The problem was in linux kernel version 5.4.31-r0

Moved to 5.10 and solved

Thank you