Thread (12 messages) read the whole thread 12 messages, 2 authors, 2026-06-22
COLD38d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH net 0/5] net: hns3: fix configuration deadlocks and refactor link setup

From: Jijie Shao <shaojijie@huawei.com>
Date: 2026-06-17 11:28:18
Also in: lkml

This patch series addresses a sequence of link configuration deadlocks
and parameter contamination issues in the hns3 network driver, which
typically occur during hardware resets or driver initialization under
specific user-configured scenarios.

The bugs root from asynchronous discrepancies between the MAC state machine
and cached user requests during sudden hardware resets, leading to invalid
parameter combos or frozen registers.

The series is organized as follows:
- Patch 1 refactors the ethtool link settings entry path to unify copper
  port handling (both native kernel PHY_LIB and firmware-controlled PHY)
  and ensures req_xxx configurations are uniformly saved across all modes.
- Patch 2 refactors the MAC initialization by extracting the autoneg and
  speed configuration logic out of hclge_mac_init() into a dedicated
  helper function.
- Patch 3 fixes a permanent link-down deadlock after a reset by
  ensuring that the driver caches and uses the user's intended autoneg
  /speed settings (req_***) rather than un-synchronized runtime states
  or SPEED_UNKNOWN tokens.
- Patch 4 fixes a link loss issue on optical ports during
  initialization by differentiating autoneg default values between
  copper and fiber media types.
- Patch 5 fixes an initialization (probe) failure caused by lane_num
  contamination from previous active lifecycle by introducing
  req_lane_num=0, which leverages firmware automatic lane matching.

Shuaisong Yang (5):
  net: hns3: unify copper port ksettings configuration path
  net: hns3: refactor MAC autoneg and speed configuration
  net: hns3: fix permanent link down deadlock after reset
  net: hns3: differentiate autoneg default values between copper and
    fiber
  net: hns3: fix init failure caused by lane_num contamination

 .../ethernet/hisilicon/hns3/hns3_ethtool.c    |  26 ++---
 .../hisilicon/hns3/hns3pf/hclge_main.c        | 100 ++++++++++++++----
 .../hisilicon/hns3/hns3pf/hclge_main.h        |   1 +
 3 files changed, 90 insertions(+), 37 deletions(-)


base-commit: 406e8a651a7b854c41fecd5117bb282b3a6c2c6b
-- 
2.33.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help