This reverts commit 2c81ce4c9c.
It caused several new troubles (eg suspend slowdown bisected down to
this patch by Pavel Machek), so just revert it for now.
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
begin_undock() is only called when triggered via a acpi notify handler
(pressing the undock button on the dock station), but complete_undock() is
always called after the eject. So if a undock is triggered through a sysfs
write, the flag DOCK_UNDOCKING has to be set for the dock station,
too. Otherwise this will freeze the system hard.
Signed-off-by: Holger Macht <hmacht@suse.de>
Acked-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
led_out is boolean, so there is no functional change here,
but apparently an extra mask with 1 caused some style checkers
to flag this as logic bug.
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Acer BIOS has a bug which is exposed when a dead battery is present.
The package template that is used to describe battery status is
over-written with sane values when the battery is live.
But when the batter is dead, a bogus reference in the template
is used. In this case, Linux returns a fault, when instead
it should simply return that it doesn't know the missing value.
http://bugzilla.kernel.org/show_bug.cgi?id=8573http://bugzilla.kernel.org/show_bug.cgi?id=10202
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
This essentially reverts commit 71fc47a9ad
("ACPI: basic initramfs DSDT override support"), because the code simply
isn't ready.
It did ugly things to the init sequence to populate the rootfs image
early, but that just ended up showing other problems with the whole
approach. The fact is, the VFS layer simply isn't initialized this
early, and the relevant ACPI code should either run much later, or this
shouldn't be done at all.
For 2.6.25, we'll just pick the latter option. We can revisit this
concept later if necessary.
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Tilman Schmidt <tilman@imap.cc>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Len Brown <len.brown@intel.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Markus Gaugusch <dsdt@gaugusch.at>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
as now required by the generic thermal I/F
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Since "ff_gbl_lock" has a length of 11 chars and is copied with sprintf
to char buffer[10], there is a problem. We need char buffer[12] because
of the closing zero byte.
Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
Signed-off-by: Len Brown <len.brown@intel.com>
And return an error to avoid NULL pointer access by the caller
Lin Ming's patch avoids corrupted mem access when
BIOS has invalid references included, the handle is now zero
instead of corrupted.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This patch works around incorrect _PRT (PCI interrupt routing)
information from firmware. This does not fix any regressions
and can wait for the next kernel release.
On the Medion MD9580-F laptop, the BIOS says the builtin RTL8139
NIC interrupt at 00:09.0[A] is connected to \_SB.PCI0.ISA.LNKA, but
it's really connected to \_SB.PCI0.ISA.LNKB. Before this patch,
the workaround was to use "pci=routeirq". More details at
http://bugzilla.kernel.org/show_bug.cgi?id=4773.
On the Dell OptiPlex GX1, the BIOS says the PCI slot interrupt
00:0d[A] is connected to LNKB, but it's really connected to LNKA.
Before this patch, the workaround was to use "pci=routeirq".
Pierre Ossman tested a previous version of this patch and confirmed
that it fixed the problem. More details at
http://bugzilla.kernel.org/show_bug.cgi?id=5044.
On the HP t5710 thin client, the BIOS says the builtin Radeon
video interrupt at 01:00[A] is connected to LNK1, but it's really
connected to LNK3. The previous workaround was to use a custom
DSDT. I tested this patch and verified that it fixes the problem.
More details at http://bugzilla.kernel.org/show_bug.cgi?id=10138.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
According to acpi spec , the objects of _BCL and _BCM are required if
integrated LCD is present and supports brightness level .The _BQC is
the optional object. So the _BQC object is ignored when the backlight device
is registered in ACPI video driver.
http://bugzilla.kernel.org/show_bug.cgi?id=10206
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Acer violate the ACPI-WMI spec by declaring some of their data blocks as
expensive, but with no corresponding WCxx method. There is already some
workaround code in to handle the initial WCxx call (we just ignore a
failure here); but we need to properly check if the second, "clean up",
WCxx call is actually needed or not, rather than fail simply because it
isn't there.
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
For consistency, use ACPI_DEBUG_PRINT instead of printk in
acpi_processor_hotplug_notify() for BUS_CHECK and DEVICE_CHECK events
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
This adds aliases to enable autoloading of toishiba_acpi. Two aliases are
defined - TOS6200 (for \\_SB_.VALD.GHCI) and TSO1900 (for \\_SB_.VALZ.GHCI).
This allows toishiba_acpi to be autoloaded on systems that provide those
devices.
Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Olivier Blin <blino@mandriva.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
On some Acer systems, the HW fails to clear the GPE source,
causing an interrupt storm.
So in EC interrupt mode, we count how many interrupts we
receive when waiting. If we get more than 5, we give
up on interrupt mode and revert to polling mode.
Also, for polling mode to work on Acers, we need
to insert a delay.
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Fix a memory overflow bug when copying
NULL internal package element object to external.
http://bugzilla.kernel.org/show_bug.cgi?id=10132
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
update cfaf3747ff
ACPI: ACPI Exception (): AE_NOT_FOUND, Processor Device is not present
is_processor_present is only called in the processor hotplug case,
and _STA method is mandatory at this time.
We should ignore those processors that are disabled in the MADT
and don't have _STA methods.
Because they will never exist in this system.
For the processors that don't physically exist but can be
hot plugged later, we still need this debug info.
http://bugzilla.kernel.org/show_bug.cgi?id=8570
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Make ACPI_CUSTOM_DSDT boolean config symbol a hidden and derived
value, based on the value of ACPI_CUSTOM_DSDT_FILE (string).
Only the latter is presented to the user as a config option.
This fixes problems with "make randconfig" setting ACPI_CUSTOM_DSDT
but leaving ACPI_CUSTOM_DSDT_FILE empty/blank.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>
When trying to get the acpi_handle from an acpi_buffer, pass
ACPI_ROOT_OBJECT instead of NULL to acpi_get_handle(). This fixes the
detection of dock dependent bays.
Signed-off-by: Holger Macht <hmacht@suse.de>
Tested-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Fix following warning:
WARNING: vmlinux.o(.text+0x550e85): Section mismatch in reference from the function acpi_pci_root_add() to the function .devinit.text:pci_acpi_scan_root()
acpi_pci_root_add uses a __devinit annotated function and
it looks like annotating it __devinit too is the correct fix.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Fix following warning:
WARNING: vmlinux.o(.text+0x55586c): Section mismatch in reference from the function acpi_processor_hotplug_notify() to the function .cpuinit.text:acpi_processor_start()
acpi_processor_hotplug_notify() may safely reference __cpuinit
stuff as it ids defined inside an ACPI_HOTPLUG_CPU block.
So annotate it __ref to silence the warning.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Len Brown <len.brown@intel.com>
CC drivers/acpi/executer/exregion.o
drivers/acpi/executer/exregion.c: In function
‘acpi_ex_pci_config_space_handler’:
drivers/acpi/executer/exregion.c:369: attention : passing argument 3 of
‘acpi_os_read_pci_configuration’ from incompatible pointer type
exposed by 10270d4838http://bugzilla.kernel.org/show_bug.cgi?id=9989
Signed-off-by: Ming Lin <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
TSC is used even on machines when CONFIG_X86_TSC is not set (X86_TSC
means _require_ TSC), but it is not properly disabled when it is
unusable, because ACPI code understood the config switch as "may use
TSC".
This actually fixes suspend problems on my x60.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
The function itself is defined just below, so this prototype is not really
useful.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
replace acpi_util_eval_error macro with static function.
Avoid these sparse warnings due to using buffer within the macro.
drivers/acpi/utils.c:273:3: warning: symbol 'buffer' shadows an earlier one
drivers/acpi/utils.c:259:21: originally declared here
drivers/acpi/utils.c:279:3: warning: symbol 'buffer' shadows an earlier one
drivers/acpi/utils.c:259:21: originally declared here
drivers/acpi/utils.c:368:3: warning: symbol 'buffer' shadows an earlier one
drivers/acpi/utils.c:348:21: originally declared here
drivers/acpi/utils.c:375:3: warning: symbol 'buffer' shadows an earlier one
drivers/acpi/utils.c:348:21: originally declared here
drivers/acpi/utils.c:382:3: warning: symbol 'buffer' shadows an earlier one
drivers/acpi/utils.c:348:21: originally declared here
drivers/acpi/utils.c:402:4: warning: symbol 'buffer' shadows an earlier one
drivers/acpi/utils.c:348:21: originally declared here
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Need to check whether thermal_cooling_device_register
returned ERROR or not.
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Need to extract errors using PTR_ERR macro and
process accordingly.thermal_cooling_device_register
returning NULL means that CONFIG_THERMAL=n and in that
case no need to create symbolic links.
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
OS should check whether the cooling device exists before it is unregistered.
If it doesn't exists, it is unnecessary to remove the sysfs link
and call the function of thermal_cooling_device_unregister.
http://bugzilla.kernel.org/show_bug.cgi?id=9982
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Tested-by : Dhaval Giani <dhaval@linux.vnet.ibm.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Need to extract errors using PTR_ERR macro and
process accordingly. thermal_cooling_device_register
returning NULL means that CONFIG_THERMAL=n and in that
case no need to create symbolic links.
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Fall back to ACPI_ROOT_HANDLE only in case of error.
ACPI: EC: EC description table is found, configuring boot EC
ACPI Error (evregion-0316): No handler for Region [ECOR] (ffff81007a651620) [EmbeddedControl] [20070126]
ACPI Error (exfldio-0289): Region EmbeddedControl(3) has no handler [20070126]
http://bugzilla.kernel.org/show_bug.cgi?id=9916
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Acer Extensa 5220 -- OSI(Linux) is a NOP
Dell OptiPlex 755 -- OSI(Linux) turns GUSB into a NOP
Dell PowerEdge 1950 -- OSI(Linux) is a NOP
Dell Precision 690 -- OSI(Linux) touches USB (skips GUSB)
FSC ESPRIMO Mobile V5505 -- OSI(Linux) is a NOP
Lenovo LENOVO3000 V100 -- OSI(Linux) is a NOP
Lenovo X61x -- OSI(Linux) enables Linux specific AML
Sony Vaio VGN-NR11S_S - OSI(Linux) is a NOP
Signed-off-by: Len Brown <len.brown@intel.com>
The _WAK global ACPI control method has to be called with the
argument representing the sleep state being exited. Make it happen.
Special thanks to Mirco Tischler <mt-ml@gmx.de> for reporting the
problem and debugging.
Reported-by: Mirco Tischler <mt-ml@gmx.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>