diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-07 09:47:22 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:25 -0400 |
commit | 071f44b1d2c051641b62a3571223314737ccbe59 (patch) | |
tree | a07794c8109e5d82a78223ae0159eadbf862c463 /drivers/ata/libata-core.c | |
parent | 48515f6c006c2a9d7b624ee8ad068018c2d3fe0e (diff) |
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-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index b2d5d63fb6c9..3401248180c9 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -2278,7 +2278,7 @@ int ata_dev_configure(struct ata_device *dev) | |||
2278 | * changed notifications and ATAPI ANs. | 2278 | * changed notifications and ATAPI ANs. |
2279 | */ | 2279 | */ |
2280 | if ((ap->flags & ATA_FLAG_AN) && ata_id_has_atapi_AN(id) && | 2280 | if ((ap->flags & ATA_FLAG_AN) && ata_id_has_atapi_AN(id) && |
2281 | (!ap->nr_pmp_links || | 2281 | (!sata_pmp_attached(ap) || |
2282 | sata_scr_read(&ap->link, SCR_NOTIFICATION, &sntf) == 0)) { | 2282 | sata_scr_read(&ap->link, SCR_NOTIFICATION, &sntf) == 0)) { |
2283 | unsigned int err_mask; | 2283 | unsigned int err_mask; |
2284 | 2284 | ||
@@ -3623,7 +3623,7 @@ int sata_link_hardreset(struct ata_link *link, const unsigned long *timing, | |||
3623 | if (online) | 3623 | if (online) |
3624 | *online = true; | 3624 | *online = true; |
3625 | 3625 | ||
3626 | if ((link->ap->flags & ATA_FLAG_PMP) && ata_is_host_link(link)) { | 3626 | if (sata_pmp_supported(link->ap) && ata_is_host_link(link)) { |
3627 | /* If PMP is supported, we have to do follow-up SRST. | 3627 | /* If PMP is supported, we have to do follow-up SRST. |
3628 | * Some PMPs don't send D2H Reg FIS after hardreset if | 3628 | * Some PMPs don't send D2H Reg FIS after hardreset if |
3629 | * the first port is empty. Wait only for | 3629 | * the first port is empty. Wait only for |