summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_xl.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-10-13 21:11:20 +0000
committerru <ru@FreeBSD.org>2005-10-13 21:11:20 +0000
commitb9c7add838ccaace56cbb1d065e502e478f92d4e (patch)
tree42d971c6d541bfdfd3204acba1a4ae6004c37124 /sys/pci/if_xl.c
parent9d4f7296d4bd26d172e55a582c41d028d6dceb40 (diff)
downloadFreeBSD-src-b9c7add838ccaace56cbb1d065e502e478f92d4e.zip
FreeBSD-src-b9c7add838ccaace56cbb1d065e502e478f92d4e.tar.gz
In detach method, move if_free() after bus_teardown_intr().
Diffstat (limited to 'sys/pci/if_xl.c')
-rw-r--r--sys/pci/if_xl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index 91ff05e..51e143b 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.c
@@ -1717,8 +1717,6 @@ xl_detach(device_t dev)
callout_drain(&sc->xl_stat_callout);
ether_ifdetach(ifp);
}
- if (ifp)
- if_free(ifp);
if (sc->xl_miibus)
device_delete_child(dev, sc->xl_miibus);
bus_generic_detach(dev);
@@ -1734,6 +1732,9 @@ xl_detach(device_t dev)
if (sc->xl_res)
bus_release_resource(dev, res, rid, sc->xl_res);
+ if (ifp)
+ if_free(ifp);
+
if (sc->xl_mtag) {
bus_dmamap_destroy(sc->xl_mtag, sc->xl_tmpmap);
bus_dma_tag_destroy(sc->xl_mtag);
OpenPOWER on IntegriCloud