From owner-svn-src-head@FreeBSD.ORG Sat Mar 24 15:15:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8DA01065673; Sat, 24 Mar 2012 15:15:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A45238FC1E; Sat, 24 Mar 2012 15:15:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2OFFYc9037677; Sat, 24 Mar 2012 15:15:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2OFFY70037675; Sat, 24 Mar 2012 15:15:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201203241515.q2OFFY70037675@svn.freebsd.org> From: Marius Strobl Date: Sat, 24 Mar 2012 15:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233423 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2012 15:15:34 -0000 Author: marius Date: Sat Mar 24 15:15:34 2012 New Revision: 233423 URL: http://svn.freebsd.org/changeset/base/233423 Log: Initialize the mutexes used for the NVM and the swflag as MTX_DUPOK in order to avoid otherwise harmless witness warnings when these are acquired at the same time and due to both using MTX_NETWORK_LOCK as their type. The right fix actually would be to use different, descriptive types for these. However, the latter would require undesirable changes to the shared code base. Another approach would be to just supply NULL as the type, which was deemed as less desirable though as it would cause the unique but cryptic name also to be used for the type and to diverge from the type used by other network device drivers. MFC after: 1 week Modified: head/sys/dev/e1000/e1000_osdep.h Modified: head/sys/dev/e1000/e1000_osdep.h ============================================================================== --- head/sys/dev/e1000/e1000_osdep.h Sat Mar 24 13:37:57 2012 (r233422) +++ head/sys/dev/e1000/e1000_osdep.h Sat Mar 24 15:15:34 2012 (r233423) @@ -84,7 +84,8 @@ /* Mutex used in the shared code */ #define E1000_MUTEX struct mtx #define E1000_MUTEX_INIT(mutex) mtx_init((mutex), #mutex, \ - MTX_NETWORK_LOCK, MTX_DEF) + MTX_NETWORK_LOCK, \ + MTX_DEF | MTX_DUPOK) #define E1000_MUTEX_DESTROY(mutex) mtx_destroy(mutex) #define E1000_MUTEX_LOCK(mutex) mtx_lock(mutex) #define E1000_MUTEX_TRYLOCK(mutex) mtx_trylock(mutex)