aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libata-eh.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 1a4397ae9e48..a5a8f8453061 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1714,7 +1714,7 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
1714 } else 1714 } else
1715 ata_port_printk(ap, KERN_ERR, 1715 ata_port_printk(ap, KERN_ERR,
1716 "prereset failed (errno=%d)\n", rc); 1716 "prereset failed (errno=%d)\n", rc);
1717 return rc; 1717 goto out;
1718 } 1718 }
1719 } 1719 }
1720 1720
@@ -1727,7 +1727,8 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
1727 /* prereset told us not to reset, bang classes and return */ 1727 /* prereset told us not to reset, bang classes and return */
1728 for (i = 0; i < ATA_MAX_DEVICES; i++) 1728 for (i = 0; i < ATA_MAX_DEVICES; i++)
1729 classes[i] = ATA_DEV_NONE; 1729 classes[i] = ATA_DEV_NONE;
1730 return 0; 1730 rc = 0;
1731 goto out;
1731 } 1732 }
1732 1733
1733 /* did prereset() screw up? if so, fix up to avoid oopsing */ 1734 /* did prereset() screw up? if so, fix up to avoid oopsing */
@@ -1763,7 +1764,8 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
1763 ata_port_printk(ap, KERN_ERR, 1764 ata_port_printk(ap, KERN_ERR,
1764 "follow-up softreset required " 1765 "follow-up softreset required "
1765 "but no softreset avaliable\n"); 1766 "but no softreset avaliable\n");
1766 return -EINVAL; 1767 rc = -EINVAL;
1768 goto out;
1767 } 1769 }
1768 1770
1769 ata_eh_about_to_do(ap, NULL, ATA_EH_RESET_MASK); 1771 ata_eh_about_to_do(ap, NULL, ATA_EH_RESET_MASK);
@@ -1773,7 +1775,8 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
1773 classes[0] == ATA_DEV_UNKNOWN) { 1775 classes[0] == ATA_DEV_UNKNOWN) {
1774 ata_port_printk(ap, KERN_ERR, 1776 ata_port_printk(ap, KERN_ERR,
1775 "classification failed\n"); 1777 "classification failed\n");
1776 return -EINVAL; 1778 rc = -EINVAL;
1779 goto out;
1777 } 1780 }
1778 } 1781 }
1779 1782
@@ -1818,7 +1821,9 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
1818 ata_eh_done(ap, NULL, ehc->i.action & ATA_EH_RESET_MASK); 1821 ata_eh_done(ap, NULL, ehc->i.action & ATA_EH_RESET_MASK);
1819 ehc->i.action |= ATA_EH_REVALIDATE; 1822 ehc->i.action |= ATA_EH_REVALIDATE;
1820 } 1823 }
1821 1824 out:
1825 /* clear hotplug flag */
1826 ehc->i.flags &= ~ATA_EHI_HOTPLUGGED;
1822 return rc; 1827 return rc;
1823} 1828}
1824 1829