stmmac: dwmac-loongson: Make sure MDIO is initialized before use
authorYanteng Si <siyanteng@loongson.cn>
Mon, 11 Dec 2023 10:33:11 +0000 (18:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2023 16:01:49 +0000 (17:01 +0100)
commite0069c26c552c5c7f1009918eedac31a1eaa141b
tree32dbe21161e5528e7e7e68fcd5ceabfa3f549df7
parent2cc8ffc3ad31b5618ad6b34450274d3a9817ce1f
stmmac: dwmac-loongson: Make sure MDIO is initialized before use

[ Upstream commit e87d3a1370ce9f04770d789bcf7cce44865d2e8d ]

Generic code will use mdio. If it is not initialized before use,
the kernel will Oops.

Fixes: 30bba69d7db4 ("stmmac: pci: Add dwmac support for Loongson")
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c