提交 50899a38 编写于 作者: M Martin Blumenstingl 提交者: Zheng Zengkai

net: stmmac: dwmac-meson8b: fix enabling the timing-adjustment clock

stable inclusion
from stable-5.10.20
commit ef1efead3f2ac52460a39fd171ed5cfa9a83773e
bugzilla: 50608

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

[ Upstream commit 02582288 ]

The timing-adjustment clock only has to be enabled when a) there is a
2ns RX delay configured using device-tree and b) the phy-mode indicates
that the RX delay should be enabled.

Only enable the RX delay if both are true, instead of (by accident) also
enabling it when there's the 2ns RX delay configured but the phy-mode
incicates that the RX delay is not used.

Fixes: 9308c476 ("net: stmmac: dwmac-meson8b: add support for the RX delay configuration")
Reported-by: NAndrew Lunn <andrew@lunn.ch>
Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 d2f56bb1
...@@ -301,7 +301,7 @@ static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac) ...@@ -301,7 +301,7 @@ static int meson8b_init_prg_eth(struct meson8b_dwmac *dwmac)
return -EINVAL; return -EINVAL;
}; };
if (rx_dly_config & PRG_ETH0_ADJ_ENABLE) { if (delay_config & PRG_ETH0_ADJ_ENABLE) {
if (!dwmac->timing_adj_clk) { if (!dwmac->timing_adj_clk) {
dev_err(dwmac->dev, dev_err(dwmac->dev,
"The timing-adjustment clock is mandatory for the RX delay re-timing\n"); "The timing-adjustment clock is mandatory for the RX delay re-timing\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册