From owner-freebsd-current@FreeBSD.ORG Wed Oct 1 17:40:33 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0670F4BF for ; Wed, 1 Oct 2014 17:40:33 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5E13B09 for ; Wed, 1 Oct 2014 17:40:32 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C712AB949 for ; Wed, 1 Oct 2014 13:40:31 -0400 (EDT) From: John Baldwin To: freebsd-current@freebsd.org Subject: [PATCH] Fix OACTIVE for an(4) Date: Wed, 01 Oct 2014 10:14:54 -0400 Message-ID: <2113392.UOaBFTpimf@ralph.baldwin.cx> User-Agent: KMail/4.12.5 (FreeBSD/10.1-BETA2; KDE/4.12.5; amd64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 01 Oct 2014 13:40:31 -0400 (EDT) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 17:40:33 -0000 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; } -- John Baldwin