diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-11-16 04:37:30 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2002-11-16 04:37:30 +0000 |
commit | 7c9182f5ef212501de7b94939de5f676977a283b (patch) | |
tree | 672502963e211fe00c94923dfb8718301bcedde1 /sys/dev | |
parent | 9cd7fd277caaa68895f160d5701d6ea19f301ebb (diff) |
From NetBSD (bouyer@):
In siop_reset(), reset sc_ntargets to 0. The number of targets 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 now used for something else.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/siop.c | 9 | ||||
-rw-r--r-- | sys/dev/ic/siopvar_common.h | 4 | ||||
-rw-r--r-- | sys/dev/pci/siop_pci.c | 4 |
3 files changed, 10 insertions, 7 deletions
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c index 539cfd137d0..00fc0c83108 100644 --- a/sys/dev/ic/siop.c +++ b/sys/dev/ic/siop.c @@ -1,5 +1,5 @@ -/* $OpenBSD: siop.c,v 1.22 2002/09/16 00:53:12 krw Exp $ */ -/* $NetBSD: siop.c,v 1.64 2002/07/26 01:00:43 wiz Exp $ */ +/* $OpenBSD: siop.c,v 1.23 2002/11/16 04:37:29 krw Exp $ */ +/* $NetBSD: siop.c,v 1.65 2002/11/08 22:04:41 bouyer Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. @@ -263,6 +263,7 @@ siop_reset(sc) } 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) { @@ -1928,7 +1929,7 @@ siop_add_reselsw(sc, target) struct siop_softc *sc; int target; { - int i; + int i,j; struct siop_target *siop_target; struct siop_lun *siop_lun; @@ -1965,6 +1966,8 @@ siop_add_reselsw(sc, target) 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); } } diff --git a/sys/dev/ic/siopvar_common.h b/sys/dev/ic/siopvar_common.h index ef4be6fad3d..9d27454910e 100644 --- a/sys/dev/ic/siopvar_common.h +++ b/sys/dev/ic/siopvar_common.h @@ -1,5 +1,5 @@ -/* $OpenBSD: siopvar_common.h,v 1.11 2002/09/16 00:53:12 krw Exp $ */ -/* $NetBSD: siopvar_common.h,v 1.21 2002/05/04 18:43:22 bouyer Exp $ */ +/* $OpenBSD: siopvar_common.h,v 1.12 2002/11/16 04:37:29 krw Exp $ */ +/* $NetBSD: siopvar_common.h,v 1.22 2002/10/23 02:32:36 christos Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. diff --git a/sys/dev/pci/siop_pci.c b/sys/dev/pci/siop_pci.c index 3f87e5f9259..1556cd13d2f 100644 --- a/sys/dev/pci/siop_pci.c +++ b/sys/dev/pci/siop_pci.c @@ -1,5 +1,5 @@ -/* $OpenBSD: siop_pci.c,v 1.4 2002/09/16 00:53:12 krw Exp $ */ -/* $NetBSD: siop_pci.c,v 1.11 2002/04/23 20:41:18 bouyer Exp $ */ +/* $OpenBSD: siop_pci.c,v 1.5 2002/11/16 04:37:29 krw Exp $ */ +/* $NetBSD: siop_pci.c,v 1.14 2002/10/02 16:51:54 thorpej Exp $ */ /* * Copyright (c) 2000 Manuel Bouyer. |