1. 07 Aug, 2024 2 commits
    • Uros Bizjak's avatar
      net/chelsio/libcxgb: Add __percpu annotations to libcxgb_ppm.c · acd221a6
      Uros Bizjak authored
      Compiling libcxgb_ppm.c results in several sparse warnings:
      
      libcxgb_ppm.c:368:15: warning: incorrect type in assignment (different address spaces)
      libcxgb_ppm.c:368:15:    expected struct cxgbi_ppm_pool *pools
      libcxgb_ppm.c:368:15:    got void [noderef] __percpu *_res
      libcxgb_ppm.c:374:48: warning: incorrect type in initializer (different address spaces)
      libcxgb_ppm.c:374:48:    expected void const [noderef] __percpu *__vpp_verify
      libcxgb_ppm.c:374:48:    got struct cxgbi_ppm_pool *
      libcxgb_ppm.c:484:19: warning: incorrect type in assignment (different address spaces)
      libcxgb_ppm.c:484:19:    expected struct cxgbi_ppm_pool [noderef] __percpu *pool
      libcxgb_ppm.c:484:19:    got struct cxgbi_ppm_pool *[assigned] pool
      libcxgb_ppm.c:511:21: warning: incorrect type in argument 1 (different address spaces)
      libcxgb_ppm.c:511:21:    expected void [noderef] __percpu *__pdata
      libcxgb_ppm.c:511:21:    got struct cxgbi_ppm_pool *[assigned] pool
      
      Add __percpu annotation to *pools and *pool percpu pointers and to
      ppm_alloc_cpu_pool() function that returns percpu pointer to fix
      these warnings.
      
      Compile tested only, but there is no difference in the resulting object file.
      Signed-off-by: default avatarUros Bizjak <ubizjak@gmail.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://patch.msgid.link/20240804154635.4249-1-ubizjak@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      acd221a6
    • Youwan Wang's avatar
      net: phy: phy_device: fix PHY WOL enabled, PM failed to suspend · 4f534b7f
      Youwan Wang authored
      If the PHY of the mido bus is enabled with Wake-on-LAN (WOL),
      we cannot suspend the PHY. Although the WOL status has been
      checked in phy_suspend(), returning -EBUSY(-16) would cause
      the Power Management (PM) to fail to suspend. Since
      phy_suspend() is an exported symbol (EXPORT_SYMBOL),
      timely error reporting is needed. Therefore, an additional
      check is performed here. If the PHY of the mido bus is enabled
      with WOL, we skip calling phy_suspend() to avoid PM failure.
      
      From the following logs, it has been observed that the phydev->attached_dev
      is NULL, phydev is "stmmac-0:01", it not attached, but it will affect suspend
      and resume.The actually attached "stmmac-0:00" will not dpm_run_callback():
      mdio_bus_phy_suspend().
      
      init log:
      [    5.932502] YT8521 Gigabit Ethernet stmmac-0:00: attached PHY driver
      (mii_bus:phy_addr=stmmac-0:00, irq=POLL)
      [    5.932512] YT8521 Gigabit Ethernet stmmac-0:01: attached PHY driver
      (mii_bus:phy_addr=stmmac-0:01, irq=POLL)
      [   24.566289] YT8521 Gigabit Ethernet stmmac-0:00: yt8521_read_status,
      link down, media: UTP
      
      suspend log:
      [  322.631362] OOM killer disabled.
      [  322.631364] Freezing remaining freezable tasks
      [  322.632536] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
      [  322.632540] printk: Suspending console(s) (use no_console_suspend to debug)
      [  322.633052] YT8521 Gigabit Ethernet stmmac-0:01:
      PM: dpm_run_callback(): mdio_bus_phy_suspend+0x0/0x110 [libphy] returns -16
      [  322.633071] YT8521 Gigabit Ethernet stmmac-0:01:
      PM: failed to suspend: error -16
      [  322.669699] PM: Some devices failed to suspend, or early wake event detected
      [  322.669949] OOM killer enabled.
      [  322.669951] Restarting tasks ... done.
      [  322.671008] random: crng reseeded on system resumption
      [  322.671014] PM: suspend exit
      
      Add a function that phylib can inquire of the driver whether WoL
      has been enabled at the PHY.
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarYouwan Wang <youwan@nfschina.com>
      Reviewed-by: default avatarWojciech Drewek <wojciech.drewek@intel.com>
      Link: https://patch.msgid.link/20240731091537.771391-1-youwan@nfschina.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4f534b7f
  2. 06 Aug, 2024 5 commits
  3. 05 Aug, 2024 14 commits
  4. 04 Aug, 2024 3 commits
  5. 03 Aug, 2024 12 commits
  6. 02 Aug, 2024 4 commits