Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2738 - [ramips] dwc2 no longer sees device with 0032-USB-dwc2-add-device_reset.patch #7895

Closed
openwrt-bot opened this issue Jan 15, 2020 · 2 comments
Labels

Comments

@openwrt-bot
Copy link

atliang:

Device: AXIMCom MR-102N
Last known working OpenWrt/LEDE release: lede-17.01

The DWC2 USB controller still probes according to dmesg output; however, the kernel no longer sees any USB device being plugged in.

Step to reproduce:

  1. boot with OpenWrt 18.06 / 19.07 / trunk
  2. insert USB flash disk
  3. /sys/devices/platform/101c0000.otg/usb1/1-1 won't be available, nothing new on dmesg

Workaround:

  1. remove target/linux/ramips/patches-4.14/0032-USB-dwc2-add-device_reset.patch and rebuild kernel
  2. dmesg would show 'usb 1-1: new high-speed USB device number 2 using dwc2' when new USB device is inserted

% dmesg
[ 5.250886] dwc2 101c0000.otg: Configuration mismatch. dr_mode forced to host
[ 5.302541] dwc2 101c0000.otg: DWC OTG Controller
[ 5.312342] dwc2 101c0000.otg: new USB bus registered, assigned bus number 1
[ 5.326774] dwc2 101c0000.otg: irq 26, io mem 0x101c0000

@openwrt-bot
Copy link
Author

atliang:

A quick bisect indicates that the last known working kernel with 0032-USB-dwc2-add-device_reset.patch applied is 4.4.208; however, after switching drivers/usb/dwc2/. to 4.5.0, the device_reset patch will make the device un-discoverable.

@openwrt-bot
Copy link
Author

0x0aa:

Confirmed. With the patch removed, USB works fine on 18.06, 19.07 and master.

I recently acquired this little, obscure device "WS-WR512N1" (ramips) and flashed OpenWrt 19.07.3 on it. It worked well, but USB devices would not show up at all. I read a blog post from 2011 where the author of the port says that USB should work, so I tried older releases and sure enough, USB devices would appear on releases up to 17.01.x (kernel 4.4).

I bisected and the breaking commit is [[https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=fddc78bc116bc043fb5cd92dbc45cfd054c21af8|ramips: bump to v4.9]].

The dwc2 driver has seen a lot of development between kernels [[https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/drivers/usb/dwc2?h=v4.4.74|4.4.74]] and [[https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/drivers/usb/dwc2?h=v4.9.34|4.9.34]] and if 0032-USB-dwc2-add-device_reset.patch is applied on these newer kernels, the driver will be broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant