[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e39dd60e-0514-4eb6-9f6e-ee38a7e25dc6@lunn.ch>
Date: Mon, 10 Apr 2023 16:56:20 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Vladimir Oltean <vladimir.oltean@....com>
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
> hmmm... why does this work?
>
> would you mind adding this small debug print and booting again?
mv88e6xxx_translate_cmode: cmode 4, supported: supported=7
CMODE 4 is 'RMII PHY' or 'RMII to PHY', depending on if it has found a
PHY or not.
mv88e6085 mdio_mux-0.1:00: phylink_validate: supported_interfaces=1,3,7, interface rev-rmii
mv88e6085 mdio_mux-0.1:00: phylink_validate: supported_interfaces=1,3,7, interface rev-rmii
mv88e6085 mdio_mux-0.1:00: configuring for fixed/rev-rmii link mode
Both calls to phylink_validate() then returning -EINVAL.
The first call is from phylink_create(), which does not check the
return value.
The second call is from phylink_parse_fixedlink(), which also does not
check the return code.
This is a bit fragile, all it would need is for these return values to
be checked and it would break. So i think cmode 4 should return
REVRMII and cmode 5 shoud be RMII. I will submit a patch making this
change.
Andrew
Powered by blists - more mailing lists