mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-14 05:29:43 +08:00
if_dwc: Fix transmit starvation
This commit is contained in:
parent
1535c87c81
commit
dd1feda161
@ -321,10 +321,6 @@ dwc_txstart_locked(struct dwc_softc *sc)
|
||||
|
||||
ifp = sc->ifp;
|
||||
|
||||
if (ifp->if_drv_flags & IFF_DRV_OACTIVE) {
|
||||
return;
|
||||
}
|
||||
|
||||
enqueued = 0;
|
||||
|
||||
for (;;) {
|
||||
@ -357,7 +353,8 @@ dwc_txstart(struct ifnet *ifp)
|
||||
struct dwc_softc *sc = ifp->if_softc;
|
||||
|
||||
DWC_LOCK(sc);
|
||||
dwc_txstart_locked(sc);
|
||||
if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0)
|
||||
dwc_txstart_locked(sc);
|
||||
DWC_UNLOCK(sc);
|
||||
}
|
||||
|
||||
@ -824,6 +821,9 @@ dwc_txfinish_locked(struct dwc_softc *sc)
|
||||
sc->tx_idx_tail = next_txidx(sc, sc->tx_idx_tail);
|
||||
}
|
||||
|
||||
sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
|
||||
dwc_txstart_locked(sc);
|
||||
|
||||
/* If there are no buffers outstanding, muzzle the watchdog. */
|
||||
if (sc->tx_idx_tail == sc->tx_idx_head) {
|
||||
sc->tx_watchdog_count = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user