From owner-svn-src-stable@FreeBSD.ORG Tue Oct 13 17:56:48 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A2EC106568D; Tue, 13 Oct 2009 17:56:48 +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 5886C8FC19; Tue, 13 Oct 2009 17:56:48 +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 n9DHumxN012287; Tue, 13 Oct 2009 17:56:48 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DHumFf012285; Tue, 13 Oct 2009 17:56:48 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200910131756.n9DHumFf012285@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 13 Oct 2009 17:56:48 +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: r198039 - in stable/7/sys: . contrib/pf pci X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2009 17:56:48 -0000 Author: yongari Date: Tue Oct 13 17:56:48 2009 New Revision: 198039 URL: http://svn.freebsd.org/changeset/base/198039 Log: MFC 191345: To make it easy whether xl(4) missed Tx completion interrupt check number of queued packets in watchdog timeout handler. If there are no queued packets just print a informational message and return without resetting controller. Also fix to invoke correct Tx completion handler as 3C905B needs different handler. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/pci/if_xl.c Modified: stable/7/sys/pci/if_xl.c ============================================================================== --- stable/7/sys/pci/if_xl.c Tue Oct 13 17:50:10 2009 (r198038) +++ stable/7/sys/pci/if_xl.c Tue Oct 13 17:56:48 2009 (r198039) @@ -3216,12 +3216,31 @@ xl_watchdog(struct xl_softc *sc) { struct ifnet *ifp = sc->xl_ifp; u_int16_t status = 0; + int misintr; XL_LOCK_ASSERT(sc); if (sc->xl_wdog_timer == 0 || --sc->xl_wdog_timer != 0) return (0); + xl_rxeof(sc); + xl_txeoc(sc); + misintr = 0; + if (sc->xl_type == XL_TYPE_905B) { + xl_txeof_90xB(sc); + if (sc->xl_cdata.xl_tx_cnt == 0) + misintr++; + } else { + xl_txeof(sc); + if (sc->xl_cdata.xl_tx_head == NULL) + misintr++; + } + if (misintr != 0) { + device_printf(sc->xl_dev, + "watchdog timeout (missed Tx interrupts) -- recovering\n"); + return (0); + } + ifp->if_oerrors++; XL_SEL_WIN(4); status = CSR_READ_2(sc, XL_W4_MEDIA_STATUS); @@ -3231,9 +3250,6 @@ xl_watchdog(struct xl_softc *sc) device_printf(sc->xl_dev, "no carrier - transceiver cable problem?\n"); - xl_txeoc(sc); - xl_txeof(sc); - xl_rxeof(sc); xl_reset(sc); xl_init_locked(sc);