How to debug Ethernet connectivity
Sascha Hauer
s.hauer at pengutronix.de
Fri Dec 6 05:34:09 EST 2013
Hi Atilla,
On Fri, Dec 06, 2013 at 11:21:25AM +0100, Atilla Filiz wrote:
> Hello
>
> I have been tasked to debug a port of Barebox to our custom board. It
> has one Ethernet interface. All network related(dhcp, ping ...) tasks
> fail with "Network is down" error, although the link lights on my
> switch are on. So I did this on 2013.06:
>
> --- barebox-2013.06.0.orig/net/
> eth.c 2013-06-02 12:24:06.000000000 +0200
> +++ barebox-2013.06.0/net/eth.c 2013-12-03 16:52:40.428089000 +0100
> @@ -142,12 +142,16 @@
>
> if (force || is_timeout(last_link_check, 5 * SECOND) ||
> !eth_current->phydev->link) {
> ret = phy_update_status(eth_current->phydev);
> if (ret)
> return ret;
> last_link_check = get_time_ns();
> }
>
> + return 0;
> return eth_current->phydev->link ? 0 : -ENETDOWN;
> }
>
> This bypasses link detection and assumes the link is always up. This
> way, I got dhcp, ping and tftp working.
>
> How can I debug this further to hunt down the Ethernet problem?
> Something seems wrong with my PHY settings. This is an iMX27 based
> board. Which files/functions/structures do I need to check?
Most likely the phy_addr field in fec_platform_data is wrong.
It could also be that the pinmux for the MDIO lines to the phy
is misconfigured.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list