[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230410131157.ye3wuzs2tjsojcim@skbuf>
Date: Mon, 10 Apr 2023 16:11:57 +0300
From: Vladimir Oltean <vladimir.oltean@....com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Russell King <rmk+kernel@...linux.org.uk>, shawnguo@...nel.org,
s.hauer@...gutronix.de, arm-soc <arm@...nel.org>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 1/3] ARM: dts: imx51: ZII: Add missing phy-mode
On Mon, Apr 10, 2023 at 02:35:28PM +0200, Andrew Lunn wrote:
> I tested vf610-zii-devel-rev-c.dtb:
>
> [ 2.307416] mv88e6085 mdio_mux-0.1:00: configuring for fixed/rev-rmii link mode
> [ 2.314459] mv88e6085 mdio_mux-0.1:00: configuring for fixed/xaui link mode
> [ 2.320588] mv88e6085 mdio_mux-0.1:00: Link is Up - 100Mbps/Full - flow control off
> [ 2.327722] mv88e6085 mdio_mux-0.2:00: configuring for fixed/xaui link mode
> [ 2.334729] mv88e6085 mdio_mux-0.2:00: Link is Up - 10Gbps/Full - flow control off
> [ 2.343263] mv88e6085 mdio_mux-0.1:00: Link is Up - 10Gbps/Full - flow control off
> [ 2.396110] mv88e6085 mdio_mux-0.1:00 lan1 (uninitialized): PHY [!mdio-mux!mdio@...witch@...dio:01] driver [Marvell 88E6390 Fa)
> [ 2.498137] mv88e6085 mdio_mux-0.1:00 lan2 (uninitialized): PHY [!mdio-mux!mdio@...witch@...dio:02] driver [Marvell 88E6390 Fa)
> [ 2.566028] mv88e6085 mdio_mux-0.1:00 lan3 (uninitialized): PHY [!mdio-mux!mdio@...witch@...dio:03] driver [Marvell 88E6390 Fa)
> [ 2.663995] mv88e6085 mdio_mux-0.1:00 lan4 (uninitialized): PHY [!mdio-mux!mdio@...witch@...dio:04] driver [Marvell 88E6390 Fa)
> [ 2.746064] mv88e6085 mdio_mux-0.2:00 lan5 (uninitialized): PHY [!mdio-mux!mdio@...witch@...dio:01] driver [Marvell 88E6390 Fa)
> [ 2.834000] mv88e6085 mdio_mux-0.2:00 lan6 (uninitialized): PHY [!mdio-mux!mdio@...witch@...dio:02] driver [Marvell 88E6390 Fa)
> [ 2.933998] mv88e6085 mdio_mux-0.2:00 lan7 (uninitialized): PHY [!mdio-mux!mdio@...witch@...dio:03] driver [Marvell 88E6390 Fa)
> [ 3.016031] mv88e6085 mdio_mux-0.2:00 lan8 (uninitialized): PHY [!mdio-mux!mdio@...witch@...dio:04] driver [Marvell 88E6390 Fa)
> [ 3.033976] mv88e6085 mdio_mux-0.2:00 sff2 (uninitialized): switched to inband/2500base-x link mode
>
> So we can see link mode rev-rmii and there are no errors.
>
> Testing a board using mii, not rmii is going to be a bit harder. I
> don't have one set up right now.
hmmm... why does this work?
would you mind adding this small debug print and booting again?
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index a4111f1be375..0b9754d4db80 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -695,6 +695,10 @@ static int phylink_validate(struct phylink *pl, unsigned long *supported,
{
const unsigned long *interfaces = pl->config->supported_interfaces;
+ phylink_err(pl, "%s: supported_interfaces=%*pbl, interface %s\n",
+ __func__, (int)PHY_INTERFACE_MODE_MAX,
+ interfaces, phy_modes(state->interface));
+
if (!phy_interface_empty(interfaces)) {
if (state->interface == PHY_INTERFACE_MODE_NA)
return phylink_validate_mask(pl, supported, state,
I would've thought this check below would fail:
if (!test_bit(state->interface, interfaces))
return -EINVAL;
Powered by blists - more mailing lists