]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
net: axienet: allow setups without MDIO
authorDaniel Mack <daniel@zonque.org>
Wed, 24 Mar 2021 13:05:36 +0000 (14:05 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 May 2021 07:53:54 +0000 (09:53 +0200)
commite34fc04372c312004fbf9010039896a9f9ee2dd9
tree6cf79e39dde934eadc23b8370529f67f773f4db1
parentff056859b9cda25ae46d498bf69efee54e3f5440
net: axienet: allow setups without MDIO

BugLink: https://bugs.launchpad.net/bugs/1926999
[ Upstream commit de9c7854e6e1589f639c6352112956d08243b659 ]

In setups with fixed-link settings there is no mdio node in DTS.
axienet_probe() already handles that gracefully but lp->mii_bus is
then NULL.

Fix code that tries to blindly grab the MDIO lock by introducing two helper
functions that make the locking conditional.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/xilinx/xilinx_axienet.h
drivers/net/ethernet/xilinx/xilinx_axienet_main.c