From owner-cvs-all@FreeBSD.ORG Mon Jun 2 19:17:55 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 366ED106566C; Mon, 2 Jun 2008 19:17:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 37B038FC13; Mon, 2 Jun 2008 19:17:55 +0000 (UTC) (envelope-from jhb@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 m52JHteg097381; Mon, 2 Jun 2008 19:17:55 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m52JHtuc097380; Mon, 2 Jun 2008 19:17:55 GMT (envelope-from jhb@repoman.freebsd.org) Message-Id: <200806021917.m52JHtuc097380@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jhb@repoman.freebsd.org using -f From: John Baldwin Date: Mon, 2 Jun 2008 19:17:40 +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/ie if_ie.c if_ie_isa.c if_ievar.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 02 Jun 2008 19:17:55 -0000 jhb 2008-06-02 19:17:55 UTC FreeBSD src repository Modified files: sys/dev/ie if_ie.c if_ie_isa.c if_ievar.h Log: SVN rev 179491 on 2008-06-02 19:17:40Z by jhb Make ie(4) MPSAFE: - Add a mutex to the softc and use it to protect the softc and device. - Setup the interrupt handler in the common code instead of in each front end and do it after ether_ifattach(). - Use ie_stop() and ieinit_locked() in iereset() rather than frobbing IFF_UP and invoking ieioctl(). - Use DELAY() to implement a spin loop on a register with a timeout rather than scheduling a timeout and then doing a tight spin on the register. In the non-MPSAFE case this would never have worked because the spinning code held Giant and the timeout routine would have been blocked on Giant forever. The same approach would not worke in the MPSAFE case either for the same reason, hence use a loop around DELAY(). - Clear IFF_DRV_(RUNNING|OACTIVE) in ie_stop() rather than in callers. - Call ieinit_locked() directly rather than ieioctl(!) from ie_mc_reset(). - Don't leak the rx frame buffer on detach. Tested by: Thierry Herbelot thierry of herbelot.com Revision Changes Path 1.109 +69 -60 src/sys/dev/ie/if_ie.c 1.8 +0 -21 src/sys/dev/ie/if_ie_isa.c 1.5 +6 -0 src/sys/dev/ie/if_ievar.h