Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/i2o Set sc_framesize to a reasonable value early on ...



details:   https://anonhg.NetBSD.org/src/rev/6345a2a5dd6f
branches:  trunk
changeset: 520091:6345a2a5dd6f
user:      ad <ad%NetBSD.org@localhost>
date:      Wed Jan 02 19:04:17 2002 +0000

description:
Set sc_framesize to a reasonable value early on so that DEBUG code
doesn't choke before we discern the real value.

diffstat:

 sys/dev/i2o/iop.c |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r eac54429fa6e -r 6345a2a5dd6f sys/dev/i2o/iop.c
--- a/sys/dev/i2o/iop.c Wed Jan 02 18:33:06 2002 +0000
+++ b/sys/dev/i2o/iop.c Wed Jan 02 19:04:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iop.c,v 1.20 2001/11/13 12:24:58 lukem Exp $   */
+/*     $NetBSD: iop.c,v 1.21 2002/01/02 19:04:17 ad Exp $      */
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.20 2001/11/13 12:24:58 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.21 2002/01/02 19:04:17 ad Exp $");
 
 #include "opt_i2o.h"
 #include "iop.h"
@@ -314,6 +314,11 @@
        }
        state++;
 
+#ifdef I2ODEBUG
+       /* So that our debug checks don't choke. */
+       sc->sc_framesize = 128;
+#endif
+
        /* Reset the adapter and request status. */
        if ((rv = iop_reset(sc)) != 0) {
                printf("%s: not responding (reset)\n", sc->sc_dv.dv_xname);
@@ -943,9 +948,10 @@
                        tsleep(iop_status_get, PWAIT, "iopstat", hz / 10);
        }
 
-       if (st->syncbyte != 0xff)
+       if (st->syncbyte != 0xff) {
+               printf("%s: STATUS_GET timed out\n", sc->sc_dv.dv_xname);
                rv = EIO;
-       else {
+       } else {
                memcpy(&sc->sc_status, st, sizeof(sc->sc_status));
                rv = 0;
        }



Home | Main Index | Thread Index | Old Index