Re: [PATCH]libata-acpi: add ACPI _PSx method

Jeff Garzik
2007-09-20T22:00:17Z

Shaohua Li wrote:
> ACPI spec (ver 3.0a, p289) requires IDE power on/off executes ACPI _PSx
> methods. As recently most PATA drivers use libata, this patch adds _PSx
> method support in libata. ACPI spec doesn't mention if SATA requires the
> same _PSx method, but executing _PSx for SATA should be ok I think.
>
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>

ahci and sata_sil24 directly power off components, so it seems quite
unwise for "modern" SATA controllers.

ISTR Tejun, when he cleaned up libata-acpi, finally figured out a good
way to distinguish ACPI's idea of "IDE" -- which sometimes includes the
legacy programming mode of SATA controllers, and a controller running a
modern programming mode.

Your best bet is to use a similar test when deciding when to execute
_PSx. Or, you could simply be conservative and only do it for PATA.

outside of those issues, the rest of the patch looks ok.