Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp876965pxb; Wed, 1 Sep 2021 11:54:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwayQ5L0fxzNSmi/JjiqZ1IZW+Rb0Yuz47X5cMnlBL2H+czYC5qIFbH/koVll3to98N5XPQ X-Received: by 2002:a17:906:7847:: with SMTP id p7mr996291ejm.335.1630522466322; Wed, 01 Sep 2021 11:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522466; cv=none; d=google.com; s=arc-20160816; b=B9OUzX7SfRtK4SM0jiacVFNk7ifxZxbuFJZqGwGEmyRhs/3lXG2Tsukc4GN9pM10nX BVtsl1fumRGOSfbHzSSypjaz4I18dGlkWXq5Oe99U6syrxclHlmbYUNVikbUIw1PBdUG BDG8nmA9sPvTvCisVeEaRGVEX2AyJot/yLP0WID53NZuALQhH6Fd3GSYRognndOpJr4n iYVdi4NksoEhbbq/AVGLzYA0JzPFvs2DvbwqEEcEbgXHVwHUNVFbanWb8kz4hssK/qUH 0Sejbgk/L19E8w3TGZma1Iw3cxi33hqyzb89qIsuO566PftanDR+obQI9btN7FXpUZEG 8YBw== 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=jmMaZyOdNakenM69T9nRpBremQouXkrbyDOoD7CaiZE=; b=YvS7h9ATXy7tPOfhFdiV4WnjH49Pqd2Rw4Tx4JI7gWdNSacOAmPyZE2J9z/yqi6iWJ 9aq/duTRSyrqlccALwuIsb7+O7DfJHnxX3v7hAe5Lqh221ZpEet5uLMWVEf99y24COUv 58f5u0rmgpBONb33sn9pJ/FXvoT5R/huj1wWcKu4hHVCw5CcSewEAK4NaAgms13y+twg W3dfEnatscTlmG5ndfrKKw5wIBm0UZWpzi+la1vtVSOFWVwdfpGuJ++htGg/0TKlf89m LRhzKlGZq8JcbUk1bDVAh5a5K+8oh4HW2wNXIV5SmURVRdoSoYdPpHrMpMsd/UKWHffa XTUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jIq3VCKi; 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 j18si372764edp.44.2021.09.01.11.54.03; Wed, 01 Sep 2021 11:54:26 -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=jIq3VCKi; 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 S1344303AbhIAMm2 (ORCPT + 99 others); Wed, 1 Sep 2021 08:42:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:42100 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344153AbhIAMjQ (ORCPT ); Wed, 1 Sep 2021 08:39:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A91FA61158; Wed, 1 Sep 2021 12:35:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1630499705; bh=3Lupy4i+U3DVRO95UUtlvyvlP034Wioq9N7ZS8uv8mU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jIq3VCKiPBdeS1qd5V7gyTQkzNJrL7NBda6uzYSED2h6HU8nstX/Re3nNBM2DVKmS 987F1UXlXRSVMJmwLvG5aYlMrxrw3jaBgyUghgEw8GKXsr25ydILRMvCYqDHgyDsHh xOQGv4fWRKVbj0g9RpIBgNC5FontEFvvtRC8XV8E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jacob Keller , Tony Brelinski , Tony Nguyen , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.10 026/103] ice: do not abort devlink info if board identifier cant be found Date: Wed, 1 Sep 2021 14:27:36 +0200 Message-Id: <20210901122301.400339475@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210901122300.503008474@linuxfoundation.org> References: <20210901122300.503008474@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: Jacob Keller [ Upstream commit a8f89fa27773a8c96fd09fb4e2f4892d794f21f6 ] The devlink dev info command reports version information about the device and firmware running on the board. This includes the "board.id" field which is supposed to represent an identifier of the board design. The ice driver uses the Product Board Assembly identifier for this. In some cases, the PBA is not present in the NVM. If this happens, devlink dev info will fail with an error. Instead, modify the ice_info_pba function to just exit without filling in the context buffer. This will cause the board.id field to be skipped. Log a dev_dbg message in case someone wants to confirm why board.id is not showing up for them. Fixes: e961b679fb0b ("ice: add board identifier info to devlink .info_get") Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20210819223451.245613-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_devlink.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c index 511da59bd6f2..f18ce43b7e74 100644 --- a/drivers/net/ethernet/intel/ice/ice_devlink.c +++ b/drivers/net/ethernet/intel/ice/ice_devlink.c @@ -23,7 +23,9 @@ static int ice_info_pba(struct ice_pf *pf, char *buf, size_t len) status = ice_read_pba_string(hw, (u8 *)buf, len); if (status) - return -EIO; + /* We failed to locate the PBA, so just skip this entry */ + dev_dbg(ice_pf_to_dev(pf), "Failed to read Product Board Assembly string, status %s\n", + ice_stat_str(status)); return 0; } -- 2.30.2