]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: qca8k: fix kernel panic with legacy mdio mapping
authorAnsuel Smith <ansuelsmth@gmail.com>
Sat, 11 Sep 2021 15:50:09 +0000 (17:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 12 Sep 2021 09:47:31 +0000 (10:47 +0100)
commitc5f61798ff774726a6dca58d7f36a70be557370a
tree53da0870879d3b14fa9ca03c45f5069dea1b4cbd
parentbc3ad51ec6206f6d5edc6c09ec88f34178f369f7
net: dsa: qca8k: fix kernel panic with legacy mdio mapping

When the mdio legacy mapping is used the mii_bus priv registered by DSA
refer to the dsa switch struct instead of the qca8k_priv struct and
causes a kernel panic. Create dedicated function when the internal
dedicated mdio driver is used to properly handle the 2 different
implementation.

Fixes: b1d2bb260f60 ("net: dsa: qca8k: add support for internal phy and internal mdio")
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c