Message ID | 1fecb7aa0b0f0cd01baf67e026e5e134dee9a944.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 68025112C for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 5 Aug 2019 18:00:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AFAF204FF for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 5 Aug 2019 18:00:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BA0728653; Mon, 5 Aug 2019 18:00:37 +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 5DC1526B41 for <patchwork-linux-arm@patchwork.kernel.org>; Mon, 5 Aug 2019 18:00:35 +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=nDbkPZwU3n4VkTmzfFZnvxHfxPjOUWkMTGl7vWCuUA0=; b=Jw1YUCQUIrubw7fyKlepdMS8Mc JPTBSLNjofw0/9rooLSVLa1QNFK1QekxTCY4NQNdIjFyA16G8hlyBtyI+7XhcI+HtA5B/zXxCehAx K9RRZkRudv/I/oJKwAyVU/R25F1X3kl1nDGLHMjI4nXkMrS7pdK+FbvWQri83XdcYEGZj3tDHTZII BfqUDCdfe3fttfraEgSdw0T4prxkfECCVtWvAuHVi3/77SS68bJ8LGDsl3F/Sp5+Boru3xJG0uHog JFOmwwbudHXgOHpl8Kd8mVUBlATlHxaIoxlCbOEkbi5EfCFfPS/w0xqGVSkRT7PJZvS4I2AJRm+mU BrXPfkog==; 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 1huhHY-0003ns-Q5; Mon, 05 Aug 2019 18:00:28 +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 1hug70-0004D5-Rm for linux-arm-kernel@lists.infradead.org; Mon, 05 Aug 2019 16:45:32 +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 03F5EC01BA; Mon, 5 Aug 2019 16:45:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1565023529; bh=rYjim++CJiLw+EAbl+AvTt60t2aTr369J3F6tFoyX0I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=TnLZBD/+fjlowlGSL0D+b0HCrowocEWKqHDnxwQypNa3hR1/gKPsPt3uRB+SM6tM9 Hvt/VZbSkssLR5TfI1AEs5HAXeFCTU063BSJ1na2ZfCjnEg6N0rnFVOUfAUU5tIQbz 7A2j0M24MecgUHWD1zAA73uYKd/rUVZ+Z7n42rYrhhErhLNt6EgK3a60D4ORNftxwM uW+EyUffs0kxLPc60EaVwN+kUWsUOk9a6W9jjjvDrYUiV+/DF6HFu/xVocPstLPmKz vpa+c1k2StMh7Y6i+3IRlZV7p1oRKfHJf+wBYPxLpd7Dmvd8K+kUzujWTS+XyRifQI 7SYumT52YsF+w== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id B2893A0081; 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 12/26] net: stmmac: tc: Do not return a fragment entry Date: Mon, 5 Aug 2019 18:44:39 +0200 Message-Id: <1fecb7aa0b0f0cd01baf67e026e5e134dee9a944.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_094530_932736_F51F072F X-CRM114-Status: GOOD ( 12.83 ) 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/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c index 58ea18af9813..37c0bc699cd9 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -37,7 +37,7 @@ static struct stmmac_tc_entry *tc_find_entry(struct stmmac_priv *priv, entry = &priv->tc_entries[i]; if (!entry->in_use && !first && free) first = entry; - if (entry->handle == loc && !free) + if ((entry->handle == loc) && !free && !entry->is_frag) dup = entry; }
Do not try to return a fragment entry from TC list. Otherwise we may not clean properly allocated entries. 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/stmmac_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)