Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jun 2015 22:52:33 +0800
From:      Marcelo Araujo <araujobsdport@gmail.com>
To:        Luiz Otavio O Souza <loos@freebsd.org>
Cc:        svn-src-head@freebsd.org, src-committers@freebsd.org,  svn-src-all@freebsd.org
Subject:   Re: svn commit: r283948 - head/sys/dev/dwc
Message-ID:  <CAOfEmZgY-7wUp=thFMMSJTbHtcNKzanGqi4AfKYaeHCuyFpH%2Bw@mail.gmail.com>
In-Reply-To: <201506031448.t53Em4Gn090709@svn.freebsd.org>
References:  <201506031448.t53Em4Gn090709@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Oi,

fp = sc->ifp;

Deveria ser:

ifp = sc->ifp;

[]s
On Jun 3, 2015 10:48 PM, "Luiz Otavio O Souza" <loos@freebsd.org> wrote:

> Author: loos
> Date: Wed Jun  3 14:48:03 2015
> New Revision: 283948
> URL: https://svnweb.freebsd.org/changeset/base/283948
>
> Log:
>   Fix the OACTIVE handling on if_dwc.
>
>   Previously the OACTIVE flag was being set when the tx descriptors are
> fully
>   allocated but it wasn't unset anywhere.
>
>   As soon as a packet is transmitted, unset the OACTIVE flag and call start
>   routine to push any pending packets from the tx queue.
>
>   This closes another race where a full tx queue would jam the tx path (tx
>   queue is full, new packets cannot be added to queue and dwc_txstart never
>   gets called).
>
> Modified:
>   head/sys/dev/dwc/if_dwc.c
>
> Modified: head/sys/dev/dwc/if_dwc.c
>
> ==============================================================================
> --- head/sys/dev/dwc/if_dwc.c   Wed Jun  3 14:07:50 2015        (r283947)
> +++ head/sys/dev/dwc/if_dwc.c   Wed Jun  3 14:48:03 2015        (r283948)
> @@ -741,9 +741,11 @@ dwc_txfinish_locked(struct dwc_softc *sc
>  {
>         struct dwc_bufmap *bmap;
>         struct dwc_hwdesc *desc;
> +       struct ifnet *ifp;
>
>         DWC_ASSERT_LOCKED(sc);
>
> +       fp = sc->ifp;
>         while (sc->tx_idx_tail != sc->tx_idx_head) {
>                 desc = &sc->txdesc_ring[sc->tx_idx_tail];
>                 if ((desc->tdes0 & DDESC_TDES0_OWN) != 0)
> @@ -756,6 +758,7 @@ dwc_txfinish_locked(struct dwc_softc *sc
>                 bmap->mbuf = NULL;
>                 dwc_setup_txdesc(sc, sc->tx_idx_tail, 0, 0);
>                 sc->tx_idx_tail = next_txidx(sc, sc->tx_idx_tail);
> +               ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
>         }
>
>         /* If there are no buffers outstanding, muzzle the watchdog. */
> @@ -838,8 +841,10 @@ dwc_intr(void *arg)
>                 if (reg & DMA_STATUS_RI)
>                         dwc_rxfinish_locked(sc);
>
> -               if (reg & DMA_STATUS_TI)
> +               if (reg & DMA_STATUS_TI) {
>                         dwc_txfinish_locked(sc);
> +                       dwc_txstart_locked(sc);
> +               }
>         }
>
>         if (reg & DMA_STATUS_AIS) {
> _______________________________________________
> svn-src-head@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOfEmZgY-7wUp=thFMMSJTbHtcNKzanGqi4AfKYaeHCuyFpH%2Bw>