From owner-svn-src-stable-7@FreeBSD.ORG Wed Nov 4 18:14:20 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 284B01065670; Wed, 4 Nov 2009 18:14:20 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16A1F8FC15; Wed, 4 Nov 2009 18:14:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nA4IEJGk041453; Wed, 4 Nov 2009 18:14:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nA4IEJoY041450; Wed, 4 Nov 2009 18:14:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200911041814.nA4IEJoY041450@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 4 Nov 2009 18:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198915 - stable/7/sys/dev/fxp X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Nov 2009 18:14:20 -0000 Author: yongari Date: Wed Nov 4 18:14:19 2009 New Revision: 198915 URL: http://svn.freebsd.org/changeset/base/198915 Log: MFC r194571: Don't blindly enable Rx lock-up workaround. Newer chips do not need the Rx lock-up workaround. Obtained from: NetBSD Modified: stable/7/sys/dev/fxp/if_fxp.c stable/7/sys/dev/fxp/if_fxpvar.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/fxp/if_fxp.c ============================================================================== --- stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:08:53 2009 (r198914) +++ stable/7/sys/dev/fxp/if_fxp.c Wed Nov 4 18:14:19 2009 (r198915) @@ -501,6 +501,13 @@ fxp_attach(device_t dev) sc->flags |= FXP_FLAG_WOLCAP; } + /* Receiver lock-up workaround detection. */ + fxp_read_eeprom(sc, &data, 3, 1); + if ((data & 0x03) != 0x03) { + sc->flags |= FXP_FLAG_RXBUG; + device_printf(dev, "Enabling Rx lock-up workaround\n"); + } + /* * Determine whether we must use the 503 serial interface. */ @@ -2015,7 +2022,7 @@ fxp_tick(void *xsc) if (sp->rx_good) { ifp->if_ipackets += le32toh(sp->rx_good); sc->rx_idle_secs = 0; - } else { + } else if (sc->flags & FXP_FLAG_RXBUG) { /* * Receiver's been idle for another second. */ Modified: stable/7/sys/dev/fxp/if_fxpvar.h ============================================================================== --- stable/7/sys/dev/fxp/if_fxpvar.h Wed Nov 4 18:08:53 2009 (r198914) +++ stable/7/sys/dev/fxp/if_fxpvar.h Wed Nov 4 18:14:19 2009 (r198915) @@ -204,6 +204,7 @@ struct fxp_softc { #define FXP_FLAG_82559_RXCSUM 0x1000 /* 82559 compatible RX checksum */ #define FXP_FLAG_WOLCAP 0x2000 /* WOL capability */ #define FXP_FLAG_WOL 0x4000 /* WOL active */ +#define FXP_FLAG_RXBUG 0x8000 /* Rx lock-up bug */ /* Macros to ease CSR access. */ #define CSR_READ_1(sc, reg) bus_read_1(sc->fxp_res[0], reg)