[PATCH] Fix OACTIVE for an(4)
Adrian Chadd
adrian at freebsd.org
Wed Oct 1 18:58:41 UTC 2014
Hi,
On 1 October 2014 07:14, John Baldwin <jhb at freebsd.org> wrote:
> This small patch correctly sets OACTIVE when an(4) gets backed up. Right now
> I believe it will never set the flag. It is only an optimization, it should
> not affect correctness.
>
> Index: an/if_an.c
> ===================================================================
> --- an/if_an.c (revision 270968)
> +++ an/if_an.c (working copy)
> @@ -2906,11 +2906,11 @@
> CSR_WRITE_2(sc, AN_INT_EN(sc->mpi350), AN_INTRS(sc->mpi350));
> }
>
> - if (m0 != NULL)
> + if (sc->an_rdata.an_tx_prod != idx) {
> ifp->if_drv_flags |= IFF_DRV_OACTIVE;
> + sc->an_rdata.an_tx_prod = idx;
> + }
>
> - sc->an_rdata.an_tx_prod = idx;
> -
> return;
> }
I haven't looked at the rest of the driver; is everything else around
OACTIVE locked correctly and consistently?
There's no single-entry into if_start(). It can be called from
multiple paths at the same time.
-a
More information about the freebsd-current
mailing list