On Tuesday 27 October 2009 12:36:37 am Shaohua Li wrote: > Add an API to execute _OSC. A lot of devices can have this method, so add a > generic API. > + out_obj = context->ret.pointer; > + if (out_obj->type != ACPI_TYPE_BUFFER) { > + printk(KERN_DEBUG "_OSC evaluation returned wrong type\n"); > + status = AE_TYPE; > + goto out_kfree; > + } > + /* Need to ignore the bit0 in result code */ > + errors = *((u32 *)out_obj->buffer.pointer) & ~(1 << 0); > + if (errors) { > + if (errors & OSC_REQUEST_ERROR) > + printk(KERN_DEBUG "_OSC request failed\n"); > + if (errors & OSC_INVALID_UUID_ERROR) > + printk(KERN_DEBUG "_OSC invalid UUID\n"); > + if (errors & OSC_INVALID_REVISION_ERROR) > + printk(KERN_DEBUG "_OSC invalid revision\n"); > + if (errors & OSC_CAPABILITIES_MASK_ERROR) { > + if (((u32 *)context->cap.pointer)[OSC_QUERY_TYPE] > + & OSC_QUERY_ENABLE) > + goto out_success; > + printk(KERN_DEBUG > + "Firmware did not grant requested _OSC control\n"); On all these printks, it would be very useful to have some indication of what the OS requested and which specific _OSC method we executed, e.g., an ACPI device name or a namespace path. Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html