status = acpi_evaluate_object(handle, "RSSS", NULL, NULL); if (ACPI_FAILURE(status)) {
pr_err("Unable to reset the HDD protection\n"); return -EIO;
}
return 0;
}
staticint toshiba_haps_protection_level(acpi_handle handle, int level)
{
acpi_status status;
status = acpi_execute_simple_method(handle, "PTLV", level); if (ACPI_FAILURE(status)) {
pr_err("Error while setting the protection level\n"); return -EIO;
}
pr_debug("HDD protection level set to: %d\n", level);
/* * A non existent device as well as having (only) * Solid State Drives can cause the call to fail.
*/
status = acpi_evaluate_integer(handle, "_STA", NULL, &hdd_present); if (ACPI_FAILURE(status)) {
pr_err("ACPI call to query HDD protection failed\n"); return 0;
}
if (!hdd_present) {
pr_info("HDD protection not available or using SSD\n"); return 0;
}
return 1;
}
staticint toshiba_haps_add(struct acpi_device *acpi_dev)
{ struct toshiba_haps_dev *haps; int ret;
if (toshiba_haps) return -EBUSY;
if (!toshiba_haps_available(acpi_dev->handle)) return -ENODEV;
pr_info("Toshiba HDD Active Protection Sensor device\n");
haps = kzalloc(sizeof(struct toshiba_haps_dev), GFP_KERNEL); if (!haps) return -ENOMEM;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.