Page MenuHomeFreeBSD

D21952.id63099.diff
No OneTemporary

D21952.id63099.diff

Index: head/sys/dev/cxgbe/t4_main.c
===================================================================
--- head/sys/dev/cxgbe/t4_main.c
+++ head/sys/dev/cxgbe/t4_main.c
@@ -1475,6 +1475,10 @@
sc->cdev = NULL;
}
+ sx_xlock(&t4_list_lock);
+ SLIST_REMOVE(&t4_list, sc, adapter, link);
+ sx_xunlock(&t4_list_lock);
+
sc->flags &= ~CHK_MBOX_ACCESS;
if (sc->flags & FULL_INIT_DONE) {
if (!(sc->flags & IS_VF))
@@ -1568,12 +1572,6 @@
free(sc->tids.tid_tab, M_CXGBE);
free(sc->tt.tls_rx_ports, M_CXGBE);
t4_destroy_dma_tag(sc);
- if (mtx_initialized(&sc->sc_lock)) {
- sx_xlock(&t4_list_lock);
- SLIST_REMOVE(&t4_list, sc, adapter, link);
- sx_xunlock(&t4_list_lock);
- mtx_destroy(&sc->sc_lock);
- }
callout_drain(&sc->sfl_callout);
if (mtx_initialized(&sc->tids.ftid_lock)) {
@@ -1582,12 +1580,8 @@
}
if (mtx_initialized(&sc->tids.atid_lock))
mtx_destroy(&sc->tids.atid_lock);
- if (mtx_initialized(&sc->sfl_lock))
- mtx_destroy(&sc->sfl_lock);
if (mtx_initialized(&sc->ifp_lock))
mtx_destroy(&sc->ifp_lock);
- if (mtx_initialized(&sc->reg_lock))
- mtx_destroy(&sc->reg_lock);
if (rw_initialized(&sc->policy_lock)) {
rw_destroy(&sc->policy_lock);
@@ -1603,6 +1597,10 @@
if (rw_initialized(&mw->mw_lock))
rw_destroy(&mw->mw_lock);
}
+
+ mtx_destroy(&sc->sfl_lock);
+ mtx_destroy(&sc->reg_lock);
+ mtx_destroy(&sc->sc_lock);
bzero(sc, sizeof(*sc));

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 26, 8:33 AM (11 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15602878
Default Alt Text
D21952.id63099.diff (1 KB)

Event Timeline