]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net: axienet: setup mdio unconditionally
authorAndy Chiu <andy.chiu@sifive.com>
Tue, 5 Apr 2022 09:19:26 +0000 (17:19 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 10:00:56 +0000 (12:00 +0200)
commitc87e0484f282ffcc965a5a283aa2d8308a82c667
treefd74ef429008ceac166919cfb0aae2057f5878c5
parent61335a99e19a69834bba7f513dc935a07c4c4af5
net: axienet: setup mdio unconditionally

BugLink: https://bugs.launchpad.net/bugs/1969857
[ Upstream commit d1c4f93e3f0a023024a6f022a61528c06cf1daa9 ]

The call to axienet_mdio_setup should not depend on whether "phy-node"
pressents on the DT. Besides, since `lp->phy_node` is used if PHY is in
SGMII or 100Base-X modes, move it into the if statement. And the next patch
will remove `lp->phy_node` from driver's private structure and do an
of_node_put on it right away after use since it is not used elsewhere.

Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
Reviewed-by: Greentime Hu <greentime.hu@sifive.com>
Reviewed-by: Robert Hancock <robert.hancock@calian.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
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_main.c