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 lede-17.01
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 2
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Robin Panda - 01.04.2017
Last edited by Mathias Kresin - 11.08.2017

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

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.

Closed by  Mathias Kresin
11.08.2017 16:14
Reason for closing:  Fixed
Additional comments about closing:  

Fixed with ht tps://git.lede-project.org/8c9f847a808cb be469c40b1f0a6fd9c78d3a42a4 and backported to the stable branch. The fix will be included in the next release.

sanosis commented on 15.06.2017 19:47

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.

Robin Panda commented on 18.06.2017 07:02

Workaround is as simple as reverting 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. A post on the OpenWRT mailing list indicates the only gain is APS support, but 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 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.

Project Manager
Mathias Kresin commented on 27.07.2017 16:27

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.

Georg Lippitsch commented on 09.08.2017 18:01

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

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing