diff options
Diffstat (limited to 'drivers/ata/libata-eh.c')
-rw-r--r-- | drivers/ata/libata-eh.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index f0124a8d3134..21a81cd148e4 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 | /** |
@@ -2157,13 +2167,11 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2157 | if (ata_link_offline(link)) | 2167 | if (ata_link_offline(link)) |
2158 | continue; | 2168 | continue; |
2159 | 2169 | ||
2160 | /* apply class override and convert UNKNOWN to NONE */ | 2170 | /* apply class override */ |
2161 | if (lflags & ATA_LFLAG_ASSUME_ATA) | 2171 | if (lflags & ATA_LFLAG_ASSUME_ATA) |
2162 | classes[dev->devno] = ATA_DEV_ATA; | 2172 | classes[dev->devno] = ATA_DEV_ATA; |
2163 | else if (lflags & ATA_LFLAG_ASSUME_SEMB) | 2173 | else if (lflags & ATA_LFLAG_ASSUME_SEMB) |
2164 | classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */ | 2174 | classes[dev->devno] = ATA_DEV_SEMB_UNSUP; /* not yet */ |
2165 | else if (classes[dev->devno] == ATA_DEV_UNKNOWN) | ||
2166 | classes[dev->devno] = ATA_DEV_NONE; | ||
2167 | } | 2175 | } |
2168 | 2176 | ||
2169 | /* record current link speed */ | 2177 | /* record current link speed */ |