WNDR4300 Ar934x_wmac and ehci error help needed

Hello, I have been working on my WNDR4300 this weekend.
I have selected most usb support from kernel and nls but, I still cannot mount my usb flash drive.

The kernel log shows 2 errors

one is

[    6.911714] ehci-platform ehci-platform: can't request region for resource [mem 0x1b000000-0x1b000fff]
[    6.921205] ehci-platform: probe of ehci-platform failed with error -16

this is why I believe the usb drive are not working

the other error message is more strange

[   16.238578] ath9k ar934x_wmac: Direct firmware load for soc_wmac.eeprom failed with error -2
[   16.247196] ath9k ar934x_wmac: Falling back to user helper

and I could't figure out why and how to fix these issues.

can anyone check what I am missing here?

Here is what I have selected as kernel packages

 	Package name	Version
	kmod-ath	4.9.86+2017-11-01-4
	kmod-ath9k	4.9.86+2017-11-01-4
	kmod-ath9k-common	4.9.86+2017-11-01-4
	kmod-cfg80211	4.9.86+2017-11-01-4
	kmod-crypto-crc32	4.9.86-1
	kmod-crypto-crc32c	4.9.86-1
	kmod-crypto-hash	4.9.86-1
	kmod-eeprom-93cx6	4.9.86-1
	kmod-fast-classifier	4.9.86-1
	kmod-fs-ext4	4.9.86-1
	kmod-fs-f2fs	4.9.86-1
	kmod-fuse	4.9.86-1
	kmod-gpio-button-hotplug	4.9.86-2
	kmod-ip6tables	4.9.86-1
	kmod-ipt-conntrack	4.9.86-1
	kmod-ipt-core	4.9.86-1
	kmod-ipt-ipset	4.9.86-1
	kmod-ipt-nat	4.9.86-1
	kmod-lib-crc-ccitt	4.9.86-1
	kmod-lib-crc16	4.9.86-1
	kmod-mac80211	4.9.86+2017-11-01-4
	kmod-macvlan	4.9.86-1
	kmod-nf-conntrack	4.9.86-1
	kmod-nf-conntrack-netlink	4.9.86-1
	kmod-nf-conntrack6	4.9.86-1
	kmod-nf-ipt	4.9.86-1
	kmod-nf-ipt6	4.9.86-1
	kmod-nf-nat	4.9.86-1
	kmod-nf-reject	4.9.86-1
	kmod-nf-reject6	4.9.86-1
	kmod-nfnetlink	4.9.86-1
	kmod-nls-base	4.9.86-1
	kmod-nls-cp437	4.9.86-1
	kmod-nls-iso8859-1	4.9.86-1
	kmod-nls-utf8	4.9.86-1
	kmod-ppp	4.9.86-1
	kmod-pppoe	4.9.86-1
	kmod-pppox	4.9.86-1
	kmod-scsi-core	4.9.86-1
	kmod-shortcut-fe	4.9.86-1
	kmod-slhc	4.9.86-1
	kmod-usb-core	4.9.86-1
	kmod-usb-ehci	4.9.86-1
	kmod-usb-ohci	4.9.86-1
	kmod-usb-storage	4.9.86-1
	kmod-usb-storage-extras	4.9.86-1
	kmod-usb2

Thanks a lot

i am also having this issue. did you find anything out? i am running wndr3700v4.
i have tried all of these builds: r6363+1, r6395+1, r6400+1, r6476+1, r6489+15, r6489+16, r6520, r6548+5
whats strange is i have a build from Mar 8 2018 02:41:18 on 6397 which works fine but the new builds of r6363 and r6395 don't seem to be working right.

[    8.310582] ehci-platform ehci-platform: can't request region for resource [mem 0x1b000000-0x1b000fff]
[    8.320081] ehci-platform: probe of ehci-platform failed with error -16
########
[   14.530796] ath9k ar934x_wmac: Direct firmware load for soc_wmac.eeprom failed with error -2
[   14.539432] ath9k ar934x_wmac: Falling back to user helper
########
[   14.731385] ath9k 0000:00:00.0: Direct firmware load for pci_wmac0.eeprom failed with error -2
[   14.740194] ath9k 0000:00:00.0: Falling back to user helper

Okay, i reverted this: ar71xx: fix double registration of usb host mode devices, add usb client support for qca955x and it works for me now :slight_smile:

Model: NETGEAR WNDR3700v4
Firmware Version: OpenWrt SNAPSHOT r6548+2-8e1065d681 / LuCI Master (git-18.082.53982-92408aa)
Kernel Version: 4.9.87

########
[    0.000000] Linux version 4.9.87 (beep@boop) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6485+1-5d3fbd5996) ) #0 Sat Mar 24 06:10:21 2018
########
[    8.305404] ehci-platform: EHCI generic platform driver
[    8.310839] ehci-platform ehci-platform: EHCI Host Controller
[    8.316746] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    8.326876] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    8.362015] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00

Could you instead apply on top this patch: http://patchwork.ozlabs.org/patch/884280/ (without reverting mentioned change) and let me know if it also works?

of course, building now.

it seems to work just fine with this patch on top of trunk (instead of reverting the other).

# OpenWrt SNAPSHOT r6548+2-8e1065d681
[    0.000000] Linux version 4.9.87 (beep@boop) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6485+1-5d3fbd5996) ) #0 Sat Mar 24 17:53:15 2018
########
[    8.304777] ehci-platform: EHCI generic platform driver
[    8.310202] ehci-platform ehci-platform: EHCI Host Controller
[    8.316103] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    8.326231] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    8.361446] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00

preforming a dirclean then going to rebuild and i'll post results again (with your patch applied on top again, of course)

after dirclean (using your patch) it also starts correctly for me:

# OpenWrt SNAPSHOT r6549+3-287f5ebd2f
[    0.000000] Linux version 4.9.87 (beep@boop) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6549+3-287f5ebd2f) ) #0 Sat Mar 24 18:14:20 2018
########
[    8.307679] ehci-platform: EHCI generic platform driver
[    8.313140] ehci-platform ehci-platform: EHCI Host Controller
[    8.318998] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    8.329147] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    8.361453] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00

that being said the Direct firmware load for soc_wmac.eeprom failed with error -2 and Direct firmware load for pci_wmac0.eeprom failed with error -2 are still present but im assuming unrelated to this issue since usb is now fine.

Please try this change from my staging tree:
http://git.openwrt.org/936a6736e409f4f7273aa8f6d3d97fa8896e2279

Thanks for the solutions. I will try it later. @Cutepally I currently used the lede stable release 17.1.04 before solving this problem.

on lede 17.01.4 the wmac related error will disappear after setting up wireless configuration and a reboot. I am not sure about the latest snapshot build though

ok, i reverted the patch from @pepe2k and applied your patch (it didn't take automatically for some reason so i did it manually), then i merged trunk and compiled it. it also appears to work just fine. thanks :slight_smile:

# OpenWrt SNAPSHOT r6555+6-01b835970a
Linux version 4.9.87 (beep@boop) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6549+3-287f5ebd2f) ) #0 Wed Mar 28 20:30:50 2018
#######
[    8.305945] ehci-platform: EHCI generic platform driver
[    8.311376] ehci-platform ehci-platform: EHCI Host Controller
[    8.317276] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    8.327411] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    8.361765] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00

the patch:

Date: Wed, 28 Mar 2018 16:17:26 -0400
Subject: [PATCH] ar71xx: fix ar934x usb controller resource conflict

Use the right size for the EHCI block

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 .../ar71xx/patches-4.9/920-usb-chipidea-AR933x-platform-support.patch   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ar71xx/patches-4.9/920-usb-chipidea-AR933x-platform-support.patch b/target/linux/ar71xx/patches-4.9/920-usb-chipidea-AR933x-platform-support.patch
index fc6a088932..b33bf755e9 100644
--- a/target/linux/ar71xx/patches-4.9/920-usb-chipidea-AR933x-platform-support.patch
+++ b/target/linux/ar71xx/patches-4.9/920-usb-chipidea-AR933x-platform-support.patch
@@ -85,7 +85,7 @@
 +				   irq, &ci_pdata, sizeof(ci_pdata));
 +	else
 +		ath79_usb_register("ehci-platform", -1,
-+				   AR933X_EHCI_BASE, AR933X_EHCI_SIZE,
++				   AR934X_EHCI_BASE, AR934X_EHCI_SIZE,
 +				   irq, &ath79_ehci_pdata_v2,
 +				   sizeof(ath79_ehci_pdata_v2));
 +
-- 
2.16.2

Because my patch includes exactly the same fix... it's just bigger as it changes more in chipidea support.
@nbd I will push my patch tomorrow.