stmmac: fix csr clock divisor for 300MHz
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>
Thu, 26 Nov 2015 07:35:42 +0000 (08:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Nov 2015 19:52:51 +0000 (14:52 -0500)
This patch is to fix the csr clock in case of 300MHz is provided.

Reported-by: Kent Borg <Kent.Borg@csr.com>
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index e3d96f2..6256b32 100644 (file)
@@ -185,7 +185,7 @@ static void stmmac_clk_csr_set(struct stmmac_priv *priv)
                        priv->clk_csr = STMMAC_CSR_100_150M;
                else if ((clk_rate >= CSR_F_150M) && (clk_rate < CSR_F_250M))
                        priv->clk_csr = STMMAC_CSR_150_250M;
-               else if ((clk_rate >= CSR_F_250M) && (clk_rate < CSR_F_300M))
+               else if ((clk_rate >= CSR_F_250M) && (clk_rate <= CSR_F_300M))
                        priv->clk_csr = STMMAC_CSR_250_300M;
        }
 }