libata: implement PMP helpers
Implement helpers to test whether PMP is supported, attached and determine pmp number to use when issuing SRST to a link. While at it, move ata_is_host_link() so that it's together with the two new PMP helpers. This change simplifies LLDs and helps making PMP support optional. Signed-off-by: Tejun Heo <htejun@gmail.com>
This commit is contained in:
@@ -77,7 +77,7 @@ void ata_acpi_associate_sata_port(struct ata_port *ap)
|
||||
{
|
||||
WARN_ON(!(ap->flags & ATA_FLAG_ACPI_SATA));
|
||||
|
||||
if (!ap->nr_pmp_links) {
|
||||
if (!sata_pmp_attached(ap)) {
|
||||
acpi_integer adr = SATA_ADR(ap->port_no, NO_PORT_MULT);
|
||||
|
||||
ap->link.device->acpi_handle =
|
||||
|
Reference in New Issue
Block a user