Message ID | acf41d185ca9d8ff03a09ef7c4b11dff1f9fac9f.1565022597.git.joabreu@synopsys.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA22E1850 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 5 Aug 2019 16:46:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8C0928932 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 5 Aug 2019 16:46:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B97F92893D; Mon, 5 Aug 2019 16:46:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 64B2F28932 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 5 Aug 2019 16:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=04e9nYyN9Uxlr/uNaFVSwyzrkeTjSsTO1RcF8e7K5HY=; b=gRTQoGYgdX5fkRu/YDIqx4bQGw LtN9wvCQmZBrBaQh/89HH6ByRJKgYkfhlqhpTjZHpGnApAmu9BXAyivs7G3klnSmDXmkLVlegHIjC /HxDkcTYJF7/385vxVnmFG2vZn3A9pr1ELBflKjIyPgpjwZ5QysD7huZim6opBg5bJUc4kMaPit2L Xd9oaQD4ug9CZ+/H57BrFtRgKUE25gtyHr0JR0TJTs5v1O1e6OmUh69VF4plcXVn8jALIEYulz0e6 tKAT4K4dwpqEw+M41Aa6WJ9xchTzEsilGqsqjXolxdxUziSDOSs2DOpRY5b/ym9+Rw4aOb3jeudhm UNZ6MGNg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hug8M-0005Mk-S2; Mon, 05 Aug 2019 16:46:54 +0000 Received: from dc8-smtprelay2.synopsys.com ([198.182.47.102] helo=smtprelay-out1.synopsys.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hug71-0004DB-H1 for linux-arm-kernel@lists.infradead.org; Mon, 05 Aug 2019 16:45:36 +0000 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 33464C01C4; Mon, 5 Aug 2019 16:45:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1565023529; bh=NrkjBg6jc1K2ARfPhxACOi8SqSjENTAt9JXKPTjf/tU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=Z45Bm+cQEJYQ+jdohaynKGXmOYfosf5mALndcBsGfg15iqK27mqK5LF+0UffUxqlJ wglGHKD0Qz6AzaiQmHFpmd3xv6mWzAUIloMF4bNOnHQ5PIjBkYjpr+KXas8rQ8SCIt 7+OSVcLpXVqGuf5RH7ZDQDZbKab2Zf/c8xVzE57+8fW5mY0WF8QGZm62jw143MFrcP tyzYNo2Nfm+bjfVujK3fh88AMxyjS+maqf1tHR7SxYaMY8LrAepNdRsjENeyagOWwr f8CM3dsZwSWeXQNKXfsMydiA//qDu8Aq94OdQUUF2nmD3nmWHQN2haLKToG+b4FaBn d/J23R1L9fvZw== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id ED1F8A008D; Mon, 5 Aug 2019 16:45:27 +0000 (UTC) From: Jose Abreu <Jose.Abreu@synopsys.com> To: netdev@vger.kernel.org Subject: [PATCH net-next 16/26] net: stmmac: xgmac: Correctly return that RX descriptor is not last one Date: Mon, 5 Aug 2019 18:44:43 +0200 Message-Id: <acf41d185ca9d8ff03a09ef7c4b11dff1f9fac9f.1565022597.git.joabreu@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <cover.1565022597.git.joabreu@synopsys.com> References: <cover.1565022597.git.joabreu@synopsys.com> In-Reply-To: <cover.1565022597.git.joabreu@synopsys.com> References: <cover.1565022597.git.joabreu@synopsys.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190805_094531_569153_3DBB9380 X-CRM114-Status: GOOD ( 12.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Jose Abreu <Jose.Abreu@synopsys.com>, Joao Pinto <Joao.Pinto@synopsys.com>, Alexandre Torgue <alexandre.torgue@st.com>, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Giuseppe Cavallaro <peppe.cavallaro@st.com>, "David S. Miller" <davem@davemloft.net>, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
net: stmmac: Misc improvements for XGMAC
|
expand
|
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c index d70a90c12dbc..bae8bd41a769 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c @@ -26,16 +26,15 @@ static int dwxgmac2_get_rx_status(void *data, struct stmmac_extra_stats *x, struct dma_desc *p) { unsigned int rdes3 = le32_to_cpu(p->des3); - int ret = good_frame; if (unlikely(rdes3 & XGMAC_RDES3_OWN)) return dma_own; if (likely(!(rdes3 & XGMAC_RDES3_LD))) + return rx_not_ls; + if (unlikely((rdes3 & XGMAC_RDES3_ES) && (rdes3 & XGMAC_RDES3_LD))) return discard_frame; - if (unlikely(rdes3 & XGMAC_RDES3_ES)) - ret = discard_frame; - return ret; + return good_frame; } static int dwxgmac2_get_tx_len(struct dma_desc *p)
Return the correct value when RX descriptor is not the last one. Signed-off-by: Jose Abreu <joabreu@synopsys.com> --- Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Cc: Jose Abreu <joabreu@synopsys.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> 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_descs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)