Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fccb6ea5c240b9f29baa55448488fd6aee49f5a5
Commit:     fccb6ea5c240b9f29baa55448488fd6aee49f5a5
Parent:     f8f1e1cc0cd4d75c73e9a55a0ede8958e4fa14f1
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 16 14:29:41 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Jul 20 08:26:25 2007 -0400

    libata: clear HOTPLUG flag after a reset
    
    ATA_EHI_HOTPLUGGED is a hint for reset functions indicating the the
    port might have gone through hotplug/unplug just before entering EH.
    Reset functions modify their behaviors a bit to handle the situation
    better - e.g. using longer debouncing delay.
    
    Currently, once HOTPLUG is set, it isn't cleared till the end of EH.
    This is unnecessary and makes EH take longer.  Clear the HOTPLUGGED
    flag after a reset try (successful or not).
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/libata-eh.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 1a4397a..a5a8f84 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,
                        } else
                                ata_port_printk(ap, KERN_ERR,
                                        "prereset failed (errno=%d)\n", rc);
-                       return rc;
+                       goto out;
                }
        }
 
@@ -1727,7 +1727,8 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
                /* prereset told us not to reset, bang classes and return */
                for (i = 0; i < ATA_MAX_DEVICES; i++)
                        classes[i] = ATA_DEV_NONE;
-               return 0;
+               rc = 0;
+               goto out;
        }
 
        /* 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,
                        ata_port_printk(ap, KERN_ERR,
                                        "follow-up softreset required "
                                        "but no softreset avaliable\n");
-                       return -EINVAL;
+                       rc = -EINVAL;
+                       goto out;
                }
 
                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,
                    classes[0] == ATA_DEV_UNKNOWN) {
                        ata_port_printk(ap, KERN_ERR,
                                        "classification failed\n");
-                       return -EINVAL;
+                       rc = -EINVAL;
+                       goto out;
                }
        }
 
@@ -1818,7 +1821,9 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
                ata_eh_done(ap, NULL, ehc->i.action & ATA_EH_RESET_MASK);
                ehc->i.action |= ATA_EH_REVALIDATE;
        }
-
+ out:
+       /* clear hotplug flag */
+       ehc->i.flags &= ~ATA_EHI_HOTPLUGGED;
        return rc;
 }
 
-
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