]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
libata: reset once
authorDan Williams <dan.j.williams@intel.com>
Tue, 20 Mar 2012 17:58:35 +0000 (10:58 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 13 Apr 2012 06:20:50 +0000 (23:20 -0700)
Hotplug testing with libsas currently encounters a 55 second wait for
link recovery to give up.  In the case where the user trusts the
response time of their devices permit the recovery attempts to be
limited to one.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Documentation/kernel-parameters.txt
drivers/ata/libata-core.c
drivers/ata/libata-eh.c
include/linux/libata.h

index 033d4e69b43b107d9780ec959105823e6cefd07c..0154d16586799ec504686ad89630c9b8995d320f 100644 (file)
@@ -1306,6 +1306,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
                        * nohrst, nosrst, norst: suppress hard, soft
                           and both resets.
 
+                       * rstonce: only attempt one reset during
+                         hot-unplug link recovery
+
                        * dump_id: dump IDENTIFY data.
 
                        If there are multiple matching configurations changing
index bd79c8b6edacc092317eef1be7db85e1b68cf0cf..171597f5ddf48f1c573a4c9f61d6681ebaa6f9a2 100644 (file)
@@ -6381,6 +6381,7 @@ static int __init ata_parse_force_one(char **cur,
                { "nohrst",     .lflags         = ATA_LFLAG_NO_HRST },
                { "nosrst",     .lflags         = ATA_LFLAG_NO_SRST },
                { "norst",      .lflags         = ATA_LFLAG_NO_HRST | ATA_LFLAG_NO_SRST },
+               { "rstonce",    .lflags         = ATA_LFLAG_RST_ONCE },
        };
        char *start = *cur, *p = *cur;
        char *id, *val, *endp;
index 4f12f637d423d24b5fd81ad83b91835a294a9745..b02748b79fda054628d4a1a17c9358505ee59e04 100644 (file)
@@ -2605,6 +2605,8 @@ int ata_eh_reset(struct ata_link *link, int classify,
         */
        while (ata_eh_reset_timeouts[max_tries] != ULONG_MAX)
                max_tries++;
+       if (link->flags & ATA_LFLAG_RST_ONCE)
+               max_tries = 1;
        if (link->flags & ATA_LFLAG_NO_HRST)
                hardreset = NULL;
        if (link->flags & ATA_LFLAG_NO_SRST)
index a868bbc8e170bf4a506e4cf052202823bf7be84c..0a3c99adb9666bf27fa83e1538b63b2c5bd14399 100644 (file)
@@ -182,6 +182,7 @@ enum {
        ATA_LFLAG_DISABLED      = (1 << 6), /* link is disabled */
        ATA_LFLAG_SW_ACTIVITY   = (1 << 7), /* keep activity stats */
        ATA_LFLAG_NO_LPM        = (1 << 8), /* disable LPM on this link */
+       ATA_LFLAG_RST_ONCE      = (1 << 9), /* limit recovery to one reset */
 
        /* struct ata_port flags */
        ATA_FLAG_SLAVE_POSS     = (1 << 0), /* host supports slave dev */