Bug 9660

Summary: /proc/acpi/wakeup set error
Product: ACPI Reporter: Yi Yang (yi.y.yang)
Component: OtherAssignee: Yi Yang (yi.y.yang)
Status: REJECTED DOCUMENTED    
Severity: normal CC: acpi-bugzilla, yi.y.yang
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.24-rc6 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Correct /proc/acpi/wakeup set error and append a new column to /proc/acpi/wakeup

Description Yi Yang 2007-12-29 00:02:55 UTC
Most recent kernel where this bug did not occur: None
Distribution: FC8
Hardware Environment: All
Software Environment: All
Problem Description:
The user can't get any information when echo an invalid value to
/proc/acpi/wakeup although it is failed, but the user can set
/proc/acpi/wakeup successfully if echo an value whose prefix is a
valid value for /proc/acpi/wakeup no matter what the suffix is.

/proc/acpi/wakeup is also case-sensitive, case-insensitive is better.

Steps to reproduce:

[root@localhost ~]# cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
C093      S5     disabled  pci:0000:00:1e.0
C0E8      S3     disabled  pci:0000:00:1d.0
C0EF      S3     disabled  pci:0000:00:1d.1
C0F0      S3     disabled  pci:0000:00:1d.2
C0F1      S3     disabled  pci:0000:00:1d.3
C0F2      S3     disabled  pci:0000:00:1d.7
C0F9      S0     disabled  pci:0000:00:1c.0
C21D      S0     disabled  pci:0000:08:00.0
C109      S5     disabled  pci:0000:00:1c.1
C228      S5     disabled  pci:0000:10:00.0
C10F      S5     disabled  pci:0000:00:1c.3
C229      S5     disabled
[root@localhost ~]# echo "xyzw" > /proc/acpi/wakeup
[root@localhost ~]# echo "C093xxxxxxxxx" > /proc/acpi/wakeup
[root@localhost ~]# cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
C093      S5     enabled   pci:0000:00:1e.0
C0E8      S3     disabled  pci:0000:00:1d.0
C0EF      S3     disabled  pci:0000:00:1d.1
C0F0      S3     disabled  pci:0000:00:1d.2
C0F1      S3     disabled  pci:0000:00:1d.3
C0F2      S3     disabled  pci:0000:00:1d.7
C0F9      S0     disabled  pci:0000:00:1c.0
C21D      S0     disabled  pci:0000:08:00.0
C109      S5     disabled  pci:0000:00:1c.1
C228      S5     disabled  pci:0000:10:00.0
C10F      S5     disabled  pci:0000:00:1c.3
C229      S5     disabled
[root@localhost ~]# echo "C093xxxxxxxxx" > /proc/acpi/wakeup
[root@localhost ~]# cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
C093      S5     disabled  pci:0000:00:1e.0
C0E8      S3     disabled  pci:0000:00:1d.0
C0EF      S3     disabled  pci:0000:00:1d.1
C0F0      S3     disabled  pci:0000:00:1d.2
C0F1      S3     disabled  pci:0000:00:1d.3
C0F2      S3     disabled  pci:0000:00:1d.7
C0F9      S0     disabled  pci:0000:00:1c.0
C21D      S0     disabled  pci:0000:08:00.0
C109      S5     disabled  pci:0000:00:1c.1
C228      S5     disabled  pci:0000:10:00.0
C10F      S5     disabled  pci:0000:00:1c.3
C229      S5     disabled
[root@localhost ~]# echo "c093" > /proc/acpi/wakeup
[root@localhost ~]# cat /proc/acpi/wakeup
Device  S-state   Status   Sysfs node
C093      S5     disabled  pci:0000:00:1e.0
C0E8      S3     disabled  pci:0000:00:1d.0
C0EF      S3     disabled  pci:0000:00:1d.1
C0F0      S3     disabled  pci:0000:00:1d.2
C0F1      S3     disabled  pci:0000:00:1d.3
C0F2      S3     disabled  pci:0000:00:1d.7
C0F9      S0     disabled  pci:0000:00:1c.0
C21D      S0     disabled  pci:0000:08:00.0
C109      S5     disabled  pci:0000:00:1c.1
C228      S5     disabled  pci:0000:10:00.0
C10F      S5     disabled  pci:0000:00:1c.3
C229      S5     disabled
[root@localhost ~]#
Comment 1 Yi Yang 2007-12-29 00:08:33 UTC
Created attachment 14220 [details]
Correct /proc/acpi/wakeup set error and append a new column to /proc/acpi/wakeup

This patch will fix this bug, please consider to apply, thanks.
Comment 2 Len Brown 2007-12-29 00:25:11 UTC
We are trying very hard to delete all of /proc/acpi,
so we have not allowed any new features to be added
or API changes in a long while.

That said, there is still no standard wakeup API
in the sysfs tree to replace /proc/acpi/wakeup,
so we'll be living with this for a while...

setting report to RESOLVED to reflect that there is a
patch available for review and testing.
(also, since the bug is being worked by Yi Yang, set owner)
Comment 3 Yi Yang 2008-01-09 23:29:57 UTC
This is review thread from community: http://lkml.org/lkml/2007/12/29/21, just for reference.
Comment 4 Yi Yang 2008-01-09 23:35:09 UTC
I didn't understand comments from Len, that means this patch has been rejected or it need some review from community? so i don't know what i can do for this.
Comment 5 Len Brown 2008-06-13 21:48:06 UTC
this is a feature enhancement to a feature that is being deleted
(/proc/acpi/wakeup) and thus this patch will not be applied.