Changeset 9410212 in rtems-libbsd


Ignore:
Timestamp:
Mar 30, 2015, 7:51:18 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, 5-freebsd-12, 6-freebsd-12, master
Children:
d9ff828
Parents:
6cd057d
git-author:
Sebastian Huber <sebastian.huber@…> (03/30/15 07:51:18)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/10/17 08:53:33)
Message:

if_dwc: Fix transmit starvation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/dev/dwc/if_dwc.c

    r6cd057d r9410212  
    257257        ifp = sc->ifp;
    258258
    259         if (ifp->if_drv_flags & IFF_DRV_OACTIVE) {
    260                 return;
    261         }
    262 
    263259        enqueued = 0;
    264260
     
    293289
    294290        DWC_LOCK(sc);
    295         dwc_txstart_locked(sc);
     291        if ((ifp->if_drv_flags & IFF_DRV_OACTIVE) == 0)
     292                dwc_txstart_locked(sc);
    296293        DWC_UNLOCK(sc);
    297294}
     
    719716        struct dwc_bufmap *bmap;
    720717        struct dwc_hwdesc *desc;
    721         struct ifnet *ifp;
    722718
    723719        DWC_ASSERT_LOCKED(sc);
    724720
    725         ifp = sc->ifp;
    726721        while (sc->tx_idx_tail != sc->tx_idx_head) {
    727722                desc = &sc->txdesc_ring[sc->tx_idx_tail];
     
    736731                dwc_setup_txdesc(sc, sc->tx_idx_tail, 0, 0);
    737732                sc->tx_idx_tail = next_txidx(sc, sc->tx_idx_tail);
    738                 ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
    739         }
     733        }
     734
     735        sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
     736        dwc_txstart_locked(sc);
    740737
    741738        /* If there are no buffers outstanding, muzzle the watchdog. */
Note: See TracChangeset for help on using the changeset viewer.