]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ACPI / hotplug / PCI: Relax the checking of _STA return values
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 11 Feb 2014 10:42:37 +0000 (12:42 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 12 Feb 2014 11:45:57 +0000 (12:45 +0100)
commit7282059489868e0ed1b0d79765730c6b233a8399
tree16ec57ada67b9cef29dfe4bb9dc3d50f29cd74ef
parentb28a960c42fcd9cfc987441fa6d1c1a471f0f9ed
ACPI / hotplug / PCI: Relax the checking of _STA return values

The ACPI specification (ACPI 5.0A, Section 6.3.7) says:

 _STA may return bit 0 clear (not present) with bit 3 set (device is
 functional). This case is used to indicate a valid device for which
 no device driver should be loaded (for example, a bridge device.)
 Children of this device may be present and valid. OSPM should
 continue enumeration below a device whose _STA returns this bit
 combination.

Evidently, some BIOSes follow that and return 0x0A from _STA, which
causes problems to happen when they trigger bus check or device check
notifications for those devices too.  Namely, ACPIPHP thinks that they
are gone and may drop them, for example, if such a notification is
triggered during a resume from system suspend.

To fix that, modify ACPICA to regard devies as present and
functioning if _STA returns both the ACPI_STA_DEVICE_ENABLED
and ACPI_STA_DEVICE_FUNCTIONING bits set for them.

Reported-and-tested-by: Peter Wu <lekensteyn@gmail.com>
Cc: 3.12+ <stable@vger.kernel.org> # 3.12+
[rjw: Subject and changelog, minor code modifications]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pci/hotplug/acpiphp_glue.c