Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752256AbbKKTRL (ORCPT ); Wed, 11 Nov 2015 14:17:11 -0500 Received: from unicorn.mansr.com ([81.2.72.234]:45142 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751013AbbKKTRJ convert rfc822-to-8bit (ORCPT ); Wed, 11 Nov 2015 14:17:09 -0500 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: David Miller Cc: romieu@fr.zoreil.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, slash.tmp@free.fr Subject: Re: [PATCH v5] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller References: <20151111.140252.2214540370641368590.davem@davemloft.net> <20151111.141311.1893172622045238748.davem@davemloft.net> Date: Wed, 11 Nov 2015 19:17:07 +0000 In-Reply-To: <20151111.141311.1893172622045238748.davem@davemloft.net> (David Miller's message of "Wed, 11 Nov 2015 14:13:11 -0500 (EST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1147 Lines: 34 David Miller writes: > From: M?ns Rullg?rd > Date: Wed, 11 Nov 2015 19:09:19 +0000 > >> David Miller writes: >> >>> From: M?ns Rullg?rd >>> Date: Wed, 11 Nov 2015 18:25:05 +0000 >>> >>>> If the TX DMA channel is idle when start_xmit is called, it can be >>>> started immediately. Checking the DMA status and starting it if >>>> idle has to be done atomically somehow. >>> >>> ->ndo_start_xmit() is guaranteed to be invoked atomically, protected >>> by the TX queue spinlock. >> >> Yes, but the DMA needs to be restarted from some other context if it was >> busy when start_xmit checked. > > Then you can probably use the TXQ lock in the interrupt handler just for > that. That seems a bit heavy-handed when the critical section for this is only a tiny part of the start_xmit function. -- M?ns Rullg?rd mans@mansr.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/