diff mbox series

[netdev] net: stmmac: dwmac-sunxi: Allow all RGMII modes

Message ID 20200106030922.19721-1-wens@kernel.org (mailing list archive)
State Mainlined
Commit 52cc73e5404c7ba0cbfc50cb4c265108c84b3d5a
Headers show
Series [netdev] net: stmmac: dwmac-sunxi: Allow all RGMII modes | expand

Commit Message

Chen-Yu Tsai Jan. 6, 2020, 3:09 a.m. UTC
From: Chen-Yu Tsai <wens@csie.org>

Allow all the RGMII modes to be used. This would allow us to represent
the hardware better in the device tree with RGMII_ID where in most
cases the PHY's internal delay for both RX and TX are used.

Fixes: af0bd4e9ba80 ("net: stmmac: sunxi platform extensions for GMAC in Allwinner A20 SoC's")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---

Maybe CC stable so future device trees can be used with stable kernels?
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller Jan. 6, 2020, 9:47 p.m. UTC | #1
From: Chen-Yu Tsai <wens@kernel.org>
Date: Mon,  6 Jan 2020 11:09:22 +0800

> Maybe CC stable so future device trees can be used with stable kernels?

Please read the netdev FAQ, you should never CC: stable for networking
changes.
David Miller Jan. 8, 2020, 8:32 p.m. UTC | #2
From: Chen-Yu Tsai <wens@kernel.org>
Date: Mon,  6 Jan 2020 11:09:22 +0800

> From: Chen-Yu Tsai <wens@csie.org>
> 
> Allow all the RGMII modes to be used. This would allow us to represent
> the hardware better in the device tree with RGMII_ID where in most
> cases the PHY's internal delay for both RX and TX are used.
> 
> Fixes: af0bd4e9ba80 ("net: stmmac: sunxi platform extensions for GMAC in Allwinner A20 SoC's")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied and queued up for -stable.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
index 26353ef616b8..7d40760e9ba8 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c
@@ -44,7 +44,7 @@  static int sun7i_gmac_init(struct platform_device *pdev, void *priv)
 	 * rate, which then uses the auto-reparenting feature of the
 	 * clock driver, and enabling/disabling the clock.
 	 */
-	if (gmac->interface == PHY_INTERFACE_MODE_RGMII) {
+	if (phy_interface_mode_is_rgmii(gmac->interface)) {
 		clk_set_rate(gmac->tx_clk, SUN7I_GMAC_GMII_RGMII_RATE);
 		clk_prepare_enable(gmac->tx_clk);
 		gmac->clk_enabled = 1;