]> 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)
commit809d8119eb26ca2dc67251abd1b896314f53ee22
tree53da0870879d3b14fa9ca03c45f5069dea1b4cbd
parent34c8363f5489c45e10db3904944d9a9306d25359
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: cb86f982b515 ("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