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
@ -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…
x
Reference in New Issue
Block a user