[PATCH] Fix OACTIVE for an(4)

From: John Baldwin <jhb_at_freebsd.org>
Date: Wed, 01 Oct 2014 10:14:54 -0400
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)
_at__at_ -2906,11 +2906,11 _at__at_
                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;
 }

-- 
John Baldwin
Received on Wed Oct 01 2014 - 15:40:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:52 UTC