diff options
author | Thierry Deval <tdeval@cvs.openbsd.org> | 2002-12-13 02:15:02 +0000 |
---|---|---|
committer | Thierry Deval <tdeval@cvs.openbsd.org> | 2002-12-13 02:15:02 +0000 |
commit | fc45335f431868d7d900fa409fa490791fa437e1 (patch) | |
tree | df5746ddf2b4f601824b9973cb2b4728a3c7aa37 /sys/dev/cardbus | |
parent | 3670820ae9a14bae38e82da551ea736e6d8e61ef (diff) |
Detach fwnodes first.
Solves panics when removing the adapter while leaving the devices connected.
Diffstat (limited to 'sys/dev/cardbus')
-rw-r--r-- | sys/dev/cardbus/fwohci_cardbus.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/cardbus/fwohci_cardbus.c b/sys/dev/cardbus/fwohci_cardbus.c index c2acc385d77..d74077473b7 100644 --- a/sys/dev/cardbus/fwohci_cardbus.c +++ b/sys/dev/cardbus/fwohci_cardbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fwohci_cardbus.c,v 1.2 2002/12/13 02:13:39 tdeval Exp $ */ +/* $OpenBSD: fwohci_cardbus.c,v 1.3 2002/12/13 02:15:01 tdeval Exp $ */ /* $NetBSD: fwohci_cardbus.c,v 1.5 2002/01/26 16:34:28 ichiro Exp $ */ /* @@ -183,10 +183,18 @@ int fwohci_cardbus_detach(struct device *self, int flags) { struct fwohci_cardbus_softc *sc = (struct fwohci_cardbus_softc *)self; + struct ieee1394_softc *iea; cardbus_devfunc_t ct = sc->sc_ct; - int rv; + int rv = 0; - rv = fwohci_detach(&sc->sc_sc, flags); + LIST_FOREACH(iea, &sc->sc_sc.sc_nodelist, sc1394_node) { +#ifdef FWOHCI_DEBUG + printf("%s: detach %s\n", __func__, iea->sc1394_dev.dv_xname); +#endif /* FWOHCI_DEBUG */ + rv |= config_detach(&iea->sc1394_dev, flags); + } + + rv |= fwohci_detach(&sc->sc_sc, flags); if (rv) return (rv); |