patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 0/2] Wangxun bug fixes
@ 2025-02-24  9:59 Zaiyu Wang
  2025-02-24  9:59 ` [PATCH 1/2] net/ngbe: fix WOL and NCSI capability error Zaiyu Wang
  2025-02-24  9:59 ` [PATCH 2/2] net/txgbe: remove meaningless choice for SW-FW sync Zaiyu Wang
  0 siblings, 2 replies; 3+ messages in thread
From: Zaiyu Wang @ 2025-02-24  9:59 UTC (permalink / raw)
  To: dev; +Cc: stable, Zaiyu Wang

Fix some bugs for txgbe and ngbe.

Zaiyu Wang (2):
  net/ngbe: fix WOL and NCSI capability error
  net/txgbe: remove meaningless choice for SW-FW sync

 drivers/net/ngbe/base/ngbe_hw.c    | 8 +++++---
 drivers/net/txgbe/base/txgbe_phy.c | 8 ++------
 2 files changed, 7 insertions(+), 9 deletions(-)

-- 
2.21.0.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] net/ngbe: fix WOL and NCSI capability error
  2025-02-24  9:59 [PATCH 0/2] Wangxun bug fixes Zaiyu Wang
@ 2025-02-24  9:59 ` Zaiyu Wang
  2025-02-24  9:59 ` [PATCH 2/2] net/txgbe: remove meaningless choice for SW-FW sync Zaiyu Wang
  1 sibling, 0 replies; 3+ messages in thread
From: Zaiyu Wang @ 2025-02-24  9:59 UTC (permalink / raw)
  To: dev; +Cc: stable, Zaiyu Wang, Jiawen Wu

When determining NIC's WOL and NCSI capability via sub-system ID,
flag matching must be exact, not inclusive. Misidentifying WOL/NCSI
capability will skip PHY configuration, causing link-up failure.

Fixes: 5f1ab0d529fc ("net/ngbe: add WOL and NCSI capability")
Cc: stable@dpdk.org

Signed-off-by: Zaiyu Wang <zaiyuwang@trustnetic.com>
---
 drivers/net/ngbe/base/ngbe_hw.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ngbe/base/ngbe_hw.c b/drivers/net/ngbe/base/ngbe_hw.c
index e29a1946e5..6688ae6a31 100644
--- a/drivers/net/ngbe/base/ngbe_hw.c
+++ b/drivers/net/ngbe/base/ngbe_hw.c
@@ -1922,6 +1922,8 @@ void ngbe_read_efuse(struct ngbe_hw *hw)
 void ngbe_map_device_id(struct ngbe_hw *hw)
 {
 	u16 oem = hw->sub_system_id & NGBE_OEM_MASK;
+	u16 ncsi = hw->sub_system_id & NGBE_NCSI_SUP_MASK;
+	u16 wol = hw->sub_system_id & NGBE_WOL_SUP_MASK;
 
 	hw->is_pf = true;
 
@@ -1982,9 +1984,9 @@ void ngbe_map_device_id(struct ngbe_hw *hw)
 			oem == NGBE_LY_YT8521S_SFP)
 		hw->gpio_ctl = true;
 
-	hw->wol_enabled = (hw->sub_system_id & NGBE_WOL_SUP_MASK) ? true : false;
-	hw->ncsi_enabled = (hw->sub_system_id & NGBE_NCSI_SUP_MASK ||
-			    hw->sub_system_id & NGBE_OCP_CARD) ? true : false;
+	hw->wol_enabled = (wol == NGBE_WOL_SUP_MASK) ? true : false;
+	hw->ncsi_enabled = (ncsi == NGBE_NCSI_SUP_MASK ||
+			   oem == NGBE_OCP_CARD) ? true : false;
 }
 
 /**
-- 
2.21.0.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] net/txgbe: remove meaningless choice for SW-FW sync
  2025-02-24  9:59 [PATCH 0/2] Wangxun bug fixes Zaiyu Wang
  2025-02-24  9:59 ` [PATCH 1/2] net/ngbe: fix WOL and NCSI capability error Zaiyu Wang
@ 2025-02-24  9:59 ` Zaiyu Wang
  1 sibling, 0 replies; 3+ messages in thread
From: Zaiyu Wang @ 2025-02-24  9:59 UTC (permalink / raw)
  To: dev; +Cc: stable, Zaiyu Wang, Jiawen Wu, Jian Wang, Ferruh Yigit

Remove superfluous 'if' and 'else' for SW-FW sync.

Bugzilla ID: 1581
Fixes: 5364a1ce30df ("net/txgbe: add PHY init")
Cc: stable@dpdk.org

Signed-off-by: Zaiyu Wang <zaiyuwang@trustnetic.com>
---
 drivers/net/txgbe/base/txgbe_phy.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/txgbe/base/txgbe_phy.c b/drivers/net/txgbe/base/txgbe_phy.c
index d87af656d5..ce6882e262 100644
--- a/drivers/net/txgbe/base/txgbe_phy.c
+++ b/drivers/net/txgbe/base/txgbe_phy.c
@@ -80,12 +80,8 @@ static s32 txgbe_read_phy_if(struct txgbe_hw *hw)
 	if (hw->phy.nw_mng_if_sel & TXGBE_ETHPHYIF_MDIO_ACT)
 		hw->phy.addr = TXGBE_ETHPHYIF_MDIO_BASE(hw->phy.nw_mng_if_sel);
 
-	if (!hw->phy.phy_semaphore_mask) {
-		if (hw->bus.lan_id)
-			hw->phy.phy_semaphore_mask = TXGBE_MNGSEM_SWPHY;
-		else
-			hw->phy.phy_semaphore_mask = TXGBE_MNGSEM_SWPHY;
-	}
+	if (!hw->phy.phy_semaphore_mask)
+		hw->phy.phy_semaphore_mask = TXGBE_MNGSEM_SWPHY;
 
 	return 0;
 }
-- 
2.21.0.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-24 10:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-24  9:59 [PATCH 0/2] Wangxun bug fixes Zaiyu Wang
2025-02-24  9:59 ` [PATCH 1/2] net/ngbe: fix WOL and NCSI capability error Zaiyu Wang
2025-02-24  9:59 ` [PATCH 2/2] net/txgbe: remove meaningless choice for SW-FW sync Zaiyu Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).