From owner-svn-src-head@FreeBSD.ORG Tue Jul 31 16:29: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 2DA0B106566B; Tue, 31 Jul 2012 16:29:34 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) by mx1.freebsd.org (Postfix) with ESMTP id 6C2D18FC18; Tue, 31 Jul 2012 16:29:33 +0000 (UTC) Received: by qabg1 with SMTP id g1so2051057qab.13 for ; Tue, 31 Jul 2012 09:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=hxjC8iR6A4narS15Iv7XaP0vJNWZZVsdVR9UC4vAJys=; b=xfQB4v7jar37RipnlQmGpeYwaNcJZOY2pu1JK8L+/7rJISxGfaHXb2TAi88PAnjaQK Hhvkx6ODB2Zk41ENUBTI0sMXNSNLRWG9qDN68JINJ9+IUp9ecOcAlmdf90VuxcsCroYi dpIK70WHiFGFpZyLFE92+zf4/Ciw15NNdozy/C6C/5Y1veWgIiof35lGxWB07uqNg4tU 8d9X5YgfRGHIGHCcAlh5cp7tsuOqZ//vMHh8opuRECrKok2ri6rMAQVjVOtUCxCAWRCB 3HRzyNtSp5+YXM+1VRUv2CmWVoJa47oj7Ck5skkxQ6B7Dd79cO6JDDxpR77GWSJlHsQT 5WMw== MIME-Version: 1.0 Received: by 10.60.31.165 with SMTP id b5mr24113822oei.58.1343752172798; Tue, 31 Jul 2012 09:29:32 -0700 (PDT) Received: by 10.76.84.7 with HTTP; Tue, 31 Jul 2012 09:29:32 -0700 (PDT) In-Reply-To: References: <201207251128.q6PBSFlt052575@svn.freebsd.org> <5017F614.1010304@zonov.org> <201207311212.21496.jhb@freebsd.org> Date: Tue, 31 Jul 2012 09:29:32 -0700 Message-ID: From: Garrett Cooper To: Jack Vogel Content-Type: text/plain; charset=ISO-8859-1 Cc: Adrian Chadd , src-committers@freebsd.org, John Baldwin , svn-src-all@freebsd.org, Andrey Zonov , Luigi Rizzo , svn-src-head@freebsd.org Subject: Re: svn commit: r238765 - 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: Tue, 31 Jul 2012 16:29:34 -0000 On Tue, Jul 31, 2012 at 9:20 AM, Jack Vogel wrote: > Yes, I agree John, that was ugly, I'm already taking care of it with my > changes, > I'll send you a copy to check out. Like so: --- //depot/user/gcooper/atf-head/src/sys/dev/e1000/if_lem.c 2012-07-25 17:11:00.000000000 0000 +++ /scratch/p4/user/gcooper/atf-head/src/sys/dev/e1000/if_lem.c 2012-07-25 17:11:00.000000000 0000 @@ -1320,9 +1320,10 @@ lem_local_timer, adapter); goto out; } + EM_CORE_UNLOCK(adapter); + lem_rxeof(adapter, -1, NULL); EM_TX_LOCK(adapter); - lem_rxeof(adapter, -1, NULL); lem_txeof(adapter); if (ifp->if_drv_flags & IFF_DRV_RUNNING && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) @@ -1330,8 +1331,8 @@ EM_TX_UNLOCK(adapter); out: - EM_CORE_UNLOCK(adapter); - return; + if (mtx_owned(&adapter->core_mtx)) + EM_CORE_UNLOCK(adapter); } #else /* EM_FAST_IRQ, then fast interrupt routines only */