Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4181177pxk; Tue, 8 Sep 2020 12:48:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxp9jy/luLVADZIaOt1tWVTDLWKgZvkZ9XsSjR1velKXhQ97JMF1PUl5sb7YPlIgUAvfjPN X-Received: by 2002:a17:906:b6d5:: with SMTP id ec21mr68233ejb.396.1599594515795; Tue, 08 Sep 2020 12:48:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599594515; cv=none; d=google.com; s=arc-20160816; b=e1f4AOxijNVUgSUQ+R7qYkRk2hMfDnWP9rA4cK5EjD2/wvFqnDEoRgHbRcgrqx/t4L BOh43/n881ylJwGteyZeVdjfgiNy4r/QOiODkUt817TCuDJo1zZ2cpGZi5w3qeKc6g8R W0AKFnwYO3g+1Q4/i4g6ZlXCjiYSJZtSzWjaYOngZ0UKi+0o6YOE3APW4s74F9NO523l qdfbEMqz1awL6LMQedp3pV0pMs1J7Iy8C7lFH9QbsWM/DSLQWY/NW8KoY8utkGOI7Cfl LhmiJIaTL7NZRz3JYdQflqjsiE2KI9I/vU2dvqgDDmB0LCiVoxHOw3P7jt8yr04BpgLB WIhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=X8Y4eYF0qaFoCnXCzAti5GCd7eOfBbfFOE+6+cGyJvg=; b=QgirelIbDP0VIpLgOUtEuiS5Yaqf0DxfL1C71TDmW/u116TtvsVIAJNlwtqxAJi/w/ zJOuXpdl9lV9GfwRXz2ixvHFKIVk47akYBOeGsWIxRhHH/uLXkTEkp7C70L3u4txY3Lm nSIKiVw/pMq2v1Axpv+/dewefWPnPxjiGChTy+IYUakzXBSkS4GckkCT2cM+CU9CYVKC CzRj/ozNzAN4T18Ui6fHUaIiITCo5PiG0wEAwvvoQSXTL9sOOAdtGEjG20Qj0udRwC5L ab/vCZXaPT5ElsnPw3DQiAYn9t33nUcFnMS5MYexhFrTayvgiBBQQWrxsfdBMj7m8euz WFTg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b5si24189ejq.317.2020.09.08.12.48.13; Tue, 08 Sep 2020 12:48:35 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732401AbgIHTrf (ORCPT + 99 others); Tue, 8 Sep 2020 15:47:35 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:46044 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732210AbgIHTr2 (ORCPT ); Tue, 8 Sep 2020 15:47:28 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 194181C0B87; Tue, 8 Sep 2020 21:47:24 +0200 (CEST) Date: Tue, 8 Sep 2020 21:47:23 +0200 From: Pavel Machek To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Marc Smith , Edwin Peer , Michael Chan , "David S. Miller" , Sasha Levin Subject: Re: [PATCH 4.19 34/88] bnxt_en: fix HWRM error when querying VF temperature Message-ID: <20200908194723.GB6758@duo.ucw.cz> References: <20200908152221.082184905@linuxfoundation.org> <20200908152222.792503974@linuxfoundation.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8P1HSweYDcXXzwPJ" Content-Disposition: inline In-Reply-To: <20200908152222.792503974@linuxfoundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --8P1HSweYDcXXzwPJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > Firmware returns RESOURCE_ACCESS_DENIED for HWRM_TEMP_MONITORY_QUERY for > VFs. This produces unpleasing error messages in the log when temp1_input > is queried via the hwmon sysfs interface from a VF. >=20 > The error is harmless and expected, so silence it and return unknown as > the value. Since the device temperature is not particularly sensitive > information, provide flexibility to change this policy in future by > silencing the error rather than avoiding the HWRM call entirely for VFs. >=20 > Fixes: cde49a42a9bb ("bnxt_en: Add hwmon sysfs support to read > temperature") Is this new interface described somewhere? > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c > @@ -6836,16 +6836,19 @@ static ssize_t bnxt_show_temp(struct device *dev, =2E.. > - return sprintf(buf, "%u\n", temp); > + if (len) > + return len; > + > + return sprintf(buf, "unknown\n"); > } We normally just do return -EIO (or other error code) in such cases. Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --8P1HSweYDcXXzwPJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCX1ffywAKCRAw5/Bqldv6 8sXIAJ9BSVZ2KXHsgjvUYGiaxLJKhy8r7ACfQV6tWW2ZhZfSs4Nji2Stw5c2MYM= =fB9W -----END PGP SIGNATURE----- --8P1HSweYDcXXzwPJ--