From 9c88e8171aafb1fc373b0c3aae68020b095216ca Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Fri, 9 Sep 2005 13:59:27 +0000 Subject: [PATCH] In axe_stop(), move axe_reset() after usbd_close_pipe(). usbd_set_config_no() will free `ifaces', which contains header of `pipe's. So the `pipe' removal operation in usbd_close_pipe() will be quite dangerous if usbd_set_config_no() has been called[here via axe_reset()] Obtained-from: FreeBSD dev/usb/if_axe.c rev1.16 Reviewed-by: joerg --- sys/dev/netif/axe/if_axe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/netif/axe/if_axe.c b/sys/dev/netif/axe/if_axe.c index befa2c655f..9a036b3e86 100644 --- a/sys/dev/netif/axe/if_axe.c +++ b/sys/dev/netif/axe/if_axe.c @@ -30,7 +30,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/usb/if_axe.c,v 1.10 2003/12/08 07:54:14 obrien Exp $ - * $DragonFly: src/sys/dev/netif/axe/if_axe.c,v 1.13 2005/09/09 13:32:45 sephe Exp $ + * $DragonFly: src/sys/dev/netif/axe/if_axe.c,v 1.14 2005/09/09 13:59:27 sephe Exp $ */ /* * ASIX Electronics AX88172 USB 2.0 ethernet driver. Used in the @@ -1064,8 +1064,6 @@ axe_stop(struct axe_softc *sc) crit_enter(); - axe_reset(sc); - ifp = &sc->arpcom.ac_if; ifp->if_timer = 0; @@ -1114,6 +1112,8 @@ axe_stop(struct axe_softc *sc) sc->axe_ep[AXE_ENDPT_INTR] = NULL; } + axe_reset(sc); + /* Free RX resources. */ for (i = 0; i < AXE_RX_LIST_CNT; i++) { if (sc->axe_cdata.axe_rx_chain[i].axe_buf != NULL) { -- 2.41.0