]> git.baikalelectronics.ru Git - kernel.git/commit
net: sparx5: fix error handling in sparx5_port_open()
authorLiu Jian <liujian56@huawei.com>
Thu, 17 Nov 2022 12:59:18 +0000 (20:59 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 22 Nov 2022 10:41:49 +0000 (11:41 +0100)
commitb7194f606521c780561b0c6c527e4a43f6f8e9be
treed115d757c937a6adf6adb3657c5c6c7ebeb04fbb
parentc78548e3723e691b5648b899e1c0eb6c4c39c878
net: sparx5: fix error handling in sparx5_port_open()

If phylink_of_phy_connect() fails, the port should be disabled.
If sparx5_serdes_set()/phy_power_on() fails, the port should be
disabled and the phylink should be stopped and disconnected.

Fixes: 2e47ca74b0ea ("net: sparx5: add port module support")
Fixes: c68622c37ed0 ("net: sparx5: add hostmode with phylink support")
Signed-off-by: Liu Jian <liujian56@huawei.com>
Tested-by: Bjarni Jonasson <bjarni.jonasson@microchip.com>
Reviewed-by: Steen Hegelund <steen.hegelund@microchip.com>
Link: https://lore.kernel.org/r/20221117125918.203997-1-liujian56@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microchip/sparx5/sparx5_netdev.c