Skip to content

backport patches to improve clocks management for stmmac driver

Meng Li lkml netdev stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: stmmac: add clocks management for gmac driverdrivers/net/ethernet/stmicro/stmmac/stmmac.h drivers/net/ethernet/stmicro/stmmac/stmmac_main.c drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +1 more+174 -370 replies
2/6net: stmmac: platform: fix build error with !CONFIG_PM_SLEEPdrivers/net/ethernet/stmicro/stmmac/stmmac_platform.c+4 -60 replies
3/6net: stmmac: fix missing unlock on error in stmmac_suspend()drivers/net/ethernet/stmicro/stmmac/stmmac_main.c+3 -10 replies
4/6net: stmmac: fix system hang if change mac address after interface ifdowndrivers/net/ethernet/stmicro/stmmac/stmmac_main.c+10 -10 replies
5/6net: stmmac: fix issue where clk is being unprepared twicedrivers/net/ethernet/stmicro/stmmac/stmmac_main.c+0 -10 replies
6/6net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warningsdrivers/net/ethernet/stmicro/stmmac/dwmac-rk.c+0 -90 replies

Reviews trailers per patch

2 of 6 patches have a Reviewed-by or Acked-by.

PatchJoakim ZhangAndrew Lunn
1/6R-b
2/6
3/6
4/6
5/6R-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] backport patches to improve clocks management for stmmac driver

From: Meng Li <[email protected]>

In stable kernel v5.10, when run below command to remove ethernet driver on stratix10 platform, there will be warning trace as below:

$ cd /sys/class/net/eth0/device/driver/
$ echo ff800000.ethernet > unbind
WARNING: CPU: 3 PID: 386 at drivers/clk/clk.c:810 clk_core_unprepare+0x114/0x274
Modules linked in: sch_fq_codel
CPU: 3 PID: 386 Comm: sh Tainted: G        W         5.10.74-yocto-standard #1
Hardware name: SoCFPGA Stratix 10 SoCDK (DT)
pstate: 00000005 (nzcv daif -PAN -UAO -TCO BTYPE=--)
pc : clk_core_unprepare+0x114/0x274
lr : clk_core_unprepare+0x114/0x274
sp : ffff800011bdbb10
clk_core_unprepare+0x114/0x274
 clk_unprepare+0x38/0x50
 stmmac_remove_config_dt+0x40/0x80
 stmmac_pltfr_remove+0x64/0x80
 platform_drv_remove+0x38/0x60
 ... ..
 el0_sync_handler+0x1a4/0x1b0
 el0_sync+0x180/0x1c0

This issue is introduced by introducing upstream commit 8f269102baf7 ("net: stmmac: disable clocks in stmmac_remove_config_dt()")

But in latest mainline kernel, there is no this issue. Because commit 5ec55823438e("net: stmmac: add clocks management for gmac driver") and its folowing fixing commits improved clocks management for stmmac driver. Therefore, backport them to stable kernel v5.10.

Joakim Zhang (2):
net: stmmac: add clocks management for gmac driver
net: stmmac: fix system hang if change mac address after interface
ifdown

Michael Riesch (1):
net: stmmac: dwmac-rk: fix unbalanced pm_runtime_enable warnings

Wei Yongjun (1):
net: stmmac: platform: fix build error with !CONFIG_PM_SLEEP

Wong Vee Khee (1):
net: stmmac: fix issue where clk is being unprepared twice

Yang Yingliang (1):
net: stmmac: fix missing unlock on error in stmmac_suspend()

 .../net/ethernet/stmicro/stmmac/dwmac-rk.c    |   9 --
 drivers/net/ethernet/stmicro/stmmac/stmmac.h  |   1 +
 .../net/ethernet/stmicro/stmmac/stmmac_main.c |  87 ++++++++++++--
 .../net/ethernet/stmicro/stmmac/stmmac_mdio.c | 111 ++++++++++++++----
 .../ethernet/stmicro/stmmac/stmmac_platform.c |  30 ++++-
 5 files changed, 187 insertions(+), 51 deletions(-)
Signature · 1 line
2.17.1