- Status Closed
- Percent Complete
- 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
Opened by Russell Senior - 08.04.2017
Last edited by Mathias Kresin - 24.06.2017
FS#687 - Meraki MR24: Ethernet interface not detected correctly if cable not plugged at boot time
- Device problem occurs on
Meraki MR24 (apm821xx)
- Software versions of LEDE release, packages, etc.
Tested reboot-3921-g3169a6a7ad, but it’s been a problem since at least last September.
- Steps to reproduce
Disconnect ethernet cable, apply power, wait until device has booted, plug in ethernet, check for interfaces, no eth0 is listed.
This appears to be a problem during probing of the AR8035 Phy chip. When ethernet has no link, the phy detection fails, and eth0 is not created. Plugging ethernet later has no effect, because there is no interface as far as the kernel is concerned. The relevant part of the boot log looks like this:
this is the failing case:
[ 0.876611] /plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode [ 0.882532] /plb/opb/ethernet@ef600c00: reset timeout [ 0.888546] /plb/opb/ethernet@ef600c00: can't find PHY!
and the succeeding case:
[ 0.876672] /plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode [ 0.883952] eth0: EMAC-0 /plb/opb/ethernet@ef600c00, MAC 00:01:73:01:23:41 [ 0.890822] eth0: found Atheros 8035 Gigabit Ethernet PHY (0x01)
24.06.2017 20:39
Reason for closing: Fixed
Additional comments about closing:
Fixed with ht tps://git.lede-project.org/6adc757097ca9 66796ac213ba7f888d59b651661
Hello,
I don't have a MR24 myself. But I know that the MyBook Live. (Same single RGMII PHY setup, but with a Broadcom PHY BCM54610) doesn't have a problem with detecting the PHY during startup, even if no ethernet cable is connected to it. I've tested todays image from downloads.lede-project.org: r3925-64175ff
Since I think this is something specific to the MR24 and since you said "but it’s been a problem since at least last September.". I think it must have been a issue from the beginning. Is this correct? Or do you remember an older version, were this was working as intended?
As for debugging this. Is this phy detection error just a problem during boot-time? Or does it persist? I think you could test this by unbinding and rebinding the emac driver as root when the MR24 has finished booting and is running:
If the PHY is still not detected, then it has to be something else.
(maybe the bootloader disables the PHY via GPIO? Does Cisco advertise such a feature? In that case a dump of /sys/kernel/debug/gpio with and w/o ethernet cable attached during boot might help).
I am unaware if it ever worked. I think my initial foray into MR24 things dates from the same September period.
I tried the bind/unbind. With ethernet unplugged at boot time, then plugged in, and running the suggested command, I get this:
With ethernet plugged at boot time, I see this:
With the MR24 booted with no ethernet, the GPIOs dump as follows:
With ethernet plugged at boot time, I get these GPIOs:
I see gpio-497 has s different state, which is interesting.
gpio-497 is just the LAN LED, according to target/linux/apm821xx/dts/MR24.dts:
When booted with ethernet unplugged:
Then trying to bind:
When booted with ethernet plugged:
Then unbind, ls, bind with cable still plugged:
Now, remove the ethernet and repeat:
Chris Blake was also able to reproduce this issue with his unit. Problem is we are currently stuck on what's going on with regards to the AR8035.
It's likely that the u-boot is powering down the (inactive) phy before handing
control over to the LEDE installation. This is because the MX60 (same Generation, but it is the router) does disable the ports as some sort of "security measure".
I think in order to debug this, it will be necessary to look what is happening to the phy chip. Can you probe the individual pins of the chip with a digital oscilloscope? The most important pins would be the reset pin (Pin 1), the XI clocks (Pin 5 and Pin 4). Of course it would be better, if you can also probe the MDC/MDIO(pin 40 and pin 39) and see if u-boot is disabling the PHY and how.
you can find a datasheet with the pinout with google
(i.e.: <https://www.redeszone.net/app/uploads/2014/04/AR8035.pdf> )
The Pinout is on page 4. The Power-on Sequence is explained on page 26.
Note: We looked into meraki-linux's source as well. But there are no modifications to the emac driver, apart from adding the PHY to the list of known phys. I don't have a MR24 myself, but given this information, I wonder what Meraki's stock firmware is doing in this case. Can you reflash the original firmware and provide a bootlog? Just in case there's some note or hint in it.
A patch has been sent to the LEDE-ML:
<https://patchwork.ozlabs.org/patch/772731/>
The fix has also been accepted upstream by David Miller:
<https://patchwork.ozlabs.org/patch/772436/>
@dedeckeh
Can you please look again? The patch is still waiting (marked as new) in LEDE's patchwork: <https://patchwork.ozlabs.org/patch/772731/>
I can't find it in either the main source.git or in your staging tree either.
Closed by accident; reopened again.
sorry for the noise