Commit 2695e366 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik

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: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 8048307d
...@@ -1733,10 +1733,14 @@ static void ata_eh_link_autopsy(struct ata_link *link) ...@@ -1733,10 +1733,14 @@ static void ata_eh_link_autopsy(struct ata_link *link)
ehc->i.action &= ~ATA_EH_PERDEV_MASK; 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; dev = ehc->i.dev;
if (!dev && ata_link_max_devices(link) == 1 && if (!dev && ((ata_link_max_devices(link) == 1 &&
ata_dev_enabled(link->device)) ata_dev_enabled(link->device))))
dev = link->device; dev = link->device;
if (dev) if (dev)
...@@ -1759,8 +1763,14 @@ void ata_eh_autopsy(struct ata_port *ap) ...@@ -1759,8 +1763,14 @@ void ata_eh_autopsy(struct ata_port *ap)
{ {
struct ata_link *link; struct ata_link *link;
__ata_port_for_each_link(link, ap) ata_port_for_each_link(link, ap)
ata_eh_link_autopsy(link); 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);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment