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#670 - whr-1166d gigabit port not working #5575

Closed
openwrt-bot opened this issue Apr 1, 2017 · 4 comments
Closed

FS#670 - whr-1166d gigabit port not working #5575

openwrt-bot opened this issue Apr 1, 2017 · 4 comments
Labels

Comments

@openwrt-bot
Copy link

openwrt-bot commented Apr 1, 2017

andapanda:

This is on a WHR-1166D running 17.01.
Connections to to the gigabit (WAN) port don't work. The LuCI switch menu shows it connected and the kernel message says link up, but the status page says not connected. The 100mbit ports work fine.

It DOES work in OpenWrt CC, but if CC is sysupgraded from LEDE the port still won't work until a power cycle. Soft reboots don't work, so I suspect LEDE is setting something on the switch or phy config that CC leaves at default.

Noticed differences:
Gigabit phy is driver=ICPlus IP1001 on LEDE, generic on CC.
Switch configuration gui in LuCI is different: CC has two extra ports that LEDE doesn't. They're not exposed on the device so it makes sense to hide them. LEDE swconfig shows the "hidden" ports.

Other possibly useful info:
ifconfig shows the port sends packets (perhaps DHCP requests), but never receives anything.
swconfig shows all octets received are bad, but also fewer octets than packets...
Port 5:
mib: Port 5 MIB counters
TxGPC : 34472
TxBOC : 0
TxGOC : 56561081
TxEPC : 0
RxGPC : 3183869952
RxBOC : 13195604
RxGOC : 0
RxEPC1 : 0
RxEPC2 : 0

This device has a strange combination where one of the ports on the 7620 is connected to a 10/100 switch, but the other port is used as WAN and connected just to a gigabit phy.

@openwrt-bot
Copy link
Author

openwrt-bot commented Jun 15, 2017

sanosis:

The gigabit port works on 17.01.2 when connected to fast ethernet but when connected to gigabit switch the speed is negotiated as GBit, the switch sees the mac of 1166, but no correct packets are sent (at least I can't see any with tcpdump on the other end), but something is being sent, as counters both on the switch and 1166 go up.

@openwrt-bot
Copy link
Author

openwrt-bot commented Jun 18, 2017

andapanda:

Workaround is as simple as reverting [[https://dev.openwrt.org/changeset/47346/trunk/target/linux/ramips/mt7620/config-3.18|this post-CC change.]] Just add a #. So either the IP1001 phy driver is broken, or it's changing something that is correct by default or bootloader setup to something incorrect for this router.

Why was the driver added in the first place? It works fine with the generic driver. [[https://lists.openwrt.org/pipermail/openwrt-devel/2015-October/036807.html|A post on the OpenWRT mailing list]] indicates the only gain is APS support, but [[http://www.icplus.com.tw/data/datasheet/ip1001_ds_r17_20101013.pdf|page 24 on the datasheet]] says it's already enabled by default.

In the icplus.c init, in addition to setting APS, it also appears to set the RGMII delay mode. This is also not done by the generic driver. Datasheet page 37 says these are initialized by pins at poweron. Overwriting this with the wrong value could explain the problem.

If that's the problem, then a better fix could be setting phy-mode to rgmii-id or rgmii-rxid in the dts. Unfortunately this probably will not work because I can not find anything similar to [[https://patchwork.kernel.org/patch/9152099/|this patch.]] The comments there seem to support my theory. Another fix could be making icplus.c respect the hardware configuration, but this would affect many more devices. The bad software design is probably to make up for bad hardware design somewhere else on some other architecture.

@openwrt-bot
Copy link
Author

openwrt-bot commented Jul 27, 2017

mkresin:

First of all, excellent bug report and analysis of the issue.

Why was the driver added in the first place?

Most likely because the phy driver is required to change the chip defaults RGMII delay mode settings.

If that's the problem, then a better fix could be setting phy-mode to rgmii-id or rgmii-rxid in the dts

Would you please give the images from https://www.kresin.me/files/lede-17.01.2/targets/ramips/mt7620/ a try. One of them should fix the issue and I need to know which it is. The images should be completely compatible to the official LEDE 17.01.2 release.

@openwrt-bot
Copy link
Author

openwrt-bot commented Aug 9, 2017

lippi:

Just tried all three of your images, and the -rxid seems to fix the problem.

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