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/owi | |
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/owi')
-rw-r--r-- | sys/dev/owi/if_owi.c | 4 | ||||
-rw-r--r-- | sys/dev/owi/if_wivar.h | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/owi/if_owi.c b/sys/dev/owi/if_owi.c index 70f1941..6f3488b 100644 --- a/sys/dev/owi/if_owi.c +++ b/sys/dev/owi/if_owi.c @@ -449,6 +449,8 @@ wi_rxeof(sc) struct mbuf *m; int id; + WI_LOCK_ASSERT(sc); + ifp = &sc->arpcom.ac_if; id = CSR_READ_2(sc, WI_RX_FID); @@ -650,7 +652,9 @@ wi_rxeof(sc) #ifdef WICACHE wi_cache_store(sc, eh, m, rx_frame.wi_q_info); #endif + WI_UNLOCK(sc); (*ifp->if_input)(ifp, m); + WI_LOCK(sc); } } diff --git a/sys/dev/owi/if_wivar.h b/sys/dev/owi/if_wivar.h index 723f2ca..98f1970 100644 --- a/sys/dev/owi/if_wivar.h +++ b/sys/dev/owi/if_wivar.h @@ -171,9 +171,11 @@ struct wi_card_ident { #define ifaddr_byindex(idx) ifnet_addrs[(idx) - 1]; #define WI_LOCK(_sc, _s) s = splimp() #define WI_UNLOCK(_sc, _s) splx(s) +#define WI_LOCK_ASSERT(_sc) #else #define WI_LOCK(_sc, _s) _s = 1 #define WI_UNLOCK(_sc, _s) +#define WI_LOCK_ASSERT(_sc) #endif int owi_generic_attach(device_t); |