From mboxrd@z Thu Jan 1 00:00:00 1970 From: Niklas Cassel Subject: Re: [PATCH net-next] net: stmmac: fix broken dma_interrupt handling for multi-queues Date: Fri, 8 Dec 2017 00:57:45 +0100 Message-ID: <20171207235745.GA15639@axis.com> References: <20171207225610.15572-1-niklas.cassel@axis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Joao.Pinto@synopsys.com, Giuseppe Cavallaro , Alexandre Torgue , Jose.Abreu@synopsys.com Return-path: Content-Disposition: inline In-Reply-To: <20171207225610.15572-1-niklas.cassel@axis.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Thu, Dec 07, 2017 at 11:56:10PM +0100, Niklas Cassel wrote: > Since each DMA channel can be used for rx and tx simultaneously, > the current code should probably be rewritten so that napi_struct is > embedded in a new struct stmmac_channel. > That way, stmmac_poll() can call stmmac_tx_clean() on just the tx queue > where we got the IRQ, instead of looping through all tx queues. > This is also how the xgbe driver does it (another driver for this IP). Did anyone at Synopsys ever try this driver with a device tree where num tx queues != num rx queues? I know your hardware has 8 rx queues and 8 tx queues, but that doesn't mean that you have to enable them all. After fixing this crash, I'm still seeing tx timeouts with multi-queue device trees. (At Axis we usually only enable 1 tx queue and 1 rx queue). The multi-queue code seems a bit messy.. refactoring so that napi_struct is in a struct stmmac_channel might help you guys with overall code readability, since this would then actually match how the hardware works. With the xgbe driver, xgbe_one_poll disable tx+rx irqs for a specific channel, then calls futher function only with that specific channel. With the stmmac driver, there is no connection between napi_struct and tx. Disable irqs for tx? stmmac_poll loops through all tx queues :)