mirror of
https://github.com/opnsense/src.git
synced 2026-04-20 21:59:20 -04:00
Add missing locking.
Whilst here, assert that the lock is held when calling epstop(). Tested: ep0: <3com Megahertz 574B>
This commit is contained in:
parent
9721a22d4a
commit
f8cdacdd18
1 changed files with 5 additions and 0 deletions
|
|
@ -343,7 +343,9 @@ ep_attach(struct ep_softc *sc)
|
|||
EP_FSET(sc, F_RX_FIRST);
|
||||
sc->top = sc->mcur = 0;
|
||||
|
||||
EP_LOCK(sc);
|
||||
epstop(sc);
|
||||
EP_UNLOCK(sc);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
|
@ -1000,6 +1002,9 @@ epwatchdog(struct ep_softc *sc)
|
|||
static void
|
||||
epstop(struct ep_softc *sc)
|
||||
{
|
||||
|
||||
EP_ASSERT_LOCKED(sc);
|
||||
|
||||
CSR_WRITE_2(sc, EP_COMMAND, RX_DISABLE);
|
||||
CSR_WRITE_2(sc, EP_COMMAND, RX_DISCARD_TOP_PACK);
|
||||
EP_BUSY_WAIT(sc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue