]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: fix HWRM error when querying VF temperature
authorEdwin Peer <edwin.peer@broadcom.com>
Wed, 26 Aug 2020 05:08:37 +0000 (01:08 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Aug 2020 14:19:03 +0000 (07:19 -0700)
commitd826d0da2ca7baf6bb3619a4e4ee3c9d9ab72d8d
tree46eaf5d8c81cc4ec274b7a7a2edfc99871ea31ad
parent5541df70f7cdbcefa7beaa9be0f046e7eeeae1d7
bnxt_en: fix HWRM error when querying VF temperature

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.

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.

Fixes: 24c001ccf812 ("bnxt_en: Add hwmon sysfs support to read temperature")
Cc: Marc Smith <msmith626@gmail.com>
Reported-by: Marc Smith <msmith626@gmail.com>
Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c