When closing, wait for pending xfers to drain before deleting the reference
to the adapter.
This commit is contained in:
parent
dcc5f32c2b
commit
624619a881
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ch.c,v 1.35 1998/11/20 00:35:39 thorpej Exp $ */
|
||||
/* $NetBSD: ch.c,v 1.36 1998/12/08 00:19:56 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 1997, 1998 Jason R. Thorpe <thorpej@and.com>
|
||||
|
@ -273,6 +273,8 @@ chclose(dev, flags, fmt, p)
|
|||
{
|
||||
struct ch_softc *sc = ch_cd.cd_devs[CHUNIT(dev)];
|
||||
|
||||
scsipi_wait_drain(sc->sc_link);
|
||||
|
||||
scsipi_adapter_delref(sc->sc_link);
|
||||
sc->sc_link->flags &= ~SDEV_OPEN;
|
||||
return (0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_se.c,v 1.21 1998/11/20 00:35:39 thorpej Exp $ */
|
||||
/* $NetBSD: if_se.c,v 1.22 1998/12/08 00:19:27 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Ian W. Dall <ian.dall@dsto.defence.gov.au>
|
||||
|
@ -1201,6 +1201,9 @@ seclose(dev, flag, fmt, p)
|
|||
struct se_softc *sc = se_cd.cd_devs[SEUNIT(dev)];
|
||||
|
||||
SC_DEBUG(sc->sc_link, SDEV_DB1, ("closing\n"));
|
||||
|
||||
scsipi_wait_drain(sc->sc_link);
|
||||
|
||||
scsipi_adapter_delref(sc->sc_link);
|
||||
sc->sc_link->flags &= ~SDEV_OPEN;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ss.c,v 1.23 1998/11/20 00:35:40 thorpej Exp $ */
|
||||
/* $NetBSD: ss.c,v 1.24 1998/12/08 00:19:27 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Kenneth Stailey. All rights reserved.
|
||||
|
@ -261,6 +261,8 @@ ssclose(dev, flag, mode, p)
|
|||
ss->flags &= ~SSF_TRIGGERED;
|
||||
}
|
||||
|
||||
scsipi_wait_drain(ss->sc_link);
|
||||
|
||||
scsipi_adapter_delref(ss->sc_link);
|
||||
ss->sc_link->flags &= ~SDEV_OPEN;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: st.c,v 1.106 1998/11/20 00:35:40 thorpej Exp $ */
|
||||
/* $NetBSD: st.c,v 1.107 1998/12/08 00:19:27 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -724,6 +724,8 @@ stclose(dev, flags, mode, p)
|
|||
break;
|
||||
}
|
||||
|
||||
scsipi_wait_drain(st->sc_link);
|
||||
|
||||
scsipi_adapter_delref(st->sc_link);
|
||||
st->sc_link->flags &= ~SDEV_OPEN;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uk.c,v 1.26 1998/11/20 00:35:40 thorpej Exp $ */
|
||||
/* $NetBSD: uk.c,v 1.27 1998/12/08 00:19:28 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -178,6 +178,9 @@ ukclose(dev, flag, fmt, p)
|
|||
struct uk_softc *uk = uk_cd.cd_devs[UKUNIT(dev)];
|
||||
|
||||
SC_DEBUG(uk->sc_link, SDEV_DB1, ("closing\n"));
|
||||
|
||||
scsipi_wait_drain(uk->sc_link);
|
||||
|
||||
scsipi_adapter_delref(uk->sc_link);
|
||||
uk->sc_link->flags &= ~SDEV_OPEN;
|
||||
|
||||
|
|
Loading…
Reference in New Issue