tg3: Fix temperature reporting
authorJean Delvare <jdelvare@suse.de>
Tue, 1 Sep 2015 16:07:41 +0000 (18:07 +0200)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:10:02 +0000 (13:10 +0000)
commit94946b223bc70afa6ca2e549ec3bac15729de740
tree3fb21be9a7790eae80f103a10a0c914eae9ce95c
parente5297bac54cbc112023f0accdfab27ee302309d6
tg3: Fix temperature reporting

commit d3d11fe08ccc9bff174fc958722b5661f0932486 upstream.

The temperature registers appear to report values in degrees Celsius
while the hwmon API mandates values to be exposed in millidegrees
Celsius. Do the conversion so that the values reported by "sensors"
are correct.

Fixes: aed93e0bf493 ("tg3: Add hwmon support for temperature")
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Prashant Sreedharan <prashant@broadcom.com>
Cc: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/tg3.c