DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Zaiyu Wang <zaiyuwang@trustnetic.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH v11 00/17] Wangxun fixes and new features
Date: Mon, 26 Oct 2026 09:28:56 -0700	[thread overview]
Message-ID: <20261026092856.23d9d925@phoenix.local> (raw)
In-Reply-To: <D4A752590839CFE3+20261026122638.9198-1-zaiyuwang@trustnetic.com>

On Mon, 26 Oct 2026 20:21:46 +0800
Zaiyu Wang <zaiyuwang@trustnetic.com> wrote:

> This series addresses link-related issues on Wangxun Amber-lite 25G/40G NICs (CR/KR training, hot-plug, 10G link state).
> 
> ---
> v11:
>  - P12: fall back to the default value when an FFE tap does not fit the
>         register field, instead of only logging it.
>  - P13: change the patch from a new feature to a fix:
>         take the transmitter down on AML40 link down. Clearing GPIO bit 1,
>         which holds the module in reset, does not stop the transmitter for
>         every DAC cable and QSFP module. The laser_off devarg and its
>         documentation are dropped; link setup runs again on link-up to
>         restore what link-down disabled.
>  - P17: fix warnings in check-git-log, and add the Cc: stable tag that
>         belongs with the Fixes line.

Better but still has issues.

Subject: Re: [PATCH v11 00/17] net/txgbe: Amber-Lite link fixes

Series applies to main and every commit builds with -Dwerror=true.
Dropping laser_off and the FFE range fallback address the v9 comments.
The 13/16 locking problem from v9 is still there.

Errors
------

Patch 13/17 (net/txgbe: fix Tx laser left on at AML40 link down)

enable_tx_laser() still takes the SWFW semaphore and does an I2C write
on AML40:

		    hw->mac.acquire_swfw_sync(hw, TXGBE_MNGSEM_SWPHY) == 0) {
			hw->phy.write_i2c_eeprom(hw,
				TXGBE_SFF_8636_TX_DISABLE, 0x0);

and txgbe_set_link_to_amlite() still calls enable_tx_laser() on the
TXGBE_ERR_PHY_INIT_NOT_DONE path, under the phy_lock spinlock taken in
txgbe_setup_phy_link_aml40().

It is worse than a long hold. txgbe_dev_setup_link_alarm_handler_aml()
acquires hw->phy.phy_semaphore_mask before calling setup_link(), and
txgbe_read_phy_if() sets that mask to TXGBE_MNGSEM_SWPHY. The nested
acquire therefore cannot succeed. It spins 200 x 5 ms holding
phy_lock, then the timeout path in txgbe_acquire_swfw_sync() clears
the SW bit the outer caller still holds, so the rest of that handler
runs without the semaphore and its final release drops a lock it no
longer owns.

Keep enable/disable_tx_laser() GPIO and PMD_CFG0 only, and do the
SFF-8636 write from the ethdev ops, which hold neither lock:

static void
txgbe_qsfp_tx_disable(struct txgbe_hw *hw, bool off)
{
	if (hw->mac.type != txgbe_mac_aml40 || txgbe_is_dac_cable(hw) ||
	    hw->phy.sfp_type == txgbe_sfp_type_unknown ||
	    hw->phy.sfp_type == txgbe_sfp_type_not_present)
		return;

	if (hw->mac.acquire_swfw_sync(hw, TXGBE_MNGSEM_SWPHY) != 0)
		return;
	hw->phy.write_i2c_eeprom(hw, TXGBE_SFF_8636_TX_DISABLE,
			off ? TXGBE_SFF_8636_TX_DISABLE_ALL_LANES : 0);
	hw->mac.release_swfw_sync(hw, TXGBE_MNGSEM_SWPHY);
}

Call it from txgbe_dev_start/stop() and txgbe_dev_set_link_up/down().

Warnings
--------

Patch 16/17 (net/txgbe: respect manual link-down on Amber-Lite)

Same as v9. hw->dev_start is checked once at the top of
txgbe_dev_setup_link_alarm_handler_aml() and the AN73 watchdog, then
setup_link() runs for seconds on the alarm or txgbe-link thread.
txgbe_dev_set_link_down() does not cancel the alarms or wait for the
link thread, so a link-down that lands in that window is undone when
setup_link() returns.

Do what txgbe_dev_stop() does, before touching the laser:

	hw->dev_start = false;
	if (hw->mac.type == txgbe_mac_aml ||
	    hw->mac.type == txgbe_mac_aml40) {
		rte_eal_alarm_cancel(txgbe_dev_e56_check_bp_event, dev);
		rte_eal_alarm_cancel(txgbe_dev_setup_link_alarm_handler_aml, hw);
		txgbe_dev_wait_setup_link_complete(dev, 0);
		rte_eal_alarm_cancel(txgbe_dev_setup_link_alarm_handler_aml, hw);
	}
	hw->mac.disable_tx_laser(hw);

and re-arm txgbe_dev_e56_check_bp_event in txgbe_dev_set_link_up().

Info
----

Patch 5/17: need_restart is still always true past the early return.
Pass true and drop the variable.

Patch 12/17: the *_dflt variables are initialized to 0 and then
unconditionally overwritten. Declare them where they are assigned.

Patch 14/17: still busy-waits up to 200 ms (page exchange) and 400 ms
(CL72) with usec_delay() on the EAL alarm thread.

Patch 15/17: the txgbe_is_40g_fiber_qsfp() branch is still identical
to the final else. Drop the helper.

Patch 17/17: a field rename is not a fix, and 234ce0d1fa9d is not in
25.11, so there is nothing to backport. Drop Fixes: and Cc: stable.

Review-Result: ERROR

  reply	other threads:[~2026-10-26 16:29 UTC|newest]

Thread overview: 119+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27 11:41 [PATCH 00/13] Wangxun fixes and new features Zaiyu Wang
2026-08-27 20:11 ` Stephen Hemminger
2026-09-08 12:43   ` Zaiyu Wang
2026-10-12 10:56 ` [PATCH v8 00/16] " Zaiyu Wang
2026-10-12 21:41   ` Stephen Hemminger
     [not found] ` <20261012110518.1911-1-zaiyuwang@trustnetic.com>
2026-10-12 10:56   ` [PATCH v8 01/16] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 02/16] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 03/16] net/txgbe: fix e56 PHY configuration error Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 04/16] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 05/16] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 06/16] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 07/16] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 08/16] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 09/16] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 10/16] net/txgbe: fix DAC hot-plug on 40G NIC with auto-negotiation Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 11/16] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 12/16] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 13/16] net/txgbe: add devarg to turn off Tx laser for 40G NIC Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 14/16] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 15/16] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-12 10:56   ` [PATCH v8 16/16] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-22 11:03 ` [PATCH v9 00/16] Wangxun fixes and new features Zaiyu Wang
2026-10-22 17:17   ` Stephen Hemminger
2026-10-23 11:10     ` Zaiyu Wang
     [not found] ` <20261022111017.3605-1-zaiyuwang@trustnetic.com>
2026-10-22 11:03   ` [PATCH v9 01/16] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 02/16] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 03/16] net/txgbe: fix e56 PHY configuration error Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 04/16] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 05/16] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 06/16] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 07/16] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 08/16] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 09/16] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 10/16] net/txgbe: fix DAC hot-plug on 40G NIC with auto-negotiation Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 11/16] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 12/16] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 13/16] net/txgbe: add devarg to turn off Tx laser for 40G NIC Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 14/16] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 15/16] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-22 11:03   ` [PATCH v9 16/16] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-23 11:03 ` [PATCH v10 00/17] Wangxun fixes and new features Zaiyu Wang
2026-10-23 16:01   ` Stephen Hemminger
2026-10-26 12:27     ` Zaiyu Wang
     [not found] ` <20261023110728.3975-1-zaiyuwang@trustnetic.com>
2026-10-23 11:03   ` [PATCH v10 01/17] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 02/17] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 03/17] net/txgbe: fix E56 PHY configuration error Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 04/17] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 05/17] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 06/17] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 07/17] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 08/17] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 09/17] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 10/17] net/txgbe: fix DAC hot-plug on AML40 with auto-negotiation Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 11/17] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 12/17] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 13/17] net/txgbe: add devarg to turn off Tx laser for AML40 Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 14/17] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 15/17] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 16/17] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-23 11:03   ` [PATCH v10 17/17] net/txgbe: fix typo in the fiber_support_speed field Zaiyu Wang
2026-10-26 12:21 ` [PATCH v11 00/17] Wangxun fixes and new features Zaiyu Wang
2026-10-26 16:28   ` Stephen Hemminger [this message]
2026-10-27 11:45     ` Zaiyu Wang
     [not found] ` <20261026122638.9198-1-zaiyuwang@trustnetic.com>
2026-10-26 12:21   ` [PATCH v11 01/17] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 02/17] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 03/17] net/txgbe: fix E56 PHY configuration error Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 04/17] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 05/17] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 06/17] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 07/17] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 08/17] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 09/17] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 10/17] net/txgbe: fix DAC hot-plug on AML40 with auto-negotiation Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 11/17] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 12/17] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-26 12:21   ` [PATCH v11 13/17] net/txgbe: fix Tx laser left on at AML40 link down Zaiyu Wang
2026-10-26 12:22   ` [PATCH v11 14/17] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-26 12:22   ` [PATCH v11 15/17] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-26 12:22   ` [PATCH v11 16/17] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-26 12:22   ` [PATCH v11 17/17] net/txgbe: fix typo in the fiber support speed field Zaiyu Wang
2026-10-27 11:38 ` [PATCH v12 00/17] Wangxun fixes and new features Zaiyu Wang
     [not found] ` <20261027114218.9724-1-zaiyuwang@trustnetic.com>
2026-10-27 11:38   ` [PATCH v12 01/17] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 02/17] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 03/17] net/txgbe: fix E56 PHY configuration error Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 04/17] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 05/17] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 06/17] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 07/17] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 08/17] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 09/17] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 10/17] net/txgbe: fix DAC hot-plug on AML40 with auto-negotiation Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 11/17] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 12/17] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 13/17] net/txgbe: fix Tx laser left on at AML40 link down Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 14/17] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 15/17] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 16/17] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-27 13:48     ` Stephen Hemminger
2026-10-28 10:40       ` Zaiyu Wang
2026-10-27 11:38   ` [PATCH v12 17/17] net/txgbe: fix typo in the fiber support speed field Zaiyu Wang
2026-10-28 10:33 ` [PATCH v13 00/17] Wangxun fixes and new features Zaiyu Wang
2026-10-28 15:32   ` Stephen Hemminger
     [not found] ` <20261028103913.10188-1-zaiyuwang@trustnetic.com>
2026-10-28 10:33   ` [PATCH v13 01/17] net/txgbe: fix failure to configure 10G on dual-speed DAC Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 02/17] net/txgbe: use the requested speed in E56 AN setup Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 03/17] net/txgbe: fix E56 PHY configuration error Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 04/17] net/txgbe: fix incorrect link state in 10G forced mode Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 05/17] net/txgbe: do not force reconfig on link retry Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 06/17] net/txgbe: set i2c sda hold time Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 07/17] net/txgbe: fix link speed display info for 10G mode Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 08/17] net/txgbe: remove stale outer UDP checksum offload flag Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 09/17] net/txgbe: fix SFP hot-plug when auto-negotiation is on Zaiyu Wang
2026-10-28 10:33   ` [PATCH v13 10/17] net/txgbe: fix DAC hot-plug on AML40 with auto-negotiation Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 11/17] net/txgbe: fix 40G FFE tuning applied to first lane only Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 12/17] net/txgbe: add pre2 FFE tap and backplane capability devargs Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 13/17] net/txgbe: fix Tx laser left on at AML40 link down Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 14/17] net/txgbe: fix CR/KR link training and recovery Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 15/17] net/txgbe: align link capabilities and DAC classification Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 16/17] net/txgbe: respect manual link-down on Amber-Lite Zaiyu Wang
2026-10-28 10:34   ` [PATCH v13 17/17] net/txgbe: fix typo in the fiber support speed field Zaiyu Wang

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=20261026092856.23d9d925@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=zaiyuwang@trustnetic.com \
    /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