* [PATCH net 2/3] net: txgbe: keep MAC enabled for NCSI and WoL for SP devices [not found] <20260920085114.1062503-1-jiawenwu@trustnetic.com> @ 2026-09-20 8:51 ` Jiawen Wu 2026-09-20 14:56 ` Andrew Lunn 2026-09-20 8:51 ` [PATCH net 3/3] net: txgbe: keep MAC enabled for NCSI and WoL for AML devices Jiawen Wu 1 sibling, 1 reply; 5+ messages in thread From: Jiawen Wu @ 2026-09-20 8:51 UTC (permalink / raw) To: netdev Cc: Mengyuan Lou, Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jacob Keller, Kees Cook, Chenguang Zhao, Russell King (Oracle), Maciej Fijalkowski, Simon Horman, Jiawen Wu The .mac_link_down() in phylink callback disable MAC TX unconditionally. This is not suitable for devices using NCSI or WoL, where the MAC needs to remain enbaled after the link goes down to support the corresponding functionality. Skip disabling MAC TX when the subsystem device ID indicates an NCSI or WoL device. Keep the existing link-down handling for other devices. Fixes: 08f08f9390e4 ("net: txgbe: Support phylink MAC layer") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> --- drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c index dc9f24314658..3fc01e937d6b 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c @@ -182,7 +182,9 @@ static void txgbe_mac_link_down(struct phylink_config *config, { struct wx *wx = phylink_to_wx(config); - wr32m(wx, WX_MAC_TX_CFG, WX_MAC_TX_CFG_TE, 0); + if (!(((wx->subsystem_device_id & WX_NCSI_MASK) == WX_NCSI_SUP) || + ((wx->subsystem_device_id & WX_WOL_MASK) == WX_WOL_SUP))) + wr32m(wx, WX_MAC_TX_CFG, WX_MAC_TX_CFG_TE, 0); wx->speed = SPEED_UNKNOWN; if (test_bit(WX_STATE_PTP_RUNNING, wx->state)) -- 2.51.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net 2/3] net: txgbe: keep MAC enabled for NCSI and WoL for SP devices 2026-09-20 8:51 ` [PATCH net 2/3] net: txgbe: keep MAC enabled for NCSI and WoL for SP devices Jiawen Wu @ 2026-09-20 14:56 ` Andrew Lunn 2026-09-21 2:22 ` Jiawen Wu 0 siblings, 1 reply; 5+ messages in thread From: Andrew Lunn @ 2026-09-20 14:56 UTC (permalink / raw) To: Jiawen Wu Cc: netdev, Mengyuan Lou, Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jacob Keller, Kees Cook, Chenguang Zhao, Russell King (Oracle), Maciej Fijalkowski, Simon Horman On Sun, Sep 20, 2026 at 04:51:13PM +0800, Jiawen Wu wrote: > The .mac_link_down() in phylink callback disable MAC TX unconditionally. > This is not suitable for devices using NCSI or WoL, where the MAC needs > to remain enbaled after the link goes down to support the corresponding > functionality. > > Skip disabling MAC TX when the subsystem device ID indicates an NCSI or > WoL device. Keep the existing link-down handling for other devices. NCSI i can understand, but phylink knows about WoL. This makes me think your WoL code is broken. Please review it. Andrew --- pw-bot: cr ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH net 2/3] net: txgbe: keep MAC enabled for NCSI and WoL for SP devices 2026-09-20 14:56 ` Andrew Lunn @ 2026-09-21 2:22 ` Jiawen Wu 2026-09-21 12:53 ` Andrew Lunn 0 siblings, 1 reply; 5+ messages in thread From: Jiawen Wu @ 2026-09-21 2:22 UTC (permalink / raw) To: 'Andrew Lunn' Cc: netdev, 'Mengyuan Lou', 'Andrew Lunn', 'David S. Miller', 'Eric Dumazet', 'Jakub Kicinski', 'Paolo Abeni', 'Jacob Keller', 'Kees Cook', 'Chenguang Zhao', 'Russell King (Oracle)', 'Maciej Fijalkowski', 'Simon Horman', netdev, 'Mengyuan Lou', 'Andrew Lunn', 'David S. Miller', 'Eric Dumazet', 'Jakub Kicinski', 'Paolo Abeni', 'Jacob Keller', 'Kees Cook', 'Chenguang Zhao', 'Russell King (Oracle)', 'Maciej Fijalkowski', 'Simon Horman' On Sun, Sep 20, 2026 10:56 PM, Andrew Lunn wrote: > On Sun, Sep 20, 2026 at 04:51:13PM +0800, Jiawen Wu wrote: > > The .mac_link_down() in phylink callback disable MAC TX unconditionally. > > This is not suitable for devices using NCSI or WoL, where the MAC needs > > to remain enbaled after the link goes down to support the corresponding > > functionality. > > > > Skip disabling MAC TX when the subsystem device ID indicates an NCSI or > > WoL device. Keep the existing link-down handling for other devices. > > NCSI i can understand, but phylink knows about WoL. This makes me > think your WoL code is broken. Please review it. WoL functionality has not been implemented on txgbe. I'll change to fix NCSI first, then support WoL later. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net 2/3] net: txgbe: keep MAC enabled for NCSI and WoL for SP devices 2026-09-21 2:22 ` Jiawen Wu @ 2026-09-21 12:53 ` Andrew Lunn 0 siblings, 0 replies; 5+ messages in thread From: Andrew Lunn @ 2026-09-21 12:53 UTC (permalink / raw) To: Jiawen Wu Cc: netdev, 'Mengyuan Lou', 'Andrew Lunn', 'David S. Miller', 'Eric Dumazet', 'Jakub Kicinski', 'Paolo Abeni', 'Jacob Keller', 'Kees Cook', 'Chenguang Zhao', 'Russell King (Oracle)', 'Maciej Fijalkowski', 'Simon Horman' On Mon, Sep 21, 2026 at 10:22:49AM +0800, Jiawen Wu wrote: > On Sun, Sep 20, 2026 10:56 PM, Andrew Lunn wrote: > > On Sun, Sep 20, 2026 at 04:51:13PM +0800, Jiawen Wu wrote: > > > The .mac_link_down() in phylink callback disable MAC TX unconditionally. > > > This is not suitable for devices using NCSI or WoL, where the MAC needs > > > to remain enbaled after the link goes down to support the corresponding > > > functionality. > > > > > > Skip disabling MAC TX when the subsystem device ID indicates an NCSI or > > > WoL device. Keep the existing link-down handling for other devices. > > > > NCSI i can understand, but phylink knows about WoL. This makes me > > think your WoL code is broken. Please review it. > > WoL functionality has not been implemented on txgbe. > I'll change to fix NCSI first, then support WoL later. I actually think we need a better solution for NCSI. At the moment, each MAC driver has some sort of hack. It would be much better to just tell phylink, so it can do the correct thing, similar to what it does for WoL. Andrew ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net 3/3] net: txgbe: keep MAC enabled for NCSI and WoL for AML devices [not found] <20260920085114.1062503-1-jiawenwu@trustnetic.com> 2026-09-20 8:51 ` [PATCH net 2/3] net: txgbe: keep MAC enabled for NCSI and WoL for SP devices Jiawen Wu @ 2026-09-20 8:51 ` Jiawen Wu 1 sibling, 0 replies; 5+ messages in thread From: Jiawen Wu @ 2026-09-20 8:51 UTC (permalink / raw) To: netdev Cc: Mengyuan Lou, Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jacob Keller, Kees Cook, Chenguang Zhao, Russell King (Oracle), Maciej Fijalkowski, Simon Horman, Jiawen Wu The .mac_link_down() in phylink callback disable MAC TX and RX unconditionally. This is not suitable for devices using NCSI or WoL, where the MAC needs to remain enbaled after the link goes down to support the corresponding functionality. Skip disabling MAC TX and RX when the subsystem device ID indicates an NCSI or WoL device. Keep the existing link-down handling for other devices. Fixes: 6f8b4c01a8cd ("net: txgbe: Implement PHYLINK for AML 25G/10G devices") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> --- drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c index 26d0cfc58ee2..572ad655eb9c 100644 --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c @@ -458,8 +458,11 @@ static void txgbe_mac_link_down_aml(struct phylink_config *config, { struct wx *wx = phylink_to_wx(config); - wr32m(wx, TXGBE_AML_MAC_TX_CFG, TXGBE_AML_MAC_TX_CFG_TE, 0); - wr32m(wx, WX_MAC_RX_CFG, WX_MAC_RX_CFG_RE, 0); + if (!(((wx->subsystem_device_id & WX_NCSI_MASK) == WX_NCSI_SUP) || + ((wx->subsystem_device_id & WX_WOL_MASK) == WX_WOL_SUP))) { + wr32m(wx, TXGBE_AML_MAC_TX_CFG, TXGBE_AML_MAC_TX_CFG_TE, 0); + wr32m(wx, WX_MAC_RX_CFG, WX_MAC_RX_CFG_RE, 0); + } wx->speed = SPEED_UNKNOWN; if (test_bit(WX_STATE_PTP_RUNNING, wx->state)) -- 2.51.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-21 12:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260920085114.1062503-1-jiawenwu@trustnetic.com>
2026-09-20 8:51 ` [PATCH net 2/3] net: txgbe: keep MAC enabled for NCSI and WoL for SP devices Jiawen Wu
2026-09-20 14:56 ` Andrew Lunn
2026-09-21 2:22 ` Jiawen Wu
2026-09-21 12:53 ` Andrew Lunn
2026-09-20 8:51 ` [PATCH net 3/3] net: txgbe: keep MAC enabled for NCSI and WoL for AML devices Jiawen Wu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox