netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Jürgen Lambrecht" <j.lambrecht@televic.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	rasmus.villemoes@prevas.dk,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	vivien.didelot@gmail.com
Subject: Re: net: dsa: mv88e6xxx: error parsing ethernet node from dts
Date: Wed, 4 Dec 2019 16:38:04 +0100	[thread overview]
Message-ID: <20191204153804.GD21904@lunn.ch> (raw)
In-Reply-To: <27f65072-f3a1-7a3c-5e9e-0cc86d25ab51@televic.com>

> Here parts of dmesg (no error reported):
> 
> [    1.992342] libphy: Fixed MDIO Bus: probed
> [    2.009532] pps pps0: new PPS source ptp0
> [    2.014387] libphy: fec_enet_mii_bus: probed
> [    2.017159] mv88e6085 2188000.ethernet-1:00: switch 0x710 detected: Marvell 88E6071, revision 5
> [    2.125616] libphy: mv88e6xxx SMI: probed
> [    2.134450] fec 2188000.ethernet eth0: registered PHC device 0
> ...
> [   11.366359] Generic PHY fixed-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00, irq=POLL)
> [   11.366722] fec 2188000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
> 
> When I enable debugging in the source code, I see that mv88e6xxx_probe() fails, because *'of_find_net_device_by_node(ethernet);'* fails. But why?,

That always happens the first time. There is a chicken/egg
problem. The MDIO bus is registered by the FEC driver, the switch is
probed, and the DSA core looks for the ethernet interface. But the FEC
driver has not yet registered the interface, it is still busy
registering the MDIO bus. So you get an EPRODE_DEFFER from the switch
probe. The FEC then completes its probe, registering the
interface. Sometime later Linux retries the switch probe, and this
time it works.

What you are seeing here is the first attempt. There should be a
second go later in the log.

       Andrew

  reply	other threads:[~2019-12-04 15:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 14:18 net: dsa: mv88e6xxx: error parsing ethernet node from dts Jürgen Lambrecht
2019-12-04 15:38 ` Andrew Lunn [this message]
2019-12-04 16:20   ` Jürgen Lambrecht
2019-12-04 17:13     ` Andrew Lunn
2019-12-09  7:57       ` Jürgen Lambrecht
2019-12-09 13:43         ` Andrew Lunn
2019-12-24 10:28       ` Jürgen Lambrecht
2019-12-24 11:19         ` Andrew Lunn
2019-12-24 13:57           ` Jürgen Lambrecht
2020-01-06  7:11             ` Jürgen Lambrecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191204153804.GD21904@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=j.lambrecht@televic.com \
    --cc=netdev@vger.kernel.org \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).