From 905d9397a05effde536c6c52c272bcd0bd3ccfd5 Mon Sep 17 00:00:00 2001 From: rpaulo Date: Tue, 30 Jun 2009 09:51:41 +0000 Subject: acpi_wmi_if: - Document different semantics for ACPI_WMI_PROVIDES_GUID_STRING_METHOD acpi_wmi.c: - Modify acpi_wmi_provides_guid_string_method to return absolut number of instances known for the given GUID. acpi_hp.c: - sysctl dev.acpi_hp.0.verbose to toggle debug output - A modification so this can deal with different array lengths when reading the CMI BIOS - now it works ok on HP Compaq nx7300 as well. - Change behaviour to query only max_instance-1 CMI BIOS instances, because all HPs seen so far are broken in that respect (or there is a fundamental misunderstanding on my side, possible as well). This way a disturbing ACPI Error Field exceeds Buffer message is avoided. - New bit to set on dev.acpi_hp.0.cmi_detail (0x8) to also query the highest guid instance of CMI bios acpi_hp.4: - Document dev.acpi_hp.0.verbose sysctl in man page - Document new bit for dev.acpi_hp.0.cmi_detail - Add a section to manpage about hardware that has been reported to work ok Submitted by: Michael Gmelin, freebsdusb at bindone.de Approved by: re (kib) MFC after: 2 weeks --- sys/dev/acpi_support/acpi_wmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/dev/acpi_support/acpi_wmi.c') diff --git a/sys/dev/acpi_support/acpi_wmi.c b/sys/dev/acpi_support/acpi_wmi.c index 7483293..07c2d71 100644 --- a/sys/dev/acpi_support/acpi_wmi.c +++ b/sys/dev/acpi_support/acpi_wmi.c @@ -326,11 +326,13 @@ acpi_wmi_detach(device_t dev) static int acpi_wmi_provides_guid_string_method(device_t dev, const char *guid_string) { + struct wmi_info *winfo; int ret; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_BEGIN(acpi_wmi); - ret = (acpi_wmi_lookup_wmi_info_by_guid_string(guid_string) == NULL)?0:1; + winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string); + ret = (winfo == NULL)?0:winfo->ginfo.max_instance+1; ACPI_SERIAL_END(acpi_wmi); return (ret); -- cgit v1.1