From owner-svn-src-all@FreeBSD.ORG Wed Mar 18 02:07:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8F5E106566C; Wed, 18 Mar 2009 02:07:07 +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 A52528FC0A; Wed, 18 Mar 2009 02:07:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n2I277gw012126; Wed, 18 Mar 2009 02:07:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n2I277fJ012125; Wed, 18 Mar 2009 02:07:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200903180207.n2I277fJ012125@svn.freebsd.org> From: Pyun YongHyeon Date: Wed, 18 Mar 2009 02:07:07 +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: r189945 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2009 02:07:08 -0000 Author: yongari Date: Wed Mar 18 02:07:07 2009 New Revision: 189945 URL: http://svn.freebsd.org/changeset/base/189945 Log: MFC r188381: Reclaim transmitted frames in re_tick(). This is for PCIe controllers that lose Tx completion interrupts under certain conditions. With this change it's safe to use MSI on PCIe controllers so enable MSI on these controllers. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/re/if_re.c Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Wed Mar 18 02:03:16 2009 (r189944) +++ stable/7/sys/dev/re/if_re.c Wed Mar 18 02:07:07 2009 (r189945) @@ -156,7 +156,7 @@ MODULE_DEPEND(re, miibus, 1, 1, 1); #include "miibus_if.h" /* Tunables. */ -static int msi_disable = 1; +static int msi_disable = 0; TUNABLE_INT("hw.re.msi_disable", &msi_disable); #define RE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) @@ -2064,6 +2064,13 @@ re_tick(void *xsc) mii_tick(mii); if ((sc->rl_flags & RL_FLAG_LINK) == 0) re_miibus_statchg(sc->rl_dev); + /* + * Reclaim transmitted frames here. Technically it is not + * necessary to do here but it ensures periodic reclamation + * regardless of Tx completion interrupt which seems to be + * lost on PCIe based controllers under certain situations. + */ + re_txeof(sc); re_watchdog(sc); callout_reset(&sc->rl_stat_callout, hz, re_tick, sc); }