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=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 DA7FAC41514 for ; Wed, 4 Sep 2019 13:17:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3B5323402 for ; Wed, 4 Sep 2019 13:17:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="TTl1bzQi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730521AbfIDNRe (ORCPT ); Wed, 4 Sep 2019 09:17:34 -0400 Received: from dc2-smtprelay2.synopsys.com ([198.182.61.142]:33594 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730452AbfIDNRR (ORCPT ); Wed, 4 Sep 2019 09:17:17 -0400 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 78F4EC5740; Wed, 4 Sep 2019 13:17:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1567603037; bh=KtB3Uov2hN4nf9kUa8PMFbl3ixv9iikyZQaPSyHRMNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=TTl1bzQi9wafn8aTGF4cwQ9XIZVRroMxpt87Sjf3ljSSbsf0iCqDT2n1K6IS0hT+c J4N7o59AmdUA/+UXlEL8VKjexhaVnohJ8i1zrk3UMC/oD09gqs0+jdqwn3y492O1RS wlORvU6iAUiZVrFvzgsJFNo0LSwXhoWKU9iU8HRpYKk3xazRjGoIrIreOWWiqIQv54 7Nqw5Z/QWWVQE9/HHd+XUXhryWhsjFJRCGykyZteitT8r6OPbBWPP3fMjnwOD6CT4f 6QRvkZXrcv9qdruoS+mLADL/hkbjD2rN7V85sM8JqiDijCk4o3E/tjbMWbQ/HX0DsO c4a/kac5Ft5Zw== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id 2888FA0066; Wed, 4 Sep 2019 13:17:12 +0000 (UTC) From: Jose Abreu To: netdev@vger.kernel.org Cc: Joao Pinto , Jose Abreu , Giuseppe Cavallaro , Alexandre Torgue , "David S. Miller" , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 net-next 02/13] net: stmmac: xgmac: Add RBU handling in DMA interrupt Date: Wed, 4 Sep 2019 15:16:54 +0200 Message-Id: <42759cafe734764d692597437835b42eec66e059.1567602867.git.joabreu@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the handling of Receive Buffer Unavailable interrupt in the DMA handler of XGMAC cores. Signed-off-by: Jose Abreu --- Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: "David S. Miller" Cc: Maxime Coquelin Cc: netdev@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c index 64956465c030..e77eb0ddf9b5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c @@ -322,6 +322,10 @@ static int dwxgmac2_dma_interrupt(void __iomem *ioaddr, /* ABNORMAL interrupts */ if (unlikely(intr_status & XGMAC_AIS)) { + if (unlikely(intr_status & XGMAC_RBU)) { + x->rx_buf_unav_irq++; + ret |= handle_rx; + } if (unlikely(intr_status & XGMAC_TPS)) { x->tx_process_stopped_irq++; ret |= tx_hard_error; -- 2.7.4