Message ID | b365dc6f756a3fad4dfaa2675c98f4078aba8a55.1706105494.git.esben@geanix.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-37206-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp1047159dyi; Wed, 24 Jan 2024 07:05:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGVRwpnOZRViBNSDxKW5++OTBDCts3X5bX3c+9bIxmL7Gg3D0BRM0MyBsyft2qSPIj38clg X-Received: by 2002:a05:6a00:2e8c:b0:6da:d8d5:bd4e with SMTP id fd12-20020a056a002e8c00b006dad8d5bd4emr9674371pfb.49.1706108725830; Wed, 24 Jan 2024 07:05:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706108725; cv=pass; d=google.com; s=arc-20160816; b=YUJXU8aYPMTDh7xkVvV9nqsetenyUcR+e1Y1/vi9VT65HeLJ0K7ab0EudYulQmYJg2 K4+TrsYm57KAN3ODqy42KYOGyn3VPpFv0V2093yN9s0PmBMRQjITL320AFUSrxWgPUKG k9wGv+MyroZv7tyRxtIS75XXctWLb/57eykasV+G6IDRaQsxaQzP83A0gBsaGmRyCp6B fQl1fxZv4g8Q9l3uJhGhfPLm2zyHfOuf8u6d6tqJMVPV5vVFd5GXsnuzo2dHavT97V7U OCtm0Viuk6tDIwxaV72VqvV0k6RoyXIV0fRqIUp9HQyca6Ah5A8xCZWHV6VXh1KqmnZN E/NQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=s48UK9/txojh0jP006gnClU0QGtWU0AZknMA7NCP1qs=; fh=2x4H3mnHsZu0089dw7Q2M7bPaxEKZSPHIaywJCTlaxs=; b=el0JHqmgjZTRlTgPkJWSo4vUErF6AwCNG8gjQmvLcrEJD7xrNOqU1UzUW66ehD8dKz KGJ0JDKVEeIBqp0zVaAFz8sX9qIgQC/fd4WQeT4do/+LX7F8dRpsHRV76ekxuCZFX7ty JD2axDGnbaS/uYcTRBfWKxDWWoMGA+LW93RecOm9EhxHCTNYBOTkbPEymlsBd817hDkt 5lxyieikGiPKfKL7inTmftxh3Wz4oj2tK+iK2thkNRHsxx//3cOSmCEdtG1SaIV+FiXW sUT4L4hOUjnxQTtwTm46qTEdC0Mir9kJtJtYvapjnuaSJrK2chxWAD1173AXNHpFPa6a MQKA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@geanix.com header.s=default2211 header.b=X6wbqruh; arc=pass (i=1 spf=pass spfdomain=geanix.com dkim=pass dkdomain=geanix.com dmarc=pass fromdomain=geanix.com); spf=pass (google.com: domain of linux-kernel+bounces-37206-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37206-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=geanix.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a10-20020aa7864a000000b006dab11fc4fesi13914475pfo.244.2024.01.24.07.05.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 07:05:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37206-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@geanix.com header.s=default2211 header.b=X6wbqruh; arc=pass (i=1 spf=pass spfdomain=geanix.com dkim=pass dkdomain=geanix.com dmarc=pass fromdomain=geanix.com); spf=pass (google.com: domain of linux-kernel+bounces-37206-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37206-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=geanix.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0E3B329D4AD for <ouuuleilei@gmail.com>; Wed, 24 Jan 2024 14:56:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 224D77C0A6; Wed, 24 Jan 2024 14:51:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="X6wbqruh" Received: from www530.your-server.de (www530.your-server.de [188.40.30.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB84323C9; Wed, 24 Jan 2024 14:51:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=188.40.30.78 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706107889; cv=none; b=e2LBfMknXpok0VWdvJCwahO5nr56ZhePnwBFVf/TD+0Q3FjgXoSf+WQORxg4tZd3quHklYd7up7dd4oF1oOGlIUu4wDUjqmTlh3ryrVpgg4thcUwenNWr3HtVnUkO2dnx6lqSMK/ncWfab/1Tc/7OyRBEqXSeboezcg/UXLhQQc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706107889; c=relaxed/simple; bh=24wJJWVUh2cZb1nXQXw4kmreJhJJdyXf+GeakqvGMdY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EEEPdYI1vRDAkO/KUnsfGs6J8mx02qniAdGXqrfpJH0K+CdzPjovQd520B/VS4tgdvQVC32zfbPSN/ZJzW4ShiJCbW8PdnWsc51CW1o4HwalDCHCWar3MMtis1X4a6mYspj111+RW3hXzntxTQHm2igQabwZMGv9wmNUgQLTIwE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=geanix.com; spf=pass smtp.mailfrom=geanix.com; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b=X6wbqruh; arc=none smtp.client-ip=188.40.30.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=geanix.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=geanix.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=geanix.com; s=default2211; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date: Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=s48UK9/txojh0jP006gnClU0QGtWU0AZknMA7NCP1qs=; b=X6wbqruhAC9y80cXiNvdROZnFE slorrNyyr70EfUee+kPi1OzkuDOHpdN1b+iXK95JJ7d04D7rqY5sGiZS/Hzq9Uk0yyk/ofm9SHaV7 Zybr9hEvECyWPnkrui/U2iGj4W4B+0xtuzYI/cfufrKSOLZ7MLjicm6lgTSeIRq9+BC4NIaSGjfe/ 65m9cGr+KUz2Tk/eVAhtH8ZMal8vWAfmupnLtX+CHewTTCuz7GGLwOjTrRGLKK7Px3H5WEcn04cjX MQMqSuarP3Fs9fOZc984VQbsTPH1Roq2kk44sRaM5Phl9iIePsVrEYWUXJHRx1fpb7KJ1H0Qlcx7c 0lrqTswQ==; Received: from sslproxy01.your-server.de ([78.46.139.224]) by www530.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <esben@geanix.com>) id 1rSeJF-000NYX-2A; Wed, 24 Jan 2024 15:32:57 +0100 Received: from [87.49.43.79] (helo=localhost) by sslproxy01.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <esben@geanix.com>) id 1rSeJE-0006ur-80; Wed, 24 Jan 2024 15:32:56 +0100 From: Esben Haabendal <esben@geanix.com> To: netdev@vger.kernel.org, Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <joabreu@synopsys.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Christian Marangi <ansuelsmth@gmail.com> Cc: stable@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] net: stmmac: do not clear TBS enable bit on link up/down Date: Wed, 24 Jan 2024 15:32:55 +0100 Message-ID: <b365dc6f756a3fad4dfaa2675c98f4078aba8a55.1706105494.git.esben@geanix.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-Sender: esben@geanix.com X-Virus-Scanned: Clear (ClamAV 0.103.10/27164/Wed Jan 24 10:45:32 2024) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788984663265698841 X-GMAIL-MSGID: 1788984663265698841 |
Series |
[1/3] net: stmmac: do not clear TBS enable bit on link up/down
|
|
Commit Message
Esben Haabendal
Jan. 24, 2024, 2:32 p.m. UTC
With the dma conf being reallocated on each call to stmmac_open(), any
information in there is lost, unless we specifically handle it.
The STMMAC_TBS_EN bit is set when adding an etf qdisc, and the etf qdisc
therefore would stop working when link was set down and then back up.
Fixes: ba39b344e924 ("net: ethernet: stmicro: stmmac: generate stmmac dma conf before open")
Cc: stable@vger.kernel.org
Signed-off-by: Esben Haabendal <esben@geanix.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index a0e46369ae15..691bf3ef5e30 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3932,6 +3932,9 @@ static int __stmmac_open(struct net_device *dev, priv->rx_copybreak = STMMAC_RX_COPYBREAK; buf_sz = dma_conf->dma_buf_sz; + for (int i = 0; i < MTL_MAX_TX_QUEUES; i++) + if (priv->dma_conf.tx_queue[i].tbs & STMMAC_TBS_EN) + dma_conf->tx_queue[i].tbs = priv->dma_conf.tx_queue[i].tbs; memcpy(&priv->dma_conf, dma_conf, sizeof(*dma_conf)); stmmac_reset_queues_param(priv);