OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Luca Olivetti - 06.07.2018
Last edited by Mathias Kresin - 07.07.2020

FS#1634 - dwc2 on arv7518pw doesn't work (cannot be initialized)

- Device problem occurs on

   Astoria Networks ARV7518PW
  

- Software versions of OpenWrt/LEDE release, packages, etc.

       OpenWrt SNAPSHOT r7402-0f54388
   

These are the messages appearing at boot or when reloading the dwc2 module. It worked in a previous snapshot (sorry, I don’t remember which one and I overwrote the file, I also don’t know if the usb was actually working)

[ 5.431505] dwc2 1e101000.usb: 1e101000.usb supply vusb_d not found, using dummy regulator
[ 5.438418] dwc2 1e101000.usb: 1e101000.usb supply vusb_a not found, using dummy regulator
[ 5.446581] dwc2 1e101000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
[ 5.593255] dwc2 1e101000.usb: DWC OTG Controller
[ 5.596565] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[ 5.603417] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[ 5.608632] dwc2 1e101000.usb: startup error -517
[ 5.613124] dwc2 1e101000.usb: USB bus 1 deregistered
[ 5.618080] dwc2 1e101000.usb: dwc2_hcd_init() FAILED, returning -517

Closed by  Mathias Kresin
07.07.2020 04:57
Reason for closing:  Fixed
Additional comments about closing:  

Fixed with https:/ /git.openwrt.org/982468de35d499f85470b7b 547d2b27cea53bae0

Luca Olivetti commented on 07.07.2018 12:52

The same on today shapshot OpenWrt SNAPSHOT r7404-7ec931b

Luca Olivetti commented on 18.07.2018 10:08

I had to revert to 17.01.05 where, in spite of some "dwc2 1e101000.ifxhcd: Mode Mismatch Interrupt: currently in Host mode" messages the usb port works.

Project Manager
Mathias Kresin commented on 18.07.2018 11:18

Hey Luca,

Error number -517 should be EPROBE_DEFER (Driver requests probe retry).

Usually EPROBE_DEFER is returned if a subsystem on which a driver relies isn't yet initialised. The kernel will try to load the driver at a later time again. Such errors shouldn't be considered as fatal or failed. There we have our first bug.

The more interesting question is, on which subsystem - which isn't yet initialised - do we depend? Especially with reloading the dwc2 module from the user space I would expect that everything is initialised.

The following commits might be related:

With kernel 4.14 we have switched to the dwc2 driver + usb phy framework, which might introduced new bugs or start to trigger existing ones.

An easy test would be to see if OpenWrt 18.06-rc2 is affected by the issue as well. For lantiq, kernel 4.9 is the default in OpenWrt 18.06.

I'm not sure if you're the same Luca Olivetti who send some kernel/driver related patches before. But if it's you, it would be great if you can have a look at the lantiq usb phy driver (drivers/phy/lantiq/phy-lantiq-rcu-usb2.c) and/or the dwc2 kernel driver (drivers/usb/dwc2/).

Knowing which function returns the EPROBE_DEFER, might give us a hint what is going wrong.

Zuzia commented on 19.07.2018 12:10

The same on Arcadyan ARV752DPW - OpenWrt SNAPSHOT r7526-02d53e6. USB ports not working.

[ 1836.407144] dwc2 1e101000.usb: 1e101000.usb supply vusb_d not found, using dummy regulator
[ 1836.414069] dwc2 1e101000.usb: 1e101000.usb supply vusb_a not found, using dummy regulator
[ 1836.422276] dwc2 1e101000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
[ 1836.635863] dwc2 1e101000.usb: DWC OTG Controller
[ 1836.639143] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[ 1836.646062] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[ 1836.651257] dwc2 1e101000.usb: startup error -517
[ 1836.655730] dwc2 1e101000.usb: USB bus 1 deregistered
[ 1836.660718] dwc2 1e101000.usb: dwc2_hcd_init() FAILED, returning -517
Luca Olivetti commented on 18.08.2018 10:28

I thought that the default configuration of flyspray would notify me of updates, it turns out it doesn't so I read the comments just now.

I tested with the 18.06-rc2 and the dwc2 driver, while it still complains with these messages "dwc2 1e101000.ifxhcd: Mode Mismatch Interrupt: currently in Host mode", works there (at least with a memory stick and with an RT73 based wifi stick, the atheros ar9271 wifi stick that used to work with 17.01.05 doesn't work now "ath: phy3: Mac Chip Rev 0x0f.3 is not supported by this driver" but I suppose that's another bug).

BTW, why do you say the problem is probably due to switching to the dwc2 driver? the working kernel is already using it.

And, yes, I'm the same Luca but I currently don't have an openwrt development system set up.

Luca Olivetti commented on 18.08.2018 10:52

I reported the ath9k-htc bug here.

Luca Olivetti commented on 18.08.2018 11:53

I just realized that there's a 18.06.1 version available. I installed it, same symptoms (i.e., the dwc2 driver works, the ar9271 stick doesn't).

Luca Olivetti commented on 15.03.2020 18:49

I just installed openwrt 19.07.2 and the usb doesn't work at all, no message at all when I plug the rt73 stick that worked previuosly.

Luca Olivetti commented on 10.04.2020 15:01

I'll have to add to my previous message that the error message loading the dwc2 module is exactly the same as in 2018.

Luca Olivetti commented on 03.07.2020 08:51

If I revert the dst changes the usb initializes correctly but there's no power (5V) on the usb connector.
Any hint on how to restore power?

[    5.755396] dwc2 1e101000.usb: 1e101000.usb supply vusb_d not found, using dummy regulator
[    5.762310] dwc2 1e101000.usb: 1e101000.usb supply vusb_a not found, using dummy regulator
[    5.770534] dwc2 1e101000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
[    5.916348] dwc2 1e101000.usb: DWC OTG Controller
[    5.919671] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[    5.926524] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[    5.934226] hub 1-0:1.0: USB hub found
[    5.937402] hub 1-0:1.0: 1 port detected
Luca Olivetti commented on 03.07.2020 10:42

Since I'm too old to delve in the code (especially the patches of patches), I put a dummy led on gpio 14 so I could turn on the usb from userspace and it works.

Any idea on how to do it "properly"?

Luca Olivetti commented on 05.07.2020 13:08

I just posted a fix for my device and 19.07.3 on the openwrt-devel mailing list. I'm attaching it also here.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing