Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2113028pxb; Mon, 12 Apr 2021 14:56:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbB0FSurIHFmkTCWsOEgZaELWiUcA6M57N2TrgIvXL4qjDkjdy2VIxtvH3ShdY6U3kRMbe X-Received: by 2002:a05:6402:27d3:: with SMTP id c19mr31794564ede.129.1618264613107; Mon, 12 Apr 2021 14:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618264613; cv=none; d=google.com; s=arc-20160816; b=kyXp3rBfqMHttbxjFDnWTl17UwVvY+7+RGPra0uLwEP8r5oa4B4vi1rtnlq0oJfysJ TAhkIb638Ac1gsWzTIXPlA1h3oiYNY26oxk95Bk0ylpZEZTMIpIv9c0gaPdHOEzMOSl0 HFWVEhbPkvqeSnt1y3YiV2hROi0YDovD3PeWyhShGuBjbOD3Qz6SAUPRtHZASOAu8rwB emLDj7mQgZgOr0s7bdSg+9oQ7Fm/VpM9h9gY6Jwm+rpWZhZWtz1t5nvDqGLLPMOEFPyN SSPztYcnV2eLG9m/9HUqt3ZlCXarrcdMtnQ3wy37ei5sglTz9eWsPPDnUR70LywXqg3T yIhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=evJfCmBmNHkj6gqjajn4B2MwRPwXm8RQONklPUbl9cA=; b=ktWVqw5BUtv9oqpjONCRjfqU29FcosYIZRh3MTjYnTeUfdDup22d95WtM7ycyq90zP C5aK7cEqjOo6NJrM+2C29tmi6/CyF/jlq5R7M4EEoJWeR9DtKxfJ94dgShqRvcxk1aWL 7dFyqdpTZ5diaKv8wpxE6IiUki2dqiTDprF0y44XCDWSQ7hiPboFao9Z3KcyktPy3C4i 8jDuV3oXJ7JKxbxLBQwisxtbO07daTA95JMeM2eOQvLLMLxlBKLPi6FnotxeIw2WGl0l SGcg6mx30SxyzZ+h8CxfuiLqrJ6Fc9ihdGwwQ9r3dluRBvOkKUneBRZ91CAK+5S6R3QY 1SHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Pp1Km87l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id he17si6552689ejc.99.2021.04.12.14.56.30; Mon, 12 Apr 2021 14:56:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Pp1Km87l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240743AbhDLJYZ (ORCPT + 99 others); Mon, 12 Apr 2021 05:24:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:54808 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237520AbhDLJBi (ORCPT ); Mon, 12 Apr 2021 05:01:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F095161372; Mon, 12 Apr 2021 09:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618218017; bh=DFRvUnFTyzk1sEmVzBwFnTa4aMnH5h0NfRgOJoeX2Dk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pp1Km87lkUWFQSkfDc5/QYKfi1YKy1zkOFZxtjcPmqYgMdhAUphgApHhmcvYojoG8 QxDVvHudUyyWCwXeAav6JdLXLacb6L+djNMxNklI+SqwdKdIywAR+o5JpTeyCShdFs 4neuNlta5zwCaMuPy1Jrh3PZl1eygeiC16ToSlDs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anirudh Venkataramanan , Tony Brelinski , Tony Nguyen Subject: [PATCH 5.11 040/210] ice: Continue probe on link/PHY errors Date: Mon, 12 Apr 2021 10:39:05 +0200 Message-Id: <20210412084017.347990613@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084016.009884719@linuxfoundation.org> References: <20210412084016.009884719@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anirudh Venkataramanan commit 08771bce330036d473be6ce851cd00bcd351ebf6 upstream. An incorrect NVM update procedure can result in the driver failing probe. In this case, the recommended resolution method is to update the NVM using the right procedure. However, if the driver fails probe, the user will not be able to update the NVM. So do not fail probe on link/PHY errors. Fixes: 1a3571b5938c ("ice: restore PHY settings on media insertion") Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/intel/ice/ice_main.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -4167,28 +4167,25 @@ ice_probe(struct pci_dev *pdev, const st goto err_send_version_unroll; } + /* not a fatal error if this fails */ err = ice_init_nvm_phy_type(pf->hw.port_info); - if (err) { + if (err) dev_err(dev, "ice_init_nvm_phy_type failed: %d\n", err); - goto err_send_version_unroll; - } + /* not a fatal error if this fails */ err = ice_update_link_info(pf->hw.port_info); - if (err) { + if (err) dev_err(dev, "ice_update_link_info failed: %d\n", err); - goto err_send_version_unroll; - } ice_init_link_dflt_override(pf->hw.port_info); /* if media available, initialize PHY settings */ if (pf->hw.port_info->phy.link_info.link_info & ICE_AQ_MEDIA_AVAILABLE) { + /* not a fatal error if this fails */ err = ice_init_phy_user_cfg(pf->hw.port_info); - if (err) { + if (err) dev_err(dev, "ice_init_phy_user_cfg failed: %d\n", err); - goto err_send_version_unroll; - } if (!test_bit(ICE_FLAG_LINK_DOWN_ON_CLOSE_ENA, pf->flags)) { struct ice_vsi *vsi = ice_get_main_vsi(pf);