Unify platform suspend/resume routines for PCI DWMAC glue
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest3 patches 2 repliesApplied 3/3
- v43 patches 8 repliesSuperseded
- v33 patches 4 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 3 patches | 4 replies | Superseded | |
| v1 | 3 patches | 5 replies | Superseded |
Changes in v5 from the cover letter
- Hide STMMAC_LIBPCI. drop default y and dependency to PCI
- Select STMMAC_LIBPCI instead of depending on it in glue symbols
- Bring "depends on PCI" back to glue symbols, reverting part of change in v4
- Link to v4: https://lore.kernel.org/netdev/[email protected]/
Patches in v5 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | net: stmmac: Add generic suspend/resume helper for PCI-based controllersdrivers/ drivers/ drivers/ +1 more | +66 | 2 replies | Applied |
| 2/3 | net: stmmac: loongson: Use generic PCI suspend/resume routinesdrivers/ drivers/ | +5 | 0 replies | Applied |
| 3/3 | net: stmmac: pci: Use generic PCI suspend/resume routinesdrivers/ drivers/ | +5 | 0 replies | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Russell King (Oracle) | Yanteng Si |
|---|---|---|
| 1/3 | R-b | R-b |
| 2/3 | R-b | A-b |
| 3/3 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next v5 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 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.
Changed from v4
- Hide STMMAC_LIBPCI. drop default y and dependency to PCI
- Select STMMAC_LIBPCI instead of depending on it in glue symbols
- Bring "depends on PCI" back to glue symbols, reverting part of change in v4
- Link to v4: https://lore.kernel.org/netdev/[email protected]/
Changed from v3
- Drop (now) redundant Kconfig depends for DWMAC_LOONGSON and STMMAC_PCI
- Collect review tags
- Link to v3: https://lore.kernel.org/netdev/[email protected]/
Changed from v2
- Drop unnecessary "depends on STMMAC_ETH" from STMMAC_LIBPCI
- Enclose DWMAC_LOONGSON and STMMAC_PCI within "if STMMAC_LIBPCI", instead of depends on the option.
- Link to v2: https://lore.kernel.org/netdev/[email protected]/
Changed from v1
- Separate the new suspend/resume helpers into a new file, stmmac_libpci.c, and provide Kconfig symbol for it
- Link to v1: https://lore.kernel.org/netdev/[email protected]/
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
drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 ++++- drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + .../ethernet/stmicro/stmmac/dwmac-loongson.c | 36 ++------------ .../ethernet/stmicro/stmmac/stmmac_libpci.c | 48 +++++++++++++++++++ .../ethernet/stmicro/stmmac/stmmac_libpci.h | 12 +++++ .../net/ethernet/stmicro/stmmac/stmmac_pci.c | 36 ++------------ 6 files changed, 76 insertions(+), 68 deletions(-) create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_libpci.c create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_libpci.h
Signature · 1 line
2.51.2