Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/dev/ic Pull up revision 1.65 (requested by bouyer i...



details:   https://anonhg.NetBSD.org/src/rev/f20e27be5d63
branches:  netbsd-1-6
changeset: 529738:f20e27be5d63
user:      he <he%NetBSD.org@localhost>
date:      Wed Dec 11 17:59:23 2002 +0000

description:
Pull up revision 1.65 (requested by bouyer in ticket #975):
  In siop_reset(), reset sc_ntargets to 0; it will be
  computed again in siop_add_reselsw().
  In siop_reset(), reset the tag reseloff to 0, in addition
  to the lun reseloff.  If siop_add_dev() fails this time,
  we would use the old reseloff, clobbering memory new used
  for something else.

diffstat:

 sys/dev/ic/siop.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r 83f83d5d3956 -r f20e27be5d63 sys/dev/ic/siop.c
--- a/sys/dev/ic/siop.c Wed Dec 11 17:55:15 2002 +0000
+++ b/sys/dev/ic/siop.c Wed Dec 11 17:59:23 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siop.c,v 1.62 2002/05/18 16:09:44 bouyer Exp $ */
+/*     $NetBSD: siop.c,v 1.62.2.1 2002/12/11 17:59:23 he Exp $ */
 
 /*
  * Copyright (c) 2000 Manuel Bouyer.
@@ -33,7 +33,7 @@
 /* SYM53c7/8xx PCI-SCSI I/O Processors driver */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.62 2002/05/18 16:09:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siop.c,v 1.62.2.1 2002/12/11 17:59:23 he Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -252,6 +252,7 @@
        }
        sc->script_free_lo = sizeof(siop_script) / sizeof(siop_script[0]);
        sc->script_free_hi = sc->sc_c.ram_size / 4;
+       sc->sc_ntargets = 0;
 
        /* free used and unused lun switches */
        while((lunsw = TAILQ_FIRST(&sc->lunsw_list)) != NULL) {
@@ -1768,7 +1769,7 @@
        struct siop_softc *sc;
        int target;
 {
-       int i;
+       int i, j;
        struct siop_target *siop_target;
        struct siop_lun *siop_lun;
 
@@ -1805,6 +1806,8 @@
                        continue;
                if (siop_lun->reseloff > 0) {
                        siop_lun->reseloff = 0;
+                       for (j = 0; j < SIOP_NTAG; j++)
+                               siop_lun->siop_tag[j].reseloff = 0;
                        siop_add_dev(sc, target, i);
                }
        }



Home | Main Index | Thread Index | Old Index