[{"id":3674863,"web_url":"http://patchwork.ozlabs.org/comment/3674863/","msgid":"<d2a40b73-2019-479d-9eb0-3a0e9c440659@molgen.mpg.de>","list_archive_url":null,"date":"2026-04-08T17:20:52","subject":"Re: [Intel-wired-lan] [PATCH net v2] ice: fix ice_init_link() error\n return preventing probe","submitter":{"id":70275,"url":"http://patchwork.ozlabs.org/api/people/70275/","name":"Paul Menzel","email":"pmenzel@molgen.mpg.de"},"content":"Dear Aleksandr, dear Paul,\n\n\nThank you for the patch.\n\nAm 08.04.26 um 16:11 schrieb Aleksandr Loktionov:\n> From: Paul Greenwalt <paul.greenwalt@intel.com>\n> \n> ice_init_link() can return an error status from ice_update_link_info()\n> or ice_init_phy_user_cfg(), causing probe to fail.\n> \n> An incorrect NVM update procedure can result in link/PHY errors, and\n> the recommended resolution is to update the NVM using the correct\n> procedure. If the driver fails probe due to link errors, the user\n> cannot update the NVM to recover. The link/PHY errors logged are\n> non-fatal: they are already annotated as 'not a fatal error if this\n> fails'.\n> \n> Since none of the errors inside ice_init_link() should prevent probe\n> from completing, convert it to void and remove the error check in the\n> caller. All failures are already logged; callers have no meaningful\n> recovery path for link init errors.\n\nDo you have a way to force the error path?\n\n> Fixes: 5b246e533d01 (\"ice: split probe into smaller functions\")\n> Cc: stable@vger.kernel.org\n> Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>\n> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\n> Reviewed-by: Simon Horman <horms@kernel.org>\n> ---\n> v1 -> v2:\n>   - Rename the now-unused goto label err_init_link to err_deinit_pf_sw\n>     to better describe the cleanup it performs (Simon Horman).\n> \n>   drivers/net/ethernet/intel/ice/ice_main.c | 16 +++++-----------\n>   1 file changed, 5 insertions(+), 11 deletions(-)\n> \n> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\n> index cf116bb..a6b0c09 100644\n> --- a/drivers/net/ethernet/intel/ice/ice_main.c\n> +++ b/drivers/net/ethernet/intel/ice/ice_main.c\n> @@ -4856,16 +4856,14 @@ static void ice_init_wakeup(struct ice_pf *pf)\n>   \tdevice_set_wakeup_enable(ice_pf_to_dev(pf), false);\n>   }\n>   \n> -static int ice_init_link(struct ice_pf *pf)\n> +static void ice_init_link(struct ice_pf *pf)\n>   {\n>   \tstruct device *dev = ice_pf_to_dev(pf);\n>   \tint err;\n>   \n>   \terr = ice_init_link_events(pf->hw.port_info);\n> -\tif (err) {\n> +\tif (err)\n>   \t\tdev_err(dev, \"ice_init_link_events failed: %d\\n\", err);\n> -\t\treturn err;\n> -\t}\n>   \n>   \t/* not a fatal error if this fails */\n>   \terr = ice_init_nvm_phy_type(pf->hw.port_info);\n> @@ -4899,8 +4897,6 @@ static int ice_init_link(struct ice_pf *pf)\n>   \t} else {\n>   \t\tset_bit(ICE_FLAG_NO_MEDIA, pf->flags);\n>   \t}\n> -\n> -\treturn err;\n>   }\n>   \n>   static int ice_init_pf_sw(struct ice_pf *pf)\n> @@ -5043,11 +5039,9 @@ static int ice_init(struct ice_pf *pf)\n>   \n>   \tice_init_wakeup(pf);\n>   \n> -\terr = ice_init_link(pf);\n> -\tif (err)\n> -\t\tgoto err_init_link;\n> +\tice_init_link(pf);\n>   \n>   \terr = ice_send_version(pf);\n>   \tif (err)\n> -\t\tgoto err_init_link;\n> +\t\tgoto err_deinit_pf_sw;\n>   \n> @@ -5069,7 +5063,7 @@ static int ice_init(struct ice_pf *pf)\n>   \treturn 0;\n>   \n> -err_init_link:\n> +err_deinit_pf_sw:\n\nThe renaming of the label could be mentioned in the commit message.\n\n>   \tice_deinit_pf_sw(pf);\n>   err_init_pf_sw:\n>   \tice_dealloc_vsis(pf);\n>   unroll_pf_init:\n\n\nKind regards,\n\nPaul","headers":{"Return-Path":"<intel-wired-lan-bounces@osuosl.org>","X-Original-To":["incoming@patchwork.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=00vFd2nN;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4frVGX64Qrz1xv0\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 03:21:24 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 2D16C60A48;\n\tWed,  8 Apr 2026 17:21:23 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id zRuhRpcIbqWc; Wed,  8 Apr 2026 17:21:21 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 04CE960847;\n\tWed,  8 Apr 2026 17:21:21 +0000 (UTC)","from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n by lists1.osuosl.org (Postfix) with ESMTP id 54E351F6\n for <intel-wired-lan@lists.osuosl.org>; Wed,  8 Apr 2026 17:21:19 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id 376B640377\n for <intel-wired-lan@lists.osuosl.org>; Wed,  8 Apr 2026 17:21:19 +0000 (UTC)","from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id 2CnkItRbr8vf for <intel-wired-lan@lists.osuosl.org>;\n Wed,  8 Apr 2026 17:21:18 +0000 (UTC)","from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11])\n by smtp2.osuosl.org (Postfix) with ESMTPS id 28E4A40054\n for <intel-wired-lan@lists.osuosl.org>; Wed,  8 Apr 2026 17:21:16 +0000 (UTC)","from [192.168.2.229] (p5dc55707.dip0.t-ipconnect.de [93.197.87.7])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested) (Authenticated sender: pmenzel)\n by mx.molgen.mpg.de (Postfix) with ESMTPSA id 7DA944C2C37D60;\n Wed, 08 Apr 2026 19:20:53 +0200 (CEST)"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp3.osuosl.org 04CE960847","OpenDKIM Filter v2.11.0 smtp2.osuosl.org 28E4A40054"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1775668881;\n\tbh=EMN26tcri+A6pAuNyMm6CoIV/LzpguMlQrW8dtZlQSY=;\n\th=Date:To:Cc:References:From:In-Reply-To:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=00vFd2nNq2hVFkPEmNtJI3dntTeRVaNMtDWT0Ao0/ZnggHNr0AIOjEY9VuTSDAebx\n\t 5EZ85UP+rKF9aCk/qWSMWLZ0uPn/shIqozUpcY5eZUGazaGgmesFN2cQy/2ZaW3jN9\n\t z3PUwyEkjnqIKNI4Kzrk68VpGAroxtoe4yCmw9gPQplSIw5MlAWCDvuY7+NNEcPSzp\n\t A3padn3eJj4naEKjSOeh06JsRi6dE4IhvCDv3vTGnwisyYn6FlMtgyjx2pGzg+k7Tf\n\t LgXNSMYLdpDTudQbVF6yaMs2kPVtbMs9esDoTkGOmSbPOduTTGyljdK0yqLIeAkRtk\n\t K4b3LqIxNfFVg==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=141.14.17.11;\n helo=mx3.molgen.mpg.de; envelope-from=pmenzel@molgen.mpg.de;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp2.osuosl.org 28E4A40054","Message-ID":"<d2a40b73-2019-479d-9eb0-3a0e9c440659@molgen.mpg.de>","Date":"Wed, 8 Apr 2026 19:20:52 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","To":"Aleksandr Loktionov <aleksandr.loktionov@intel.com>","Cc":"intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,\n netdev@vger.kernel.org, Paul Greenwalt <paul.greenwalt@intel.com>,\n Simon Horman <horms@kernel.org>","References":"<20260408141105.2781683-1-aleksandr.loktionov@intel.com>","Content-Language":"en-US","From":"Paul Menzel <pmenzel@molgen.mpg.de>","In-Reply-To":"<20260408141105.2781683-1-aleksandr.loktionov@intel.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-Mailman-Original-Authentication-Results":"smtp2.osuosl.org;\n dmarc=none (p=none dis=none)\n header.from=molgen.mpg.de","Subject":"Re: [Intel-wired-lan] [PATCH net v2] ice: fix ice_init_link() error\n return preventing probe","X-BeenThere":"intel-wired-lan@osuosl.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>","List-Unsubscribe":"<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>","List-Archive":"<http://lists.osuosl.org/pipermail/intel-wired-lan/>","List-Post":"<mailto:intel-wired-lan@osuosl.org>","List-Help":"<mailto:intel-wired-lan-request@osuosl.org?subject=help>","List-Subscribe":"<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"}}]