]> 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)
commit0fc6c7422ee3dfe950921e6ed80055f9f7301d61
tree4e4016dd703e2185774b939e42b396c26bc08dc9
parent995429ccc7a28ffc3703afbd05f7b616ff1ae343
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