diff options
| author | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-02-18 10:56:00 +0000 |
|---|---|---|
| committer | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-02-18 10:56:00 +0000 |
| commit | d5e689516689093d23b986067a2dfbc32e19ad1f (patch) | |
| tree | 84ea55c660d452ee7bfade47d3bd98424db8c74f /sys | |
| parent | b61b86b86f426cc7c24d97e7290d0bfb20c89e55 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/firewire/firewire.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index 7985743e2d031..b25ede69d6c12 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -477,9 +477,17 @@ firewire_detach( device_t dev ) { struct firewire_softc *sc; struct csrdir *csrd, *next; + struct fw_device *fwdev, *fwdev_next; sc = (struct firewire_softc *)device_get_softc(dev); + bus_generic_detach(dev); + + callout_stop(&sc->fc->timeout_callout); + callout_stop(&sc->fc->bmr_callout); + callout_stop(&sc->fc->retry_probe_callout); + callout_stop(&sc->fc->busprobe_callout); + #if __FreeBSD_version >= 500000 destroy_dev(sc->dev); #else @@ -490,17 +498,17 @@ firewire_detach( device_t dev ) } #endif /* XXX xfree_free and untimeout on all xfers */ + for (fwdev = STAILQ_FIRST(&sc->fc->devices); fwdev != NULL; + fwdev = fwdev_next) { + fwdev_next = STAILQ_NEXT(fwdev, link); + free(fwdev, M_FW); + } for (csrd = SLIST_FIRST(&sc->fc->csrfree); csrd != NULL; csrd = next) { next = SLIST_NEXT(csrd, link); free(csrd, M_FW); } - callout_stop(&sc->fc->timeout_callout); - callout_stop(&sc->fc->bmr_callout); - callout_stop(&sc->fc->retry_probe_callout); - callout_stop(&sc->fc->busprobe_callout); free(sc->fc->topology_map, M_FW); free(sc->fc->speed_map, M_FW); - bus_generic_detach(dev); return(0); } #if 0 |
