From owner-cvs-all@FreeBSD.ORG Fri Apr 25 02:01:55 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F46E37B401; Fri, 25 Apr 2003 02:01:55 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DFA143FBD; Fri, 25 Apr 2003 02:01:55 -0700 (PDT) (envelope-from njl@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3P91s0U081387; Fri, 25 Apr 2003 02:01:54 -0700 (PDT) (envelope-from njl@repoman.freebsd.org) Received: (from njl@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3P91sDQ081382; Fri, 25 Apr 2003 02:01:54 -0700 (PDT) Message-Id: <200304250901.h3P91sDQ081382@repoman.freebsd.org> From: Nate Lawson Date: Fri, 25 Apr 2003 02:01:54 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/fxp if_fxp.c if_fxpvar.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Apr 2003 09:01:55 -0000 njl 2003/04/25 02:01:54 PDT FreeBSD src repository Modified files: sys/dev/fxp if_fxp.c if_fxpvar.h Log: Make fxp(4) INTR_MPSAFE (but do not enable MPSAFE just yet): - Add fxp_start_body() and change fxp_start() to just acquire locks and then call fxp_start_body(). Places that would call fxp_start() with locks held (mutex recursion) now call fxp_start_body() directly. Remove MTX_RECURSE flag from sc_mtx. [gallatin] - Change fxp_attach() to work without the softc lock, saving interrupt hooking until the head of fxp_attach(). - Call ether_ifattach() before overriding ifp parameters. This reverts part of 1.155. - Remove multiple error paths in fxp_attach(). - Teardown interrupt in fxp_detach() before unlocking the softc. - Make sure mutex is not held in fxp_release() - Delete the miibus instance and/or self in fxp_release(), not in fxp_detach(). This can happen if attach fails partway through. - Move ifmedia_removeall to fxp_release() since attach may fail after media have been allocated. - Add locking to fxp_suspend, fxp_resume, fxp_start, fxp_intr, fxp_poll, fxp_tick, fxp_ioctl, fxp_watchdog. - Pass in ifp to fxp_intr_body since its callers sometimes already use it. - Add compatibility define for INTR_MPSAFE for 4.x. [gallatin] - You don't need to bzero softc. Ideas from: gallatin, mux Tested by: >400M packets of dd/ssh, NFS, ping on i386 UP Revision Changes Path 1.174 +131 -51 src/sys/dev/fxp/if_fxp.c 1.25 +3 -0 src/sys/dev/fxp/if_fxpvar.h