linux_dsm_epyc7002/drivers/hwmon
Henrik Rydberg 25f2bd7f5a hwmon: (applesmc) Always read until end of data
The crash reported and investigated in commit 5f4513 turned out to be
caused by a change to the read interface on newer (2012) SMCs.

Tests by Chris show that simply reading the data valid line is enough
for the problem to go away. Additional tests show that the newer SMCs
no longer wait for the number of requested bytes, but start sending
data right away.  Apparently the number of bytes to read is no longer
specified as before, but instead found out by reading until end of
data. Failure to read until end of data confuses the state machine,
which eventually causes the crash.

As a remedy, assuming bit0 is the read valid line, make sure there is
nothing more to read before leaving the read function.

Tested to resolve the original problem, and runtested on MBA3,1,
MBP4,1, MBP8,2, MBP10,1, MBP10,2. The patch seems to have no effect on
machines before 2012.

Tested-by: Chris Murphy <chris@cmurf.com>
Cc: stable@vger.kernel.org
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2013-10-09 09:48:55 -07:00
..
pmbus hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
ab8500.c
abituguru3.c hwmon: (abituguru3) Remove redundant platform_set_drvdata() 2013-06-21 10:05:03 -07:00
abituguru.c hwmon: fix error return code in abituguru_probe() 2013-05-13 08:07:13 -07:00
abx500.c hwmon: (abx500) Staticize abx500_temp_attributes 2013-07-14 16:24:25 -07:00
abx500.h
acpi_power_meter.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
ad7314.c
ad7414.c
ad7418.c
adcxx.c
adm1021.c hwmon: (adm1021) Do not create min sysfs attributes for LM84 2013-06-27 10:29:02 -07:00
adm1025.c
adm1026.c
adm1029.c
adm1031.c
adm9240.c
ads1015.c hwmon: (ads1015) Add support for ADS1115 2013-08-11 22:10:40 -07:00
ads7828.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
ads7871.c
adt7x10.c
adt7x10.h
adt7310.c
adt7410.c
adt7411.c
adt7462.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
adt7470.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
adt7475.c
amc6821.c hwmon: (amc6821) Remove redundant break 2013-09-11 13:01:40 -07:00
applesmc.c hwmon: (applesmc) Always read until end of data 2013-10-09 09:48:55 -07:00
asb100.c
asc7621.c
asus_atk0110.c
atxp1.c
coretemp.c hwmon: (coretemp) Atom CPUs don't support TjMax; no warning needed 2013-08-11 22:10:38 -07:00
da9052-hwmon.c
da9055-hwmon.c
dme1737.c
ds620.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
ds1621.c hwmon: (ds1621) Fix temperature rounding operations 2013-06-28 06:43:55 -07:00
emc6w201.c hwmon: (emc6w201) Do not declare enum variable 2013-09-06 14:05:43 +02:00
emc1403.c
emc2103.c hwmon: (emc2103) Fix return value 2013-09-11 13:01:31 -07:00
f71805f.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
f71882fg.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
f75375s.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
fam15h_power.c
fschmd.c
g760a.c
g762.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
gl518sm.c
gl520sm.c
gpio-fan.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
hih6130.c
htu21.c hwmon: (htu21) Add Measurement Specialties HTU21D support 2013-08-29 09:09:12 -07:00
hwmon-vid.c hwmon: (hwmon-vid) Add __maybe_unused attribute to dummy variable 2013-09-10 06:28:17 -07:00
hwmon.c
i5k_amb.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
ibmaem.c hwmon: (ibmaem) Fix return value 2013-09-11 13:01:32 -07:00
ibmpex.c hwmon: Change my email address. 2013-08-27 08:28:01 -07:00
iio_hwmon.c hwmon: (iio_hwmon) add alias table 2013-06-27 10:29:03 -07:00
ina2xx.c hwmon: (ina2xx) Remove casting the return value which is a void pointer 2013-09-10 06:28:31 -07:00
ina209.c
it87.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
jc42.c
jz4740-hwmon.c
k8temp.c
k10temp.c hwmon: (k10temp) remove unnecessary pci_set_drvdata() 2013-09-12 08:17:40 -07:00
Kconfig hwmon: (htu21) Add Measurement Specialties HTU21D support 2013-08-29 09:09:12 -07:00
lineage-pem.c
lm63.c hwmon: (lm63) Drop redundant safety on cache lifetime 2013-07-08 14:18:24 +02:00
lm70.c
lm73.c
lm75.c hwmon: (lm75) Add support for the Dallas/Maxim DS7505 2013-05-04 14:49:36 +02:00
lm75.h
lm77.c
lm78.c
lm80.c
lm83.c
lm85.c
lm87.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
lm90.c hwmon: (lm90) Drop redundant safety on cache lifetime 2013-07-08 14:18:24 +02:00
lm92.c
lm93.c
lm95234.c
lm95241.c
lm95245.c
ltc4151.c
ltc4215.c
ltc4245.c
ltc4261.c
Makefile hwmon: (htu21) Add Measurement Specialties HTU21D support 2013-08-29 09:09:12 -07:00
max197.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
max1111.c
max1619.c
max1668.c
max6639.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
max6642.c
max6650.c
max6697.c hwmon: (max6697) fix MAX6581 ideality 2013-08-03 07:04:50 -07:00
max16065.c
mc13783-adc.c
mcp3021.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
nct6775.c hwmon: (nct6775) Add support for hibernate 2013-08-11 22:10:39 -07:00
ntc_thermistor.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
pc87360.c
pc87427.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
pcf8591.c
s3c-hwmon.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
sch56xx-common.c
sch56xx-common.h
sch5627.c
sch5636.c
sht15.c New driver for HTU21D (humidity sensor) 2013-09-03 10:43:35 -07:00
sht21.c
sis5595.c
smm665.c
smsc47b397.c
smsc47m1.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
smsc47m192.c
thmc50.c
tmp102.c
tmp401.c hwmon: (tmp401) Drop redundant safety on cache lifetime 2013-05-19 08:19:29 -07:00
tmp421.c hwmon: (tmp421) Fix return value 2013-09-11 13:01:41 -07:00
twl4030-madc-hwmon.c
ultra45_env.c
vexpress.c
via686a.c
via-cputemp.c hwmon: delete __cpuinit usage from all hwmon files 2013-07-14 19:36:57 -04:00
vt1211.c
vt8231.c
w83l785ts.c
w83l786ng.c
w83627ehf.c hwmon: (w83627ehf) Add support for hibernate 2013-08-11 22:10:40 -07:00
w83627hf.c hwmon: use dev_get_platdata() 2013-08-11 22:10:39 -07:00
w83781d.c
w83791d.c
w83792d.c hwmon: (w83792d) Update module author 2013-09-06 14:05:42 +02:00
w83793.c
w83795.c
wm831x-hwmon.c
wm8350-hwmon.c