aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-01-09 23:41:23 -0500
committerJeff Garzik <jeff@garzik.org>2008-01-10 16:53:16 -0500
commit2695e36616c3ece5e8e30666868fc7c90dc3fc75 (patch)
tree5e37a45c7dbcf70f7947e10180f10515d716b49f /drivers/ata
parent8048307dbc3cfc30690b131e786fb57157fbdb11 (diff)
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 <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-eh.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index f0124a8d3134..74269ed22fb9 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)
1733 ehc->i.action &= ~ATA_EH_PERDEV_MASK; 1733 ehc->i.action &= ~ATA_EH_PERDEV_MASK;
1734 } 1734 }
1735 1735
1736 /* consider speeding down */ 1736 /* propagate timeout to host link */
1737 if ((all_err_mask & AC_ERR_TIMEOUT) && !ata_is_host_link(link))
1738 ap->link.eh_context.i.err_mask |= AC_ERR_TIMEOUT;
1739
1740 /* record error and consider speeding down */
1737 dev = ehc->i.dev; 1741 dev = ehc->i.dev;
1738 if (!dev && ata_link_max_devices(link) == 1 && 1742 if (!dev && ((ata_link_max_devices(link) == 1 &&
1739 ata_dev_enabled(link->device)) 1743 ata_dev_enabled(link->device))))
1740 dev = link->device; 1744 dev = link->device;
1741 1745
1742 if (dev) 1746 if (dev)
1743 ehc->i.action |= ata_eh_speed_down(dev, is_io, all_err_mask); 1747 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)
1759{ 1763{
1760 struct ata_link *link; 1764 struct ata_link *link;
1761 1765
1762 __ata_port_for_each_link(link, ap) 1766 ata_port_for_each_link(link, ap)
1763 ata_eh_link_autopsy(link); 1767 ata_eh_link_autopsy(link);
1768
1769 /* Autopsy of fanout ports can affect host link autopsy.
1770 * Perform host link autopsy last.
1771 */
1772 if (ap->nr_pmp_links)
1773 ata_eh_link_autopsy(&ap->link);
1764} 1774}
1765 1775
1766/** 1776/**