OpenCloudOS-Kernel/drivers/firmware
Rafael J. Wysocki d7b1956fed DMI: Introduce dmi_first_match to make the interface more flexible
Some notebooks from HP have the problem that their BIOSes attempt to
spin down hard drives before entering ACPI system states S4 and S5.
This leads to a yo-yo effect during system power-off shutdown and the
last phase of hibernation when the disk is first spun down by the
kernel and then almost immediately turned on and off by the BIOS.
This, in turn, may result in shortening the disk's life times.

To prevent this from happening we can blacklist the affected systems
using DMI information.  However, only the on-board controlles should
be blacklisted and their PCI slot numbers can be used for this
purpose.  Unfortunately the existing interface for checking DMI
information of the system is not very convenient for this purpose,
because to use it, we would have to define special callback functions
or create a separate struct dmi_system_id table for each blacklisted
system.

To overcome this difficulty introduce a new function
dmi_first_match() returning a pointer to the first entry in an array
of struct dmi_system_id elements that matches the system DMI
information.  Then, we can use this pointer to access the entry's
.driver_data field containing the additional information, such as
the PCI slot number, allowing us to do the desired blacklisting.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-27 02:15:47 -05:00
..
Kconfig sysfs: add /sys/firmware/memmap 2008-07-08 17:55:41 +02:00
Makefile sysfs: add /sys/firmware/memmap 2008-07-08 17:55:41 +02:00
dcdbas.c dcdbas: export functionality for use in other drivers 2009-01-08 08:31:12 -08:00
dcdbas.h dcdbas: export functionality for use in other drivers 2009-01-08 08:31:12 -08:00
dell_rbu.c dell_rbu: use scnprintf() instead of less secure sprintf() 2009-01-17 14:27:18 -08:00
dmi-id.c dmi: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:42 -08:00
dmi_scan.c DMI: Introduce dmi_first_match to make the interface more flexible 2009-01-27 02:15:47 -05:00
edd.c edd: fix incorrect return of 1 from module_init 2008-06-06 11:29:09 -07:00
efivars.c Kobject: convert drivers/* from kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
iscsi_ibft.c drivers: replace NIPQUAD() 2008-10-31 00:56:00 -07:00
iscsi_ibft_find.c iscsi_ibft_find: fix modpost warning 2008-07-30 09:41:44 -07:00
memmap.c Make various things static 2009-01-08 08:31:15 -08:00
pcdp.c serial: convert early_uart to earlycon for 8250 2007-07-16 09:05:35 -07:00
pcdp.h [IA64] Make PCDP work again. 2005-07-13 11:56:32 -07:00