From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88BD5C4320E for ; Wed, 1 Sep 2021 19:42:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6CD6C60F6F for ; Wed, 1 Sep 2021 19:42:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344367AbhIATng (ORCPT ); Wed, 1 Sep 2021 15:43:36 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:41884 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344117AbhIATnf (ORCPT ); Wed, 1 Sep 2021 15:43:35 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id DE8531C0B7F; Wed, 1 Sep 2021 21:42:36 +0200 (CEST) Date: Wed, 1 Sep 2021 21:42:36 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Jacob Keller , Tony Brelinski , Tony Nguyen , Jakub Kicinski , Sasha Levin Subject: Re: [PATCH 5.10 026/103] ice: do not abort devlink info if board identifier cant be found Message-ID: <20210901194236.GA8962@duo.ucw.cz> References: <20210901122300.503008474@linuxfoundation.org> <20210901122301.400339475@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline In-Reply-To: <20210901122301.400339475@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > From: Jacob Keller >=20 > [ Upstream commit a8f89fa27773a8c96fd09fb4e2f4892d794f21f6 ] >=20 > 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. >=20 > 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. Will it cause field to be skipped? I believe buffer will not be initialized which will result in some confusion... Best regards, Pavel > +++ b/drivers/net/ethernet/intel/ice/ice_devlink.c > @@ -23,7 +23,9 @@ static int ice_info_pba(struct ice_pf *pf, char *buf, s= ize_t len) > =20 > status =3D 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 stri= ng, status %s\n", > + ice_stat_str(status)); > =20 > return 0; > } --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYS/XrAAKCRAw5/Bqldv6 8iKsAJ4rSW8qJZhHwStBU5di4R9xTrJCkACeOK1vtzuDDfZj6mgROfvT3pzz02A= =zWv5 -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY--