Skip to content

Commit 5a9b876

Browse files
peileelidavem330
authored andcommitted
net: stmmac: option to enable PHY WOL with PMT enabled
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. There is another case where MAC HW PMT is enabled but the platform still goes for the PHY WOL option. E.g, Intel platform are designed for PHY WOL but not MAC WOL although HW MAC PMT features are enabled. Introduce use_phy_wol platform data to select PHY WOL instead of depending on HW PMT features. 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. Signed-off-by: Ling Pei Lee <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b03cfe6 commit 5a9b876

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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)