From owner-cvs-src@FreeBSD.ORG Thu Jul 17 15:46:53 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B9B8106564A; Thu, 17 Jul 2008 15:46:53 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 623F18FC1E; Thu, 17 Jul 2008 15:46:53 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m6HFkrsG081310; Thu, 17 Jul 2008 15:46:53 GMT (envelope-from gallatin@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m6HFkrK9081309; Thu, 17 Jul 2008 15:46:53 GMT (envelope-from gallatin@repoman.freebsd.org) Message-Id: <200807171546.m6HFkrK9081309@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to gallatin@repoman.freebsd.org using -f From: Andrew Gallatin Date: Thu, 17 Jul 2008 15:46:35 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/mxge if_mxge.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 15:46:53 -0000 gallatin 2008-07-17 15:46:35 UTC FreeBSD src repository Modified files: sys/dev/mxge if_mxge.c Log: SVN rev 180567 on 2008-07-17 15:46:35Z by gallatin Clean up mxge's use of callouts as pointed out by jhb, and handle NIC hardware watchdog resets. - remove buggy code at the top of mxge_tick() which tried to detect a race which is already detected in the kernel's callout code. - move callout_stop() and callout_reset() into mxge_close() mxge_open() rather than doing the callout manipulation all over the place. - use callout_drain(), rather than callout_stop() to prevent a potential race between mxge_tick() and mxge_detach() which could lead to softclock using a destroyed mutex - restructure the mxge_tick() and mxge_watchdog_reset() routines to avoid resetting a callout, and then immediately stopping it if the watchdog reset routine is called, and fails. - enable the driver to handle NIC hardware watchdog resets by restoring the NIC's PCI config space, which is lost when the NIC hardware watchdog triggers. Reviewed by: jhb (previus version) Revision Changes Path 1.50 +19 -36 src/sys/dev/mxge/if_mxge.c