Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751561AbdFFUZK (ORCPT ); Tue, 6 Jun 2017 16:25:10 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:39052 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456AbdFFUZJ (ORCPT ); Tue, 6 Jun 2017 16:25:09 -0400 Date: Tue, 06 Jun 2017 16:25:02 -0400 (EDT) Message-Id: <20170606.162502.2115422689850070963.davem@davemloft.net> To: niklas.cassel@axis.com Cc: peppe.cavallaro@st.com, alexandre.torgue@st.com, niklass@axis.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] net: stmmac: fix completely hung TX when using TSO From: David Miller In-Reply-To: <20170606072501.16560-1-niklas.cassel@axis.com> References: <20170606072501.16560-1-niklas.cassel@axis.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 06 Jun 2017 12:43:24 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 716 Lines: 20 From: Niklas Cassel Date: Tue, 6 Jun 2017 09:25:00 +0200 > stmmac_tso_allocator can fail to set the Last Descriptor bit > on a descriptor that actually was the last descriptor. > > This happens when the buffer of the last descriptor ends > up having a size of exactly TSO_MAX_BUFF_SIZE. > > When the IP eventually reaches the next last descriptor, > which actually has the bit set, the DMA will hang. > > When the DMA hangs, we get a tx timeout, however, > since stmmac does not do a complete reset of the IP > in stmmac_tx_timeout, we end up in a state with > completely hung TX. > > Signed-off-by: Niklas Cassel Applied and queued up for -stable, thank you.