Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2012 09:29:32 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Jack Vogel <jfvogel@gmail.com>
Cc:        Adrian Chadd <adrian@freebsd.org>, src-committers@freebsd.org, John Baldwin <jhb@freebsd.org>, svn-src-all@freebsd.org, Andrey Zonov <andrey@zonov.org>, Luigi Rizzo <luigi@freebsd.org>, svn-src-head@freebsd.org
Subject:   Re: svn commit: r238765 - head/sys/dev/e1000
Message-ID:  <CAGH67wQGddoNHwQmNrw0J3YspCvn33rWVKzezoi48_9YH%2B9E3A@mail.gmail.com>
In-Reply-To: <CAFOYbck2f5%2B6-8ObjERKEdUo%2Bpw3bx4tqxO1SxngNwuDDC6PLA@mail.gmail.com>
References:  <201207251128.q6PBSFlt052575@svn.freebsd.org> <5017F614.1010304@zonov.org> <CAGH67wSTfQwAZVpYtBQSs0iaZ7RhqLVu3DFVp9R5R7qXMra-RQ@mail.gmail.com> <201207311212.21496.jhb@freebsd.org> <CAFOYbck2f5%2B6-8ObjERKEdUo%2Bpw3bx4tqxO1SxngNwuDDC6PLA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 31, 2012 at 9:20 AM, Jack Vogel <jfvogel@gmail.com> 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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGH67wQGddoNHwQmNrw0J3YspCvn33rWVKzezoi48_9YH%2B9E3A>