Netdev List
 help / color / mirror / Atom feed
From: Jiawen Wu <jiawenwu@trustnetic.com>
To: netdev@vger.kernel.org
Cc: "Mengyuan Lou" <mengyuanlou@net-swift.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@kernel.org>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Jacob Keller" <jacob.e.keller@intel.com>,
	"Kees Cook" <kees@kernel.org>,
	"Chenguang Zhao" <zhaochenguang@kylinos.cn>,
	"Aleksandr Loktionov" <aleksandr.loktionov@intel.com>,
	"Uwe Kleine-König (The Capable Hub)"
	<u.kleine-koenig@baylibre.com>,
	"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	"Maciej Fijalkowski" <maciej.fijalkowski@intel.com>,
	"Simon Horman" <horms@kernel.org>,
	"Jiawen Wu" <jiawenwu@trustnetic.com>
Subject: [PATCH net v3 0/3] net: wangxun: keep MAC enabled for NCSI devices
Date: Tue, 13 Oct 2026 10:06:22 +0800	[thread overview]
Message-ID: <20261013020626.5548-1-jiawenwu@trustnetic.com> (raw)

Wangxun NICs that support NCSI share the port with a BMC, which needs
the MAC and the optical transmitter to keep working when the host
interface is down. Currently the drivers turn them off in several
places, so management traffic is lost whenever the host interface is
closed or the link goes down.

Patch 1 makes wx->ncsi_enabled the single condition for keeping the
MAC enabled. On NGBE it also covers OCP cards, which support NCSI but
do not set the NCSI bit in the subsystem ID. Before this change they
had the MAC receiver turned off in wx_disable_rx(). txgbe now sets
ncsi_enabled from the subsystem ID, so there is no functional change
for txgbe in this patch.

Patch 2 keeps MAC Tx enabled on SP devices in mac_link_down() and
re-enables it in mac_finish(). It also keeps the SFP TX_DISABLE line
deasserted while the interface is down. The SFP core asserts
TX_DISABLE whenever phylink_stop() stops the upstream. As a minimal fix,
the override is done in the txgbe GPIO controller and only applies while
the interface is down.

Patch 3 does the same for AML devices: MAC Tx and Rx stay enabled in
mac_link_down(), and txgbe_down() no longer disables the TX laser on
NCSI devices.

---
Changes Log:

v3:
- Use wx->ncsi_enabled instead of the open-coded OCP check.
- Re-enable MAC Tx in mac_finish() for NCSI devices.
- Keep the TX laser enabled while the interface is down.

v2: https://lore.kernel.org/all/20260924020149.30800-1-jiawenwu@trustnetic.com
- Remove WoL related changes.

v1: https://lore.kernel.org/all/7DBD5726DAA21342+20260920085114.1062503-1-jiawenwu@trustnetic.com
---

Jiawen Wu (3):
  net: wangxun: keep NGBE OCP cards MAC enabled
  net: txgbe: keep MAC enabled for SP devices that support NCSI
  net: txgbe: keep MAC enabled for AML devices that support NCSI

 drivers/net/ethernet/wangxun/libwx/wx_hw.c      |  2 +-
 drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c  |  6 ++++--
 drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 10 +++++++---
 drivers/net/ethernet/wangxun/txgbe/txgbe_phy.c  | 12 +++++++++++-
 4 files changed, 23 insertions(+), 7 deletions(-)

-- 
2.51.0


             reply	other threads:[~2026-10-13  2:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-13  2:06 Jiawen Wu [this message]
2026-10-13  2:06 ` [PATCH v3 1/3] net: libwx: keep NGBE OCP cards MAC enabled Jiawen Wu
2026-10-13  2:09   ` netdev-bot+sinfo
2026-10-13  2:13     ` Jiawen Wu
2026-10-13  2:06 ` [PATCH net v3 1/3] net: wangxun: " Jiawen Wu
2026-10-13  2:06 ` [PATCH net v3 2/3] net: txgbe: keep MAC enabled for SP devices that support NCSI Jiawen Wu
2026-10-13  2:06 ` [PATCH net v3 3/3] net: txgbe: keep MAC enabled for AML " Jiawen Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261013020626.5548-1-jiawenwu@trustnetic.com \
    --to=jiawenwu@trustnetic.com \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maciej.fijalkowski@intel.com \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=zhaochenguang@kylinos.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox