From owner-cvs-src-old@FreeBSD.ORG Thu Nov 19 19:26:08 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 787381065672 for ; Thu, 19 Nov 2009 19:26:08 +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 65DC08FC14 for ; Thu, 19 Nov 2009 19:26:08 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nAJJQ8BU042890 for ; Thu, 19 Nov 2009 19:26:08 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nAJJQ8uT042889 for cvs-src-old@freebsd.org; Thu, 19 Nov 2009 19:26:08 GMT (envelope-from jhb@repoman.freebsd.org) Message-Id: <200911191926.nAJJQ8uT042889@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jhb@repoman.freebsd.org using -f From: John Baldwin Date: Thu, 19 Nov 2009 19:25:47 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/pdq if_fea.c if_fpa.c pdq_freebsd.h pdq_ifsubr.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2009 19:26:08 -0000 jhb 2009-11-19 19:25:47 UTC FreeBSD src repository Modified files: sys/dev/pdq if_fea.c if_fpa.c pdq_freebsd.h pdq_ifsubr.c Log: SVN rev 199542 on 2009-11-19 19:25:47Z by jhb Several fixes to these drivers. Note that these two drivers are actually just two different attachments (EISA and PCI) to a single driver. - Add real locking. Previously these drivers only acquired their lock in their interrupt handler or in the ioctl routine (but too broadly in the latter). No locking was used for the stack calling down into the driver via if_init() or if_start(), for device shutdown or detach. Also, the interrupt handler held the driver lock while calling if_input(). All this stuff should be fixed in the locking changes. - Really fix these drivers to handle if_alloc(). The front-end attachments were using if_initname() before the ifnet was allocated. Fix this by moving some of the duplicated logic from each driver into pdq_ifattach(). While here, make pdq_ifattach() return an error so that the driver just fails to attach if if_alloc() fails rather than panic'ing. Also, defer freeing the ifnet until the driver has stopped using it during detach. - Add a new private timer to drive the watchdog timer. - Pass the softc pointer to the interrupt handlers instead of the device_t so we can avoid the use of device_get_softc() and to better match what other drivers do. Revision Changes Path 1.31 +10 -20 src/sys/dev/pdq/if_fea.c 1.29 +10 -20 src/sys/dev/pdq/if_fpa.c 1.14 +5 -1 src/sys/dev/pdq/pdq_freebsd.h 1.32 +89 -31 src/sys/dev/pdq/pdq_ifsubr.c