]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: sja1105: cache the phy-mode port property
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 30 May 2021 22:59:35 +0000 (01:59 +0300)
committerJakub Kicinski <kuba@kernel.org>
Tue, 1 Jun 2021 05:40:25 +0000 (22:40 -0700)
commitbb42e37d37f342cd57d33ff2898d2ae3e75af119
tree4e4016dd703e2185774b939e42b396c26bc08dc9
parentbccf976c1b3395856000916ad7dfb0cbb6061cb1
net: dsa: sja1105: cache the phy-mode port property

So far we've succeeded in operating without keeping a copy of the
phy-mode in the driver, since we already have the static config and we
can look at the xMII Mode Parameters Table which already holds that
information.

But with the SJA1110, we cannot make the distinction between sgmii and
2500base-x, because to the hardware's static config, it's all SGMII.
So add a phy_mode property per port inside struct sja1105_private.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/sja1105/sja1105.h
drivers/net/dsa/sja1105/sja1105_main.c