[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ccf9c80e-83e5-d207-8d09-1819cfb1cf35@televic.com>
Date: Wed, 4 Dec 2019 17:20:04 +0100
From: Jürgen Lambrecht <j.lambrecht@...evic.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
rasmus.villemoes@...vas.dk,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
vivien.didelot@...il.com
Subject: Re: net: dsa: mv88e6xxx: error parsing ethernet node from dts
On 12/4/19 4:38 PM, Andrew Lunn wrote:
>> 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
Indeed, but that also fails because this second time, reading the switch ID (macreg 3 at addr 8) fails, it returns 0x0000!??
Last register read/write was 800ms before, disabling interrupts.
Shortly after the first ID read (that succeeded 1 second before), all MAC ports have been disabled (macreg 4, PortState from forwarding to disabled). But that should have no influence on reading the ID. FYI, The switch is configured in CPU attached mode.
Any ideas?
Tomorrow I will try to run a user-space program to read/write the registers.
Thanks a lot for clarifying this,
Jürgen
Powered by blists - more mailing lists