From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9614C4320A for ; Mon, 16 Aug 2021 10:48:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4FAB61BE1 for ; Mon, 16 Aug 2021 10:48:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235778AbhHPKs0 (ORCPT ); Mon, 16 Aug 2021 06:48:26 -0400 Received: from mga04.intel.com ([192.55.52.120]:4868 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230250AbhHPKsZ (ORCPT ); Mon, 16 Aug 2021 06:48:25 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10077"; a="213987707" X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="213987707" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2021 03:47:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="504848340" Received: from linux.intel.com ([10.54.29.200]) by orsmga001.jf.intel.com with ESMTP; 16 Aug 2021 03:47:53 -0700 Received: from linux.intel.com (vwong3-iLBPG3.png.intel.com [10.88.229.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id DF374580866; Mon, 16 Aug 2021 03:47:49 -0700 (PDT) Date: Mon, 16 Aug 2021 18:47:46 +0800 From: Wong Vee Khee To: Vijayakannan Ayyathurai Cc: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, kuba@kernel.org, mcoquelin.stm32@gmail.com, vee.khee.wong@intel.com, weifeng.voon@intel.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v1 1/3] net: stmmac: fix INTR TBU status affecting irq count statistic Message-ID: <20210816104746.GA9014@linux.intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 16, 2021 at 02:15:58PM +0800, Vijayakannan Ayyathurai wrote: > From: Voon Weifeng > > DMA channel status "Transmit buffer unavailable(TBU)" bit is not > considered as a successful dma tx. Hence, it should not affect > all the irq count statistic. > Acked-by: Wong Vee Khee > Fixes: 1103d3a5531c ("net: stmmac: dwmac4: Also use TBU interrupt to clean TX path") > Signed-off-by: Voon Weifeng > Signed-off-by: Vijayakannan Ayyathurai > --- > drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c > index e63270267578..f83db62938dd 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c > @@ -172,11 +172,12 @@ int dwmac4_dma_interrupt(void __iomem *ioaddr, > x->rx_normal_irq_n++; > ret |= handle_rx; > } > - if (likely(intr_status & (DMA_CHAN_STATUS_TI | > - DMA_CHAN_STATUS_TBU))) { > + if (likely(intr_status & DMA_CHAN_STATUS_TI)) { > x->tx_normal_irq_n++; > ret |= handle_tx; > } > + if (unlikely(intr_status & DMA_CHAN_STATUS_TBU)) > + ret |= handle_tx; > if (unlikely(intr_status & DMA_CHAN_STATUS_ERI)) > x->rx_early_irq++; > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96C1AC4320A for ; Mon, 16 Aug 2021 10:50:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E7A66103A for ; Mon, 16 Aug 2021 10:50:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5E7A66103A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rgiDBlDI1I9J3XkM0YtRxDwazf5UIloCLk8akNoQMFE=; b=LVLbD7JdMGLDUf csYK4gMza6rT4lf0sOcdiouxW9oKTIe3uYeGH0SPZ0MMgA5tvPA4N5M2du9hQRZtxxPlTh5tinoi7 xCAcHKFeIZRTN33SsIiwfotFRU1xBLFOhiTvPtfKV9yey76aohbbVADGEvWixQsRN5m558UhEQ6rc tpLoYLMF1Xvc/6a3Up5AhW44EYH3yrIaqJS3XhWmoc6QsqOCG3hKHjqbb8PFzOCXZoRT5vDSur7pk XTvi3CJXLPVgQJ6Mz7yZcVArKo3vTSTPuP+VgJAbU2d7DTJkBIUEiWlkbGnTaVuyS2U2QIzhCUYvA YYstG3dHkpH7X81kBPWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFa9w-00Giem-Ab; Mon, 16 Aug 2021 10:48:00 +0000 Received: from mga02.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mFa9s-00GieR-Tx for linux-arm-kernel@lists.infradead.org; Mon, 16 Aug 2021 10:47:58 +0000 X-IronPort-AV: E=McAfee;i="6200,9189,10077"; a="203038149" X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="203038149" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2021 03:47:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="504848340" Received: from linux.intel.com ([10.54.29.200]) by orsmga001.jf.intel.com with ESMTP; 16 Aug 2021 03:47:53 -0700 Received: from linux.intel.com (vwong3-iLBPG3.png.intel.com [10.88.229.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id DF374580866; Mon, 16 Aug 2021 03:47:49 -0700 (PDT) Date: Mon, 16 Aug 2021 18:47:46 +0800 From: Wong Vee Khee To: Vijayakannan Ayyathurai Cc: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, kuba@kernel.org, mcoquelin.stm32@gmail.com, vee.khee.wong@intel.com, weifeng.voon@intel.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v1 1/3] net: stmmac: fix INTR TBU status affecting irq count statistic Message-ID: <20210816104746.GA9014@linux.intel.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210816_034757_055023_CF0D84FD X-CRM114-Status: GOOD ( 20.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 16, 2021 at 02:15:58PM +0800, Vijayakannan Ayyathurai wrote: > From: Voon Weifeng > > DMA channel status "Transmit buffer unavailable(TBU)" bit is not > considered as a successful dma tx. Hence, it should not affect > all the irq count statistic. > Acked-by: Wong Vee Khee > Fixes: 1103d3a5531c ("net: stmmac: dwmac4: Also use TBU interrupt to clean TX path") > Signed-off-by: Voon Weifeng > Signed-off-by: Vijayakannan Ayyathurai > --- > drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c > index e63270267578..f83db62938dd 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c > @@ -172,11 +172,12 @@ int dwmac4_dma_interrupt(void __iomem *ioaddr, > x->rx_normal_irq_n++; > ret |= handle_rx; > } > - if (likely(intr_status & (DMA_CHAN_STATUS_TI | > - DMA_CHAN_STATUS_TBU))) { > + if (likely(intr_status & DMA_CHAN_STATUS_TI)) { > x->tx_normal_irq_n++; > ret |= handle_tx; > } > + if (unlikely(intr_status & DMA_CHAN_STATUS_TBU)) > + ret |= handle_tx; > if (unlikely(intr_status & DMA_CHAN_STATUS_ERI)) > x->rx_early_irq++; > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel