From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 1 22:30:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEEA8106567D for ; Mon, 1 Dec 2008 22:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 902778FC1C for ; Mon, 1 Dec 2008 22:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mB1MU1nC072956 for ; Mon, 1 Dec 2008 22:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mB1MU1hI072955; Mon, 1 Dec 2008 22:30:01 GMT (envelope-from gnats) Resent-Date: Mon, 1 Dec 2008 22:30:01 GMT Resent-Message-Id: <200812012230.mB1MU1hI072955@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ping Mai Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3D401065673 for ; Mon, 1 Dec 2008 22:28:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C6E948FC0C for ; Mon, 1 Dec 2008 22:28:05 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mB1MS5RD019984 for ; Mon, 1 Dec 2008 22:28:05 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mB1MS5x4019983; Mon, 1 Dec 2008 22:28:05 GMT (envelope-from nobody) Message-Id: <200812012228.mB1MS5x4019983@www.freebsd.org> Date: Mon, 1 Dec 2008 22:28:05 GMT From: Ping Mai To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/129352: xl0 watchdog timeout X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2008 22:30:01 -0000 >Number: 129352 >Category: kern >Synopsis: xl0 watchdog timeout >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 01 22:30:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Ping Mai >Release: RELENG_6 >Organization: Steps Consulting >Environment: FreeBSD agra.pinelake.stepnet.com 6.4-PRERELEASE FreeBSD 6.4-PRERELEASE #4: Fri Nov 28 14:10:54 PST 2008 root@agra.pinelake.stepnet.com:/usr/src/sys/i386/compile/AGRA i386 >Description: Ever since upgrading from 5-STABLE to 6-STABLE, xl0 get watchdog timeouts and the NIC resets: Sep 12 10:20:52 agra kernel: xl0: watchdog timeout Sep 12 10:20:52 agra kernel: xl0: link state changed to DOWN Sep 12 10:20:54 agra kernel: xl0: link state changed to UP This happens 2-3 times a day. >How-To-Repeat: Dell Inspiron 8200 with builtin NIC xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xec80-0xecff mem 0xf8fffc00-0xf8fffc7f irq 11 at device 0.0 on pci2 Running 6-STABLE >Fix: xl_txeof() and xl_txeof_90xB() restart the timer if some packets had been sent. See patch file. Patch attached with submission follows: Index: /usr/src/sys/pci/if_xl.c =================================================================== RCS file: /local/fbsdcvs/src/sys/pci/Attic/if_xl.c,v retrieving revision 1.190.2.12 diff -c -r1.190.2.12 if_xl.c *** /usr/src/sys/pci/if_xl.c 23 Apr 2008 21:38:29 -0000 1.190.2.12 --- /usr/src/sys/pci/if_xl.c 28 Nov 2008 22:10:36 -0000 *************** *** 2079,2084 **** --- 2079,2085 ---- { struct xl_chain *cur_tx; struct ifnet *ifp = sc->xl_ifp; + u_long opkts = ifp->if_opackets; XL_LOCK_ASSERT(sc); *************** *** 2120,2125 **** --- 2121,2128 ---- sc->xl_cdata.xl_tx_head->xl_phys); CSR_WRITE_2(sc, XL_COMMAND, XL_CMD_DOWN_UNSTALL); } + if (opkts != ifp->if_opackets) + sc->xl_wdog_timer = 5; } } *************** *** 2129,2134 **** --- 2132,2138 ---- struct xl_chain *cur_tx = NULL; struct ifnet *ifp = sc->xl_ifp; int idx; + u_long opkts = ifp->if_opackets; XL_LOCK_ASSERT(sc); *************** *** 2158,2163 **** --- 2162,2169 ---- if (sc->xl_cdata.xl_tx_cnt == 0) sc->xl_wdog_timer = 0; + else if (opkts != ifp->if_opackets) + sc->xl_wdog_timer = 5; sc->xl_cdata.xl_tx_cons = idx; if (cur_tx != NULL) >Release-Note: >Audit-Trail: >Unformatted: