diff options
author | sam <sam@FreeBSD.org> | 2003-11-14 19:00:32 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-11-14 19:00:32 +0000 |
commit | 29f07789b1fc26f60bc1c931437f78725f1bc994 (patch) | |
tree | 0e5901939d8633065a9035209aa5138fe4ea6820 /sys/dev/ti | |
parent | 6873e20b753b589bfb09a3e55bb3781e9889e442 (diff) | |
download | FreeBSD-src-29f07789b1fc26f60bc1c931437f78725f1bc994.zip FreeBSD-src-29f07789b1fc26f60bc1c931437f78725f1bc994.tar.gz |
Drop the driver lock around calls to if_input to avoid a LOR when
the packets are immediately returned for sending (e.g. when bridging
or packet forwarding). There are more efficient ways to do this
but for now use the least intrusive approach.
Reviewed by: imp, rwatson
Diffstat (limited to 'sys/dev/ti')
-rw-r--r-- | sys/dev/ti/if_ti.c | 4 | ||||
-rw-r--r-- | sys/dev/ti/if_tireg.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c index 4cbea9b..c5f3fc0 100644 --- a/sys/dev/ti/if_ti.c +++ b/sys/dev/ti/if_ti.c @@ -2384,6 +2384,8 @@ ti_rxeof(sc) struct ifnet *ifp; struct ti_cmd_desc cmd; + TI_LOCK_ASSERT(sc); + ifp = &sc->arpcom.ac_if; while(sc->ti_rx_saved_considx != sc->ti_return_prodidx.ti_idx) { @@ -2479,7 +2481,9 @@ ti_rxeof(sc) */ if (have_tag) VLAN_INPUT_TAG(ifp, m, vlan_tag, continue); + TI_UNLOCK(sc); (*ifp->if_input)(ifp, m); + TI_LOCK(sc); } /* Only necessary on the Tigon 1. */ diff --git a/sys/dev/ti/if_tireg.h b/sys/dev/ti/if_tireg.h index b15b28b..71d9661 100644 --- a/sys/dev/ti/if_tireg.h +++ b/sys/dev/ti/if_tireg.h @@ -1030,6 +1030,7 @@ struct ti_softc { #define TI_LOCK(_sc) mtx_lock(&(_sc)->ti_mtx) #define TI_UNLOCK(_sc) mtx_unlock(&(_sc)->ti_mtx) +#define TI_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->ti_mtx, MA_OWNED) /* * Microchip Technology 24Cxx EEPROM control bytes |