Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4478238imu; Tue, 18 Dec 2018 16:00:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wd7f7zZYf3ldv6y98qfKiFCyZq4f3zIk85OZQFA0cUqXrXYljiW5dwp96x0MoNJ+5BtNu5 X-Received: by 2002:a63:1e17:: with SMTP id e23mr17369117pge.130.1545177606672; Tue, 18 Dec 2018 16:00:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545177606; cv=none; d=google.com; s=arc-20160816; b=p+Q+m1gMUn68o+iwESHqcccAzIgmTbfpq0u16fA9UxaBzsm1Y3JAzOO+HMoQeeYrQw YR/FT7FZjIB1ZDP3dz3R893YxTStH6JJZKNYtALJge2IoYXk/WRMtuBlyClapua2Fia2 WliCxTNzTOvjTTE/xynbj2UTb3p7U/AnK/2NBedToBXvMyVu20xl2Mka5ZSyV9E7I7+c xAsQdxAlp69m/19bDyei0b7y73BsStSqYpldcxNnli7aDMcvLnQgToBeobutCwfKy3zP U6Bh00wR1xOxAmmZPAOdyyFJ+KPDfwiEoz4T5L/u6ITWxROMGRkphm3dK01WdIL1juVz VuNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=DLfb80ZpQM8cy0i4SuJ7VoJTWnGHaYhSUmRnGJgF3MI=; b=FIouyycM/wqevESTsc4FnhXQu6kXDQNJ+BugR+Sw5C8iIGEHjTXZU+7DcJxW2ColTa feDi9fFdODaEE4XV8d5af9tq60z+mtPRozN4FsNnXwHOVj7ffn+hb5ILa1s/F1GX0pWr mpNeTgtEFxtudTTYH/l4aWyMPWcOXrJRd+zKCDZ08p/3EIixu4xn3SPIW0BrEKTI+OEX gVRUTb97v/t8bW7hE7jtiJ6wa/hFwCuk/29jo7GhL5khbyR3dz4O58lqaUKKqqHrcycs kgc8CsY/KFC6jfb4Q4VLA47TVF/9qPZJEQUKBfYr/UjL2ZvkQZ6HO9pf5Pk2hp+S3gXs J37g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l124si14856673pfl.284.2018.12.18.15.59.50; Tue, 18 Dec 2018 16:00:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727272AbeLRX6J (ORCPT + 99 others); Tue, 18 Dec 2018 18:58:09 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:44678 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727165AbeLRX6J (ORCPT ); Tue, 18 Dec 2018 18:58:09 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::cf9]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 66A2C14884BDC; Tue, 18 Dec 2018 15:58:08 -0800 (PST) Date: Tue, 18 Dec 2018 15:58:07 -0800 (PST) Message-Id: <20181218.155807.980017168804336432.davem@davemloft.net> To: Claudiu.Beznea@microchip.com Cc: Nicolas.Ferre@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] net: macb: restart tx after tx used bit read From: David Miller In-Reply-To: <1545040937-6583-1-git-send-email-claudiu.beznea@microchip.com> References: <1545040937-6583-1-git-send-email-claudiu.beznea@microchip.com> X-Mailer: Mew version 6.8 on Emacs 26.1 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, 18 Dec 2018 15:58:08 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Date: Mon, 17 Dec 2018 10:02:42 +0000 > From: Claudiu Beznea > > On some platforms (currently detected only on SAMA5D4) TX might stuck > even the pachets are still present in DMA memories and TX start was > issued for them. This happens due to race condition between MACB driver > updating next TX buffer descriptor to be used and IP reading the same > descriptor. In such a case, the "TX USED BIT READ" interrupt is asserted. > GEM/MACB user guide specifies that if a "TX USED BIT READ" interrupt > is asserted TX must be restarted. Restart TX if used bit is read and > packets are present in software TX queue. Packets are removed from software > TX queue if TX was successful for them (see macb_tx_interrupt()). > > Signed-off-by: Claudiu Beznea Applied and queued up for -stable, thanks.