libata-link: update Power Management to handle PMP links
authorTejun Heo <htejun@gmail.com>
Mon, 6 Aug 2007 09:36:24 +0000 (18:36 +0900)
committerJeff Garzik <jeff@garzik.org>
Fri, 12 Oct 2007 18:55:32 +0000 (14:55 -0400)
Update Power Management to consider PMP links.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c

index 14f299278f1b4d6b8e9b54b3dbff2768f47edd1e..8a79b976f08aa031b40a4c61cea13e6f18e844f3 100644 (file)
@@ -5912,6 +5912,7 @@ static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg,
 
        for (i = 0; i < host->n_ports; i++) {
                struct ata_port *ap = host->ports[i];
+               struct ata_link *link;
 
                /* Previous resume operation might still be in
                 * progress.  Wait for PM_PENDING to clear.
@@ -5931,8 +5932,10 @@ static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg,
                }
 
                ap->pflags |= ATA_PFLAG_PM_PENDING;
-               ap->link.eh_info.action |= action;
-               ap->link.eh_info.flags |= ehi_flags;
+               __ata_port_for_each_link(link, ap) {
+                       link->eh_info.action |= action;
+                       link->eh_info.flags |= ehi_flags;
+               }
 
                ata_port_schedule_eh(ap);