From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751021AbcEIDnD (ORCPT ); Sun, 8 May 2016 23:43:03 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:53769 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905AbcEIDnB (ORCPT ); Sun, 8 May 2016 23:43:01 -0400 Date: Sun, 08 May 2016 23:42:56 -0400 (EDT) Message-Id: <20160508.234256.359620681931531068.davem@davemloft.net> To: wxt@rock-chips.com Cc: heiko@sntech.de, linux-rockchip@lists.infradead.org, sy.w@outlook.com, al.kochet@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: arc/emac: Move arc_emac_tx_clean() into arc_emac_tx() and disable tx interrut From: David Miller In-Reply-To: <1462537156-10489-1-git-send-email-wxt@rock-chips.com> References: <1462537156-10489-1-git-send-email-wxt@rock-chips.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]); Sun, 08 May 2016 20:43:00 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Caesar Wang Date: Fri, 6 May 2016 20:19:16 +0800 > Doing tx_clean() inside poll() may scramble the tx ring buffer if > tx() is running. This will cause tx to stop working, which can be > reproduced by simultaneously downloading two large files at high speed. > > Moving tx_clean() into tx() will prevent this. And tx interrupt is no > longer needed now. TX completion work is always recommended to be done in the ->poll() handler. Fix the race or whatever bug there is rather than working around it, and regressing the driver, by handling TX completion in the interrupt handler. Thanks.