lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251028154332.59118-1-ziyao@disroot.org>
Date: Tue, 28 Oct 2025 15:43:29 +0000
From: Yao Zi <ziyao@...root.org>
To: Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Yanteng Si <si.yanteng@...ux.dev>,
	Huacai Chen <chenhuacai@...nel.org>,
	"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
	Philipp Stanner <phasta@...nel.org>,
	Tiezhu Yang <yangtiezhu@...ngson.cn>,
	Qunqin Zhao <zhaoqunqin@...ngson.cn>,
	Yao Zi <ziyao@...root.org>,
	Vladimir Oltean <vladimir.oltean@....com>,
	Furong Xu <0x1207@...il.com>,
	Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
	Jacob Keller <jacob.e.keller@...el.com>
Cc: netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH net-next 0/3] 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 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 work for 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.

Yao Zi (3):
  net: stmmac: Add generic suspend/resume helper for PCI-based
    controllers
  net: stmmac: loongson: Use generic PCI suspend/resume routines
  net: stmmac: pci: Use generic PCI suspend/resume routines

 .../ethernet/stmicro/stmmac/dwmac-loongson.c  | 35 +-----------------
 drivers/net/ethernet/stmicro/stmmac/stmmac.h  |  2 +
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 37 +++++++++++++++++++
 .../net/ethernet/stmicro/stmmac/stmmac_pci.c  | 35 +-----------------
 4 files changed, 43 insertions(+), 66 deletions(-)

-- 
2.50.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ