diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-02-08 17:23:47 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-02-08 17:23:47 +0000 |
commit | 5f2800850ace3b6dc015ad269705529d1397878c (patch) | |
tree | 60e3beef57604c89db575b576fb2e0e703e45bb3 /sys | |
parent | a95c6d32016c03f7fa69d772bfd48f3744ac914c (diff) |
Cleanup the device removal path
When destroying the ring all transfers should be already gone so there
should be no need to repeat ourselves after xbf_stop has done its work.
Get rid of the yield() that was probably masking some issues that have
been since fixed.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pv/xbf.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index 3d43f95165c..b69cb5f6156 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.20 2017/02/08 16:51:26 mikeb Exp $ */ +/* $OpenBSD: xbf.c,v 1.21 2017/02/08 17:23:46 mikeb Exp $ */ /* * Copyright (c) 2016 Mike Belopuhov @@ -1192,9 +1192,6 @@ xbf_ring_destroy(struct xbf_softc *sc) bus_dmamap_unload(sc->sc_dmat, sc->sc_xs_map[i]); bus_dmamap_destroy(sc->sc_dmat, sc->sc_xs_map[i]); sc->sc_xs_map[i] = NULL; - if (sc->sc_xs == NULL || sc->sc_xs[i] == NULL) - continue; - xbf_scsi_done(sc->sc_xs[i], XS_RESET); } free(sc->sc_xs, M_DEVBUF, sc->sc_xr_ndesc * @@ -1210,7 +1207,6 @@ xbf_ring_destroy(struct xbf_softc *sc) sc->sc_xs_bb = NULL; xbf_dma_free(sc, &sc->sc_xr_dma); - sc->sc_xr = NULL; } @@ -1246,8 +1242,5 @@ xbf_stop(struct xbf_softc *sc) sc->sc_xs[desc] = NULL; } - /* Give other processes a chance to run */ - yield(); - xbf_ring_destroy(sc); } |