1. 18 7月, 2022 34 次提交
  2. 16 7月, 2022 3 次提交
  3. 15 7月, 2022 3 次提交
    • D
      Merge branch 'stmmac-dwmac-mediatec-clock-fix' · 8f3184b9
      David S. Miller 提交于
      Biao Huang says:
      
      ====================
      stmmac: dwmac-mediatek: fix clock issue
      
      changes in v5:
      1. add reivewd-by as Matthias's comments.
      2. fix "warning: unused variable 'ret' [-Wunused-variable]" as Jakub's comments
      
      changes in v4:
      1. improve commit message and test ko insertion/remove as Matthias's comments.
      2. add patch "net: stmmac: fix pm runtime issue in stmmac_dvr_remove()" to
         fix vlan filter deletion issue.
      3. add patch "net: stmmac: fix unbalanced ptp clock issue in suspend/resume flow"
         to fix unbalanced ptp clock issue in suspend/resume flow.
      
      changes in v3:
      1. delete mediatek_dwmac_exit() since there is no operation in it,
      as Matthias's comments.
      
      changes in v2:
      1. clock configuration is still needed in probe,
      and invoke mediatek_dwmac_clks_config() instead.
      2. update commit message.
      
      v1:
      remove duplicated clock configuration in init/exit.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8f3184b9
    • B
      net: stmmac: fix unbalanced ptp clock issue in suspend/resume flow · f4c7d894
      Biao Huang 提交于
      Current stmmac driver will prepare/enable ptp_ref clock in
      stmmac_init_tstamp_counter().
      
      The stmmac_pltfr_noirq_suspend will disable it once in suspend flow.
      
      But in resume flow,
      	stmmac_pltfr_noirq_resume --> stmmac_init_tstamp_counter
      	stmmac_resume --> stmmac_hw_setup --> stmmac_init_ptp --> stmmac_init_tstamp_counter
      ptp_ref clock reference counter increases twice, which leads to unbalance
      ptp clock when resume back.
      
      Move ptp_ref clock prepare/enable out of stmmac_init_tstamp_counter to fix it.
      
      Fixes: 0735e639 ("net: stmmac: skip only stmmac_ptp_register when resume from suspend")
      Signed-off-by: NBiao Huang <biao.huang@mediatek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f4c7d894
    • B
      net: stmmac: fix pm runtime issue in stmmac_dvr_remove() · 0d9a1591
      Biao Huang 提交于
      If netif is running when stmmac_dvr_remove is invoked,
      the unregister_netdev will call ndo_stop(stmmac_release) and
      vlan_kill_rx_filter(stmmac_vlan_rx_kill_vid).
      
      Currently, stmmac_dvr_remove() will disable pm runtime before
      unregister_netdev. When stmmac_vlan_rx_kill_vid is invoked,
      pm_runtime_resume_and_get in it returns EACCESS error number,
      and reports:
      
      	dwmac-mediatek 11021000.ethernet eth0: stmmac_dvr_remove: removing driver
      	dwmac-mediatek 11021000.ethernet eth0: FPE workqueue stop
      	dwmac-mediatek 11021000.ethernet eth0: failed to kill vid 0081/0
      
      Move the pm_runtime_disable to the end of stmmac_dvr_remove
      to fix this issue.
      
      Fixes: 64495203 ("net: stmmac: properly handle with runtime pm in stmmac_dvr_remove()")
      Signed-off-by: NBiao Huang <biao.huang@mediatek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d9a1591