From: Jakub Kicinski Date: Thu, 27 Nov 2025 01:05:44 +0000 (-0800) Subject: Merge branch 'unify-platform-suspend-resume-routines-for-pci-dwmac-glue' X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4585847fddfc9c8d5fe9f8c3318aa88e3629eede;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'unify-platform-suspend-resume-routines-for-pci-dwmac-glue' Yao Zi says: ==================== Unify platform suspend/resume routines for PCI DWMAC glue There are currently three PCI-based DWMAC glue drivers in tree, stmmac_pci.c, dwmac-intel.c, and dwmac-loongson.c. Both stmmac_pci.c and dwmac-intel.c implements the same and duplicated platform suspend/resume routines. This series introduces a new PCI helper library, stmmac_libpci.c, providing a pair of helpers, stmmac_pci_plat_{suspend,resume}, and replaces the driver-specific implementation with the helpers to reduce code duplication. The helper will also simplify the Motorcomm DWMAC glue driver which I'm working on. The glue driver for Intel controllers isn't covered by the series, since its suspend routine doesn't call pci_disable_device() and thus is a little different from the new generic helpers. I only have Loongson hardware on hand, thus the series is only tested on Loongson 3A5000 machine. I could confirm the controller works after resume, and WoL works as expected. This shouldn't break stmmac_pci.c, either, since the new helpers have the exactly same code as the old driver-specific suspend/resume hooks. ==================== Link: https://patch.msgid.link/20251124160417.51514-1-ziyao@disroot.org Signed-off-by: Jakub Kicinski --- 4585847fddfc9c8d5fe9f8c3318aa88e3629eede