diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-07 22:47:22 +0900 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:25 -0400 |
commit | 071f44b1d2c051641b62a3571223314737ccbe59 (patch) | |
tree | a07794c8109e5d82a78223ae0159eadbf862c463 /drivers/ata/libata-pmp.c | |
parent | 48515f6c006c2a9d7b624ee8ad068018c2d3fe0e (diff) | |
download | op-kernel-dev-071f44b1d2c051641b62a3571223314737ccbe59.zip op-kernel-dev-071f44b1d2c051641b62a3571223314737ccbe59.tar.gz |
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>
Diffstat (limited to 'drivers/ata/libata-pmp.c')
-rw-r--r-- | drivers/ata/libata-pmp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c index bb10c06..ff1822a 100644 --- a/drivers/ata/libata-pmp.c +++ b/drivers/ata/libata-pmp.c @@ -411,7 +411,7 @@ int sata_pmp_attach(struct ata_device *dev) int rc; /* is it hanging off the right place? */ - if (!(ap->flags & ATA_FLAG_PMP)) { + if (!sata_pmp_supported(ap)) { ata_dev_printk(dev, KERN_ERR, "host does not support Port Multiplier\n"); return -EINVAL; @@ -876,7 +876,7 @@ static int sata_pmp_eh_recover(struct ata_port *ap) retry: /* PMP attached? */ - if (!ap->nr_pmp_links) { + if (!sata_pmp_attached(ap)) { rc = ata_eh_recover(ap, ops->prereset, ops->softreset, ops->hardreset, ops->postreset, NULL); if (rc) { @@ -983,7 +983,7 @@ static int sata_pmp_eh_recover(struct ata_port *ap) if (ap->pflags & ATA_PFLAG_UNLOADING) return rc; - if (!ap->nr_pmp_links) + if (!sata_pmp_attached(ap)) goto retry; if (--pmp_tries) { |