Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/scsipi bump command timeout to 5 minutes. several



details:   https://anonhg.NetBSD.org/src/rev/d33ecec1af98
branches:  trunk
changeset: 789162:d33ecec1af98
user:      kardel <kardel%NetBSD.org@localhost>
date:      Fri Aug 09 19:58:44 2013 +0000

description:
bump command timeout to 5 minutes. several
types of changers (Overland PowerLoader, Dell
PowerVault) have been exceeding the 100 sec
limit aborting a perfectly (slowly) progressing
operation.

diffstat:

 sys/dev/scsipi/ch.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (72 lines):

diff -r 15f15b1cac75 -r d33ecec1af98 sys/dev/scsipi/ch.c
--- a/sys/dev/scsipi/ch.c       Fri Aug 09 19:51:29 2013 +0000
+++ b/sys/dev/scsipi/ch.c       Fri Aug 09 19:58:44 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ch.c,v 1.87 2012/10/27 17:18:38 chs Exp $      */
+/*     $NetBSD: ch.c,v 1.88 2013/08/09 19:58:44 kardel Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.87 2012/10/27 17:18:38 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ch.c,v 1.88 2013/08/09 19:58:44 kardel Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -56,6 +56,8 @@
 #include <dev/scsipi/scsiconf.h>
 
 #define CHRETRIES      2
+#define CHTIMEOUT      (5 * 60 * 1000)
+
 #define CHUNIT(x)      (minor((x)))
 
 struct ch_softc {
@@ -612,7 +614,7 @@
         * Send command to changer.
         */
        return (scsipi_command(sc->sc_periph, (void *)&cmd, sizeof(cmd), 0, 0,
-           CHRETRIES, 100000, NULL, 0));
+           CHRETRIES, CHTIMEOUT, NULL, 0));
 }
 
 static int
@@ -666,7 +668,7 @@
         * Send command to changer.
         */
        return (scsipi_command(sc->sc_periph, (void *)&cmd, sizeof(cmd), 0, 0,
-           CHRETRIES, 100000, NULL, 0));
+           CHRETRIES, CHTIMEOUT, NULL, 0));
 }
 
 static int
@@ -702,7 +704,7 @@
         * Send command to changer.
         */
        return (scsipi_command(sc->sc_periph, (void *)&cmd, sizeof(cmd), 0, 0,
-           CHRETRIES, 100000, NULL, 0));
+           CHRETRIES, CHTIMEOUT, NULL, 0));
 }
 
 /*
@@ -1041,7 +1043,7 @@
         */
        return (scsipi_command(sc->sc_periph, (void *)&cmd, sizeof(cmd),
            (void *)data, datalen,
-           CHRETRIES, 100000, NULL, scsiflags | XS_CTL_DATA_IN));
+           CHRETRIES, CHTIMEOUT, NULL, scsiflags | XS_CTL_DATA_IN));
 }
 
 static int
@@ -1105,7 +1107,7 @@
         * Send command to changer.
         */
        return (scsipi_command(sc->sc_periph, (void *)&cmd, sizeof(cmd),
-           (void *)data, datalen, CHRETRIES, 100000, NULL,
+           (void *)data, datalen, CHRETRIES, CHTIMEOUT, NULL,
            datalen ? XS_CTL_DATA_OUT : 0));
 }
 



Home | Main Index | Thread Index | Old Index