Bug 14429 - many "applesmc: wait status failed: 5 != 0" in dmesg
Summary: many "applesmc: wait status failed: 5 != 0" in dmesg
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Hardware Monitoring (show other bugs)
Hardware: All Linux
: P1 low
Assignee: Nicolas Boichat
URL: http://bugs.archlinux.org/task/16049
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-17 13:51 UTC by Jan Rüegg
Modified: 2010-11-29 14:26 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.31
Subsystem:
Regression: No
Bisected commit-id:


Attachments
[PATCH]fix-input-output-error-with-iMac9-1-and-MacBookPro2,2 (2.89 KB, patch)
2010-04-08 02:37 UTC, Justin P. Mattock
Details | Diff
imac8,1 (6.89 KB, text/plain)
2010-09-16 21:33 UTC, Коренберг Марк
Details

Description Jan Rüegg 2009-10-17 13:51:52 UTC
http://bugs.archlinux.org/task/16049 said to post upstream...

So, I still get this messages on a 2.6.31 kernel (64-bit archlinux) when doing:

jan ~ $  sudo cat /sys/devices/platform/applesmc.768/temp12_input 
cat: /sys/devices/platform/applesmc.768/temp12_input: Input/output error
jan ~ $  sudo cat /sys/devices/platform/applesmc.768/temp1_input 
cat: /sys/devices/platform/applesmc.768/temp1_input: Input/output error

sensors gives:

applesmc-isa-0300
Adapter: ISA adapter
Left side  :4352 RPM  (min = 2000 RPM)
Right side :4368 RPM  (min = 2000 RPM)
ERROR: Can't get value of subfeature temp1_input: I/O error
temp1:        +0.0°C                                    
temp2:       +36.0°C                                    
temp3:       +62.8°C                                    
temp4:       +54.0°C                                    
temp5:       +57.5°C                                    
temp6:       +55.8°C                                    
temp7:       +59.2°C                                    
temp8:       +56.0°C                                    
temp9:       +45.8°C                                    
temp10:      +48.0°C                                    
temp11:      +38.0°C                                    
ERROR: Can't get value of subfeature temp12_input: I/O error
temp12:       +0.0°C    

And for each I/O error I get exactly one "applesmc: wait status failed: 5 != 0" in the kernel.log, as described here:

https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/102270

in comment 14.

I using a Macbook Pro 2,2, by the way.
Comment 1 Andrew Morton 2009-11-03 06:38:40 UTC
Reassigned to Nicolas.
Comment 2 Justin P. Mattock 2010-04-06 16:12:21 UTC
I noticed the same thing.. with the iMac9,1 and the MacBookPro2,2

I sent a patch to kernel.org, and have not received any info on the status.
of these patches, here's the thread:
http://lkml.org/lkml/2010/4/5/152
(give them a try and see)

right now both machines report the temperature info without the input/output
error with 
watch cat /sys/devices/platform/applesmc.768/temp*_input
Comment 3 Justin P. Mattock 2010-04-08 02:37:17 UTC
Created attachment 25909 [details]
[PATCH]fix-input-output-error-with-iMac9-1-and-MacBookPro2,2

This patch adds temperature sensors for the iMac9,1 and
the MacBookPro2,2 resulting in fixing the input/output error
when issuing the command:
watch cat /sys/devices/platform/applesmc.768/temp*_input
on both of the machines.
Comment 4 Коренберг Марк 2010-09-16 20:27:03 UTC
On my system (iMac 8,1):

applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 4 != 5
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 4 != 0
applesmc: wait status failed: 4 != 0
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 5 != 1
applesmc: wait status failed: 4 != 0
applesmc: wait status failed: 4 != 0
applesmc: wait status failed: 5 != 1

and gnome system monitor sometimes report error.

root@imac:~# uname -a
Linux imac 2.6.32-24-generic-pae #42-Ubuntu SMP Fri Aug 20 15:37:22 UTC 2010 i686 GNU/Linux
Comment 5 Justin P. Mattock 2010-09-16 21:07:41 UTC
theres an entry for the imac8,1 in applesmc.c, wondering if 2.6.32 has that entry in there?,if not then maybe upgrade to the current HEAD to see if this corrects the issue.. also make sure that the temp sensors are correct i.e. my macbookpro was wrong, after making the fix, I dont get input/output errors when using cat for the temp sensors. here is how to get them(example):
 http://mactel-linux.sourceforge.net/wiki/AppleSMC
Comment 6 Коренберг Марк 2010-09-16 21:28:38 UTC
mmarkk@imac:~$ sensors
applesmc-isa-0300
Adapter: ISA adapter
ODD :        699 RPM  (min =  700 RPM)
HDD :       1200 RPM  (min = 1200 RPM)
CPU :       1199 RPM  (min = 1200 RPM)
temp1:       +24.5°C                                    
temp2:       +43.0°C                                    
temp3:       +43.2°C                                    
temp4:       +46.0°C                                    
temp5:       +61.5°C                                    
temp6:       +53.0°C                                    
temp7:       +53.0°C                                    
temp8:       +49.5°C                                    
temp9:       +50.5°C                                    
temp10:      +43.5°C                                    
temp11:      +50.5°C                                    
temp12:      +47.2°C                                    
temp13:      +72.2°C                                    

coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +50.0°C  (high = +105.0°C, crit = +105.0°C)  

coretemp-isa-0001
Adapter: ISA adapter
Core 1:      +48.0°C  (high = +105.0°C, crit = +105.0°C)  

mmarkk@imac:~$ 

It appear that all sensors are OK. How I can help diagnose problem? (I'll try ubuntu 10.10 soon)
Comment 7 Коренберг Марк 2010-09-16 21:33:18 UTC
Created attachment 30302 [details]
imac8,1

imac8,1
Comment 8 Justin P. Mattock 2010-09-16 21:57:54 UTC
good the temp sensors are correct... as for the problem does this still happen with the current git HEAD?

as for the code Im seeing:
/*
229  * __wait_status - Wait up to 32ms for the status port to get a certain value
230  * (masked with 0x0f), returning zero if the value is obtained.  Callers must
231  * hold applesmc_lock.
232  */
233 static int __wait_status(u8 val)
234 {

in applecms.c
Comment 10 Justin P. Mattock 2010-11-29 14:26:27 UTC
tough to say if this was the real fix for this..(Im not seeing anything like that but will keep an eye out for anything)

Note You need to log in before you can comment on or make changes to this bug.