You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
2.3 KiB
61 lines
2.3 KiB
From 395e73945b1175ddcc414d092a049d9bf7ef5691 Mon Sep 17 00:00:00 2001
|
|
From: Igor Russkikh <irusskik@redhat.com>
|
|
Date: Fri, 6 Nov 2020 18:36:31 -0500
|
|
Subject: [PATCH 014/139] [netdrv] net: aquantia: temperature retrieval fix
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Message-id: <1604687916-15087-15-git-send-email-irusskik@redhat.com>
|
|
Patchwork-id: 338441
|
|
Patchwork-instance: patchwork
|
|
O-Subject: [RHEL8.4 BZ 1857861 014/139] net: aquantia: temperature retrieval fix
|
|
Bugzilla: 1857861
|
|
RH-Acked-by: David Arcari <darcari@redhat.com>
|
|
RH-Acked-by: John Linville <linville@redhat.com>
|
|
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
|
|
|
Bugzilla: http://bugzilla.redhat.com/1857861
|
|
|
|
commit 06b0d7fe7e5ff3ba4c7e265ef41135e8bcc232bb
|
|
Author: Igor Russkikh <Igor.Russkikh@aquantia.com>
|
|
Date: Fri Oct 11 13:45:19 2019 +0000
|
|
|
|
net: aquantia: temperature retrieval fix
|
|
|
|
Chip temperature is a two byte word, colocated internally with cable
|
|
length data. We do all readouts from HW memory by dwords, thus
|
|
we should clear extra high bytes, otherwise temperature output
|
|
gets weird as soon as we attach a cable to the NIC.
|
|
|
|
Fixes: 8f8940118654 ("net: aquantia: add infrastructure to readout chip temperature")
|
|
Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>
|
|
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
|
|
Signed-off-by: Igor Russkikh <irusskik@redhat.com>
|
|
|
|
Cc: David Arcari <darcari@redhat.com>
|
|
Cc: Igor Russkikh <irusskik@redhat.com>
|
|
Signed-off-by: Jan Stancek <jstancek@redhat.com>
|
|
---
|
|
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils_fw2x.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils_fw2x.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils_fw2x.c
|
|
index da726489e3c8..7bc51f8d6f2f 100644
|
|
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils_fw2x.c
|
|
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils_fw2x.c
|
|
@@ -337,7 +337,7 @@ static int aq_fw2x_get_phy_temp(struct aq_hw_s *self, int *temp)
|
|
/* Convert PHY temperature from 1/256 degree Celsius
|
|
* to 1/1000 degree Celsius.
|
|
*/
|
|
- *temp = temp_res * 1000 / 256;
|
|
+ *temp = (temp_res & 0xFFFF) * 1000 / 256;
|
|
|
|
return 0;
|
|
}
|
|
--
|
|
2.13.6
|
|
|