From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDFC139DBCA for ; Wed, 8 Apr 2026 14:11:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775657470; cv=none; b=nTEIL2/r7duHQ16eK7nPuldrptNbxiX+9yG0JCz1cyfiBwXoAbkdCgDFNOQ1E6TUnyIEkLawz9uj/nr76aakVPuMzPHwyJJOj14Y1iEI16mVIk4SIF+EmFgZP5Rz04KCYe0WfDHLMXT0mhRgfYfsfNoFTvxGnEUsI+OuP7Lqe4k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775657470; c=relaxed/simple; bh=goncyoFHCJ+qxXrxdTzPIV8gay2dfG8ABKFs2X8eL3E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PY/1YcTt8G7ZowJuMEqf6HKKJxJLGrJ+TEAYnJ/1dTkIkMA5V63JtzUBIP2aLl5n8oIcQuJAvX7LFJaG2o5eBYMKBf6c5IDTWyoSgqZPDdxhE112MNTgzxtKcmmKroVEzETNwNHGV4FqIvL/sr6O9bYxjh9EeGCJuPZTpqYzgwk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ltLwnFFe; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ltLwnFFe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775657469; x=1807193469; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=goncyoFHCJ+qxXrxdTzPIV8gay2dfG8ABKFs2X8eL3E=; b=ltLwnFFe8gdETVZBMdnyrUDGveB1yC+6i7YUQzJptR951hP5LvLT0nKc 8UITfIk37+xUQ3pzd4+NjC8uLB7uinkRDnngmD4PxyCvnGdJy04T7SRIl 5Qj/XieEiM/FLg3qSPb0uqVhnHricvDAuayXv186A2mr9e71u5eZcWDGT 8ZU7x+vfX96ZpQQ8getdG8sWLn1gKPP25qG5dtZ9RB4TjriPUwj+J6Ndl nc5D3Ff2HmdTPJvLMMYyFZQSsN4TUSFB+lSjGQTocbIqPXbHnmMiQ0dZN NNeFQEKZ7K9hhRm68umRq1naTM1CbEvr95cXWiIlSanfg1bHRBIyr7mSD w==; X-CSE-ConnectionGUID: zzZQfUhTRDK0nJ3UxeELXA== X-CSE-MsgGUID: Xr3Omj3bSwelv+MPlefC5w== X-IronPort-AV: E=McAfee;i="6800,10657,11753"; a="76358663" X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="76358663" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2026 07:11:08 -0700 X-CSE-ConnectionGUID: l5M3vLNJTda7FdNanzWWgQ== X-CSE-MsgGUID: xwh4V9ZdTzWBYPFZynAnXA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,167,1770624000"; d="scan'208";a="225306483" Received: from amlin-019-225.igk.intel.com ([10.102.19.225]) by fmviesa007.fm.intel.com with ESMTP; 08 Apr 2026 07:11:06 -0700 From: Aleksandr Loktionov To: intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com Cc: netdev@vger.kernel.org, Paul Greenwalt , Simon Horman Subject: [PATCH net v2] ice: fix ice_init_link() error return preventing probe Date: Wed, 8 Apr 2026 16:11:05 +0200 Message-ID: <20260408141105.2781683-1-aleksandr.loktionov@intel.com> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Paul Greenwalt ice_init_link() can return an error status from ice_update_link_info() or ice_init_phy_user_cfg(), causing probe to fail. An incorrect NVM update procedure can result in link/PHY errors, and the recommended resolution is to update the NVM using the correct procedure. If the driver fails probe due to link errors, the user cannot update the NVM to recover. The link/PHY errors logged are non-fatal: they are already annotated as 'not a fatal error if this fails'. Since none of the errors inside ice_init_link() should prevent probe from completing, convert it to void and remove the error check in the caller. All failures are already logged; callers have no meaningful recovery path for link init errors. Fixes: 5b246e533d01 ("ice: split probe into smaller functions") Cc: stable@vger.kernel.org Signed-off-by: Paul Greenwalt Signed-off-by: Aleksandr Loktionov Reviewed-by: Simon Horman --- v1 -> v2: - Rename the now-unused goto label err_init_link to err_deinit_pf_sw to better describe the cleanup it performs (Simon Horman). drivers/net/ethernet/intel/ice/ice_main.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index cf116bb..a6b0c09 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -4856,16 +4856,14 @@ static void ice_init_wakeup(struct ice_pf *pf) device_set_wakeup_enable(ice_pf_to_dev(pf), false); } -static int ice_init_link(struct ice_pf *pf) +static void ice_init_link(struct ice_pf *pf) { struct device *dev = ice_pf_to_dev(pf); int err; err = ice_init_link_events(pf->hw.port_info); - if (err) { + if (err) dev_err(dev, "ice_init_link_events failed: %d\n", err); - return err; - } /* not a fatal error if this fails */ err = ice_init_nvm_phy_type(pf->hw.port_info); @@ -4899,8 +4897,6 @@ static int ice_init_link(struct ice_pf *pf) } else { set_bit(ICE_FLAG_NO_MEDIA, pf->flags); } - - return err; } static int ice_init_pf_sw(struct ice_pf *pf) @@ -5043,11 +5039,9 @@ static int ice_init(struct ice_pf *pf) ice_init_wakeup(pf); - err = ice_init_link(pf); - if (err) - goto err_init_link; + ice_init_link(pf); err = ice_send_version(pf); if (err) - goto err_init_link; + goto err_deinit_pf_sw; @@ -5069,7 +5063,7 @@ static int ice_init(struct ice_pf *pf) return 0; -err_init_link: +err_deinit_pf_sw: ice_deinit_pf_sw(pf); err_init_pf_sw: ice_dealloc_vsis(pf); unroll_pf_init: -- 2.52.0