From owner-cvs-all Sun Sep 6 07:58:49 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA24373 for cvs-all-outgoing; Sun, 6 Sep 1998 07:58:49 -0700 (PDT) (envelope-from owner-cvs-all) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA24368; Sun, 6 Sep 1998 07:58:48 -0700 (PDT) (envelope-from wpaul@FreeBSD.org) From: Bill Paul Received: (from wpaul@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id HAA29669; Sun, 6 Sep 1998 07:58:47 -0700 (PDT) Date: Sun, 6 Sep 1998 07:58:47 -0700 (PDT) Message-Id: <199809061458.HAA29669@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: cvs commit: src/sys/pci if_xl.c Sender: owner-cvs-all@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk wpaul 1998/09/06 07:58:47 PDT Modified files: sys/pci if_xl.c Log: Patch the transmit error handler to avoid following NULL pointers and generating a trap 12 panic. The code blindly assumed that in the event of a transmit error, the packet that caused the error would still be at the head of the driver's transmit queue (sc->xl_cdata.xl_tx_head). However in the case of error 82 (which indicates that a transmit error occurred after part of the transmit FIFO memory has been reclaimed) this is not true: the TX queue has already been flushed, and the pointer to the head of the queue is NULL, so trying to dereference the pointer to find the transmit descriptor address causes a crash. The code now checks for a NULL pointer before trying to reload the chip's download pointer register. There may still be error messages printed warning of the transmit error, but no panic should occur. Note that this eror code is only generated with "cyclone" chipsets (3c900B, 3c905B, and presumeably the 3c980 server adapter). It should only appear during periods of heavy traffic, probably only on non-switched networks. Problem reported by: Darcy Buskermolen Revision Changes Path 1.10 +4 -3 src/sys/pci/if_xl.c