diff options
author | Biao Huang | 2019-05-24 08:26:08 +0200 |
---|---|---|
committer | David S. Miller | 2019-05-25 20:02:31 +0200 |
commit | 5e7f7fc538d894b2d9aa41876b8dcf35f5fe11e6 (patch) | |
tree | 9b05f3100a9355e57ce02e1f94ee73e8a65a314d /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |
parent | net: stmmac: update rx tail pointer register to fix rx dma hang issue. (diff) | |
download | kernel-qcow2-linux-5e7f7fc538d894b2d9aa41876b8dcf35f5fe11e6.tar.gz kernel-qcow2-linux-5e7f7fc538d894b2d9aa41876b8dcf35f5fe11e6.tar.xz kernel-qcow2-linux-5e7f7fc538d894b2d9aa41876b8dcf35f5fe11e6.zip |
net: stmmac: fix csr_clk can't be zero issue
The specific clk_csr value can be zero, and
stmmac_clk is necessary for MDC clock which can be set dynamically.
So, change the condition from plat->clk_csr to plat->stmmac_clk to
fix clk_csr can't be zero issue.
Fixes: cd7201f477b9 ("stmmac: MDC clock dynamically based on the csr clock input")
Signed-off-by: Biao Huang <biao.huang@mediatek.com>
Acked-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index bc93c355f403..65e57b9f6887 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -4380,10 +4380,10 @@ int stmmac_dvr_probe(struct device *device, * set the MDC clock dynamically according to the csr actual * clock input. */ - if (!priv->plat->clk_csr) - stmmac_clk_csr_set(priv); - else + if (priv->plat->clk_csr >= 0) priv->clk_csr = priv->plat->clk_csr; + else + stmmac_clk_csr_set(priv); stmmac_check_pcs_mode(priv); |