Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2080129pxb; Mon, 12 Apr 2021 13:53:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8K6iwvEa/f9NfUK3JMSHZzcGFl3mLu1EI8JpqryWUFSVItIj5H1MqVM5LxocOja8rF9IG X-Received: by 2002:a63:2c8a:: with SMTP id s132mr28716408pgs.165.1618260838895; Mon, 12 Apr 2021 13:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618260838; cv=none; d=google.com; s=arc-20160816; b=pat5zuGgimfnp0n+zzjnXZMGy/w/M7e6FmddHNwmgpBd4OSDzhpGIew93xk5YMB8dE aum3xKo74lDs8U9iFjFqr77IGw3HWBWeDVR1fCAaQgw6Dwdm8nIny3+qGDzh5FOuAc0O PpV8eX52CPCT6w1W0h6j1uPAcqobf+3iKjvRcRtwC8t8m6Ssb2W+xvIvItWdOouhyzF4 cfpCqVmYsSHKLEcSMum21ff64OytP73f4MolLsTK9RNJ55GNW0/oGQ3ovRM0FS+5McQ1 aL6h6wxD69ZzKWqnh+FJP4R9b8JZH06DhJ6JwKIa8ui3+C8DSWaPG64f9nFskLLWx80F DJyw== 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=Di2k47dudadwMV1H3LN5Pfv9gAHW6TTLkFhd4i1tXE8=; b=Tk9jih6ggyNi3i030JDrcSapi58vSyQmJkIRFGjW9+ZgXQmbXadaxXQAzCXoUdtxdC 0LCFCKSD+csIbiaT22MusyZ1DxZgNTS7MuPX9oVqA1dcQIItOPN77gVJ0ba4xklof63t p4rpT90Kp5V2wyJC2eh+A4dfEfi9INLnA/xvUOtb+kKYqFWABNqoklWzGdXY+2TVT9av wuUhkohmSvkrxWia2dGLKcOukYpCWA23MhmljOlT2DaO4cidPJayRjU6d3+liVArKfMc biSwphlFTviCoBapzMmm5A4CXtVVxn9NuAQiPii57FdoPM7zzbBEoubIIMsl5CbqTeyl 1b7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HZSGAZes; 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 l6si7349798plk.312.2021.04.12.13.53.45; Mon, 12 Apr 2021 13:53:58 -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=HZSGAZes; 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 S239798AbhDLJBV (ORCPT + 99 others); Mon, 12 Apr 2021 05:01:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:45752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238497AbhDLIw1 (ORCPT ); Mon, 12 Apr 2021 04:52:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 325EB6135A; Mon, 12 Apr 2021 08:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217484; bh=QfaVVaYoLDnipK6ASqOTcGAk4lY9H4AoxvZ5b5fMMCw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HZSGAZesriJZYCudhSeSr59zZUiIJ3eMKQ8UW2+HpokZ/wcOx4wi/fKJu4Cz7cUp4 qL9uykt8GbrQEGMgSy3rUF41+5WkEeEgI2lOtAo1DVDtGqREYU9xSOZY+Rm0z/+PTD RUh4F9LGPC+M96JG/uXFX6N2fKv1ZfY740r/Z5w4= 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.10 033/188] ice: Continue probe on link/PHY errors Date: Mon, 12 Apr 2021 10:39:07 +0200 Message-Id: <20210412084014.752339641@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084013.643370347@linuxfoundation.org> References: <20210412084013.643370347@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 @@ -4170,28 +4170,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);