Skip to content

Commit 66f1546

Browse files
committed
Merge branch 'stmmac-phy-wol'
Ling Pei Lee says: ==================== tmmac: Add option to enable PHY WOL with PMT enabled This patchset main objective is to provide an option to enable PHY WoL even the PMT is enabled by default in the HW features. The current stmmac driver WOL implementation will enable MAC WOL if MAC HW PMT feature is on. Else, the driver will check for PHY WOL support. Intel EHL mgbe are designed to wake up through PHY WOL although the HW PMT is enabled.Hence, introduced use_phy_wol platform data to provide this PHY WOL option. Set use_phy_wol will disable the plat->pmt which currently used to determine the system to wake up by MAC WOL or PHY WOL. This WOL patchset includes of setting the device power state to D3hot. This is because the EHL PSE will need to PSE mgbe to be in D3 state in order for the PSE to goes into suspend mode. Change Log: V2: Drop Patch Rust-for-Linux#3 net: stmmac: Reconfigure the PHY WOL settings in stmmac_resume(). ====================
2 parents b03cfe6 + 1dd53a6 commit 66f1546

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,7 @@ static int ehl_common_data(struct pci_dev *pdev,
593593
plat->rx_queues_to_use = 8;
594594
plat->tx_queues_to_use = 8;
595595
plat->clk_ptp_rate = 200000000;
596+
plat->use_phy_wol = 1;
596597

597598
plat->safety_feat_cfg->tsoee = 1;
598599
plat->safety_feat_cfg->mrxpee = 1;
@@ -1117,6 +1118,7 @@ static int __maybe_unused intel_eth_pci_suspend(struct device *dev)
11171118
return ret;
11181119

11191120
pci_wake_from_d3(pdev, true);
1121+
pci_set_power_state(pdev, PCI_D3hot);
11201122
return 0;
11211123
}
11221124

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6529,7 +6529,8 @@ static int stmmac_hw_init(struct stmmac_priv *priv)
65296529
* register (if supported).
65306530
*/
65316531
priv->plat->enh_desc = priv->dma_cap.enh_desc;
6532-
priv->plat->pmt = priv->dma_cap.pmt_remote_wake_up;
6532+
priv->plat->pmt = priv->dma_cap.pmt_remote_wake_up &&
6533+
!priv->plat->use_phy_wol;
65336534
priv->hw->pmt = priv->plat->pmt;
65346535
if (priv->dma_cap.hash_tb_sz) {
65356536
priv->hw->multicast_filter_bins =

include/linux/stmmac.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,5 +265,6 @@ struct plat_stmmacenet_data {
265265
int msi_sfty_ue_vec;
266266
int msi_rx_base_vec;
267267
int msi_tx_base_vec;
268+
bool use_phy_wol;
268269
};
269270
#endif

0 commit comments

Comments
 (0)