From owner-freebsd-bugs Mon Jan 29 17:40:18 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id RAA04710 for bugs-outgoing; Mon, 29 Jan 1996 17:40:18 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id RAA04663 Mon, 29 Jan 1996 17:40:11 -0800 (PST) Resent-Date: Mon, 29 Jan 1996 17:40:11 -0800 (PST) Resent-Message-Id: <199601300140.RAA04663@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, smpatel@xi.dorm.umd.edu Received: from xi.dorm.umd.edu (xi.dorm.umd.edu [129.2.152.45]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id RAA03634 for ; Mon, 29 Jan 1996 17:31:10 -0800 (PST) Received: (from smpatel@localhost) by xi.dorm.umd.edu (8.6.12/8.6.12) id UAA11903; Mon, 29 Jan 1996 20:30:58 -0500 Message-Id: <199601300130.UAA11903@xi.dorm.umd.edu> Date: Mon, 29 Jan 1996 20:30:58 -0500 From: smpatel@wam.umd.edu Reply-To: smpatel@xi.dorm.umd.edu To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/980: Lance device timeout causes panic [patch] Sender: owner-bugs@freebsd.org Precedence: bulk >Number: 980 >Category: kern >Synopsis: Lance device timeout causes panic [patch] >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 29 17:40:05 PST 1996 >Last-Modified: >Originator: Sujal Patel >Organization: >Release: FreeBSD FreeBSD 2.2-CURRENT i386 >Environment: 2.2-CURRENT, if_lnc.c v1.19 >Description: version 1.18 of if_lnc.c reversed davidg's changes in 1.15. This causes Lance timeouts to panic the system. >How-To-Repeat: >Fix: --- if_lnc.c Fri Jan 26 04:48:39 1996 +++ /xi2/smpatel/usr/src/sys-new/i386/isa/if_lnc.c Sun Jan 28 23:27:20 1996 @@ -151,7 +151,7 @@ static struct mbuf *chain_to_cluster __P((struct mbuf *m)); static void lnc_start __P((struct ifnet *ifp)); static int lnc_ioctl __P((struct ifnet *ifp, int command, caddr_t data)); -static void lnc_watchdog __P((int unit)); +static void lnc_watchdog __P((struct ifnet *ifp)); #ifdef DEBUG static void lnc_dump_state __P((int unit)); static void mbuf_dump_chain __P((struct mbuf *m)); @@ -1749,12 +1749,12 @@ } static void -lnc_watchdog(int unit) +lnc_watchdog(ifp) + struct ifnet *ifp; { - struct lnc_softc *sc = &lnc_softc[unit]; - log(LOG_ERR, "lnc%d: Device timeout -- Resetting\n", unit); - ++sc->arpcom.ac_if.if_oerrors; - lnc_reset(unit); + log(LOG_ERR, "lnc%d: Device timeout -- Resetting\n", ifp->if_unit); + ifp->if_oerrors++; + lnc_reset(ifp->if_unit); } #ifdef DEBUG >Audit-Trail: >Unformatted: