Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2695e36616c3ece5e8e30666868fc7c90dc3fc75
Commit:     2695e36616c3ece5e8e30666868fc7c90dc3fc75
Parent:     8048307dbc3cfc30690b131e786fb57157fbdb11
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 10 13:41:23 2008 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Thu Jan 10 16:53:16 2008 -0500

    libata-pmp: propagate timeout to host link
    
    Timeout on downstream command may indicate transmission problem on
    host link.  Propagate timeouts to host link.
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/libata-eh.c |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index f0124a8..74269ed 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1733,11 +1733,15 @@ static void ata_eh_link_autopsy(struct ata_link *link)
                ehc->i.action &= ~ATA_EH_PERDEV_MASK;
        }
 
-       /* consider speeding down */
+       /* propagate timeout to host link */
+       if ((all_err_mask & AC_ERR_TIMEOUT) && !ata_is_host_link(link))
+               ap->link.eh_context.i.err_mask |= AC_ERR_TIMEOUT;
+
+       /* record error and consider speeding down */
        dev = ehc->i.dev;
-       if (!dev && ata_link_max_devices(link) == 1 &&
-           ata_dev_enabled(link->device))
-               dev = link->device;
+       if (!dev && ((ata_link_max_devices(link) == 1 &&
+                     ata_dev_enabled(link->device))))
+           dev = link->device;
 
        if (dev)
                ehc->i.action |= ata_eh_speed_down(dev, is_io, all_err_mask);
@@ -1759,8 +1763,14 @@ void ata_eh_autopsy(struct ata_port *ap)
 {
        struct ata_link *link;
 
-       __ata_port_for_each_link(link, ap)
+       ata_port_for_each_link(link, ap)
                ata_eh_link_autopsy(link);
+
+       /* Autopsy of fanout ports can affect host link autopsy.
+        * Perform host link autopsy last.
+        */
+       if (ap->nr_pmp_links)
+               ata_eh_link_autopsy(&ap->link);
 }
 
 /**
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to