提交 0542bc60 编写于 作者: D Dan Carpenter 提交者: Zheng Zengkai

ice: fix an error code in ice_cfg_phy_fec()

stable inclusion
from stable-v5.10.101
commit cf11949b916325ca925f9dd25ad649380c2adf04
bugzilla: https://gitee.com/openeuler/kernel/issues/I5669Z

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cf11949b916325ca925f9dd25ad649380c2adf04

--------------------------------

[ Upstream commit 21338d58 ]

Propagate the error code from ice_get_link_default_override() instead
of returning success.

Fixes: ea78ce4d ("ice: add link lenient and default override support")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Tested-by: NGurucharan G <gurucharanx.g@intel.com>
Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 8b94b397
......@@ -3032,7 +3032,8 @@ ice_cfg_phy_fec(struct ice_port_info *pi, struct ice_aqc_set_phy_cfg_data *cfg,
if (fec == ICE_FEC_AUTO && ice_fw_supports_link_override(pi->hw)) {
struct ice_link_default_override_tlv tlv;
if (ice_get_link_default_override(&tlv, pi))
status = ice_get_link_default_override(&tlv, pi);
if (status)
goto out;
if (!(tlv.options & ICE_LINK_OVERRIDE_STRICT_MODE) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册