From owner-freebsd-net@FreeBSD.ORG Fri Aug 29 20:55:24 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50DB21065676 for ; Fri, 29 Aug 2008 20:55:24 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 847598FC1D for ; Fri, 29 Aug 2008 20:55:23 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.3/8.14.3/ALCHEMY.FRANKEN.DE) with ESMTP id m7TKZbUA083523; Fri, 29 Aug 2008 22:35:37 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.3/8.14.3/Submit) id m7TKZbvB083522; Fri, 29 Aug 2008 22:35:37 +0200 (CEST) (envelope-from marius) Date: Fri, 29 Aug 2008 22:35:37 +0200 From: Marius Strobl To: Jacob Owens Message-ID: <20080829203537.GA83446@alchemy.franken.de> References: <20080809082539.GC42339@cdnetworks.co.kr> <20080812013739.GB54362@cdnetworks.co.kr> <20080813044809.GD58659@cdnetworks.co.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: lagg failover not automatic X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2008 20:55:24 -0000 On Thu, Aug 28, 2008 at 10:18:28PM -0500, Jacob Owens wrote: > To resolve the issue, Pyun first had my patch amphy.c , then the dc driver. > The DC patch fixed my issue. Here is what i had to do: > > 1. save attached patch to /tmp > 2. #cd /usr/src > 3. #patch -p0 < /tmp/dc.patch > 4. rebuild/install kernel and reboot. i used instructions from here: > http://www.freebsdmadeeasy.com/tutorials/freebsd/recompiling-the-kernel-in-freebsd.php > > THANK YOU to Pyun YongHyeon and the freebsd-net group for helping me with > this issue!!! > > Save the text below and save as dc.patch. (The first line is 'index: > sys/dev/dc......' ,Last line is ' * When the init.....' > > Index: sys/dev/dc/if_dc.c > =================================================================== > --- sys/dev/dc/if_dc.c (revision 181654) > +++ sys/dev/dc/if_dc.c (working copy) > @@ -2868,6 +2868,12 @@ > ifp = sc->dc_ifp; > mii = device_get_softc(sc->dc_miibus); > > + /* > + * XXX Can cause autonegotiation failure on certain models > + * as DC21143 overdrive mii_ticks. > + */ > + mii_tick(mii); > + > if (sc->dc_flags & DC_REDUCED_MII_POLL) { > if (sc->dc_flags & DC_21143_NWAY) { > r = CSR_READ_4(sc, DC_10BTSTAT); > @@ -2881,19 +2887,15 @@ > sc->dc_link = 0; > mii_mediachg(mii); > } > - if (sc->dc_link == 0) > - mii_tick(mii); > } else { > r = CSR_READ_4(sc, DC_ISR); > if ((r & DC_ISR_RX_STATE) == DC_RXSTATE_WAIT && > sc->dc_cdata.dc_tx_cnt == 0) { > - mii_tick(mii); > if (!(mii->mii_media_status & IFM_ACTIVE)) > sc->dc_link = 0; > } > } > - } else > - mii_tick(mii); > + } > > /* > * When the init routine completes, we expect to be able to send For the records, a more appropriate fix (the above patch just lets dc(4) bypasse the DC_REDUCED_MII_POLL handling completely) was commited as r182461. Marius