mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
net: stmmac: dwmac-rk: Fix the following error
ERROR: "dwmac_rk_create_loopback_sysfs" [drivers/net/ethernet/stmicro/stmmac/dwmac-rk.ko] undefined!
ERROR: "stmmac_mdio_reset" [drivers/net/ethernet/stmicro/stmmac/dwmac-rk-tool.ko] undefined!
Fixes: a442177046 ("net: ethernet: stmicro: stmmac: Add loopback interface for rockchip")
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I493902ea828a81b49cb364959495634c39d7e307
This commit is contained in:
@@ -15,7 +15,8 @@ obj-$(CONFIG_DWMAC_IPQ806X) += dwmac-ipq806x.o
|
||||
obj-$(CONFIG_DWMAC_LPC18XX) += dwmac-lpc18xx.o
|
||||
obj-$(CONFIG_DWMAC_MESON) += dwmac-meson.o dwmac-meson8b.o
|
||||
obj-$(CONFIG_DWMAC_OXNAS) += dwmac-oxnas.o
|
||||
obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac-rk.o dwmac-rk-tool.o
|
||||
obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac-rockchip.o
|
||||
dwmac-rockchip-objs := dwmac-rk.o dwmac-rk-tool.o
|
||||
obj-$(CONFIG_DWMAC_SOCFPGA) += dwmac-altr-socfpga.o
|
||||
obj-$(CONFIG_DWMAC_STI) += dwmac-sti.o
|
||||
obj-$(CONFIG_DWMAC_STM32) += dwmac-stm32.o
|
||||
|
||||
@@ -1207,7 +1207,8 @@ static int dwmac_rk_loopback_run(struct stmmac_priv *priv,
|
||||
if (priv->plat->stmmac_rst)
|
||||
reset_control_assert(priv->plat->stmmac_rst);
|
||||
|
||||
stmmac_mdio_reset(priv->mii);
|
||||
if (priv->mii)
|
||||
priv->mii->reset(priv->mii);
|
||||
|
||||
if (priv->plat->stmmac_rst)
|
||||
reset_control_deassert(priv->plat->stmmac_rst);
|
||||
|
||||
@@ -1683,6 +1683,10 @@ static int rk_gmac_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto err_gmac_powerdown;
|
||||
|
||||
ret = dwmac_rk_create_loopback_sysfs(&pdev->dev);
|
||||
if (ret)
|
||||
goto err_gmac_powerdown;
|
||||
|
||||
return 0;
|
||||
|
||||
err_gmac_powerdown:
|
||||
@@ -1699,6 +1703,7 @@ static int rk_gmac_remove(struct platform_device *pdev)
|
||||
int ret = stmmac_dvr_remove(&pdev->dev);
|
||||
|
||||
rk_gmac_powerdown(bsp_priv);
|
||||
dwmac_rk_remove_loopback_sysfs(&pdev->dev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
#include <net/pkt_cls.h>
|
||||
#include "stmmac_ptp.h"
|
||||
#include "stmmac.h"
|
||||
#include "dwmac-rk-tool.h"
|
||||
#include <linux/reset.h>
|
||||
#include <linux/of_mdio.h>
|
||||
#include "dwmac1000.h"
|
||||
@@ -4447,14 +4446,6 @@ int stmmac_dvr_probe(struct device *device,
|
||||
__func__);
|
||||
#endif
|
||||
|
||||
ret = dwmac_rk_create_loopback_sysfs(device);
|
||||
if (ret) {
|
||||
netdev_err(priv->dev, "%s: ERROR %i create loopback sysfs\n",
|
||||
__func__, ret);
|
||||
unregister_netdev(ndev);
|
||||
goto error_netdev_register;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
error_netdev_register:
|
||||
|
||||
Reference in New Issue
Block a user