On 9/24/19 4:32 PM, Igor Russkikh wrote:
We've recently found out that as well, could you try applying the following 
patch:

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..08b026b41571 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;
  }

Well, what do you know!

eth0-pci-0600
Adapter: PCI adapter
PHY Temperature:  +63.5°C

This looks like it aligns with reality. :-)

Funny thing is that this value gets readout from HW memory, all the readouts are
done by full dwords, but the value is only word width. High word of that dword

I suspected upper-word-garbage but of course don't know internals.

is estimated cable length. On short cables we use it is often zero ;)

:D

When you send the proper patch feel free to add:
Tested-by: Holger Hoffstätte <hol...@applied-asynchrony.com>

Thanks again for the quick help!

Holger

Reply via email to