From nobody Tue Nov 26 06:33:44 2024 Received: from mail03.siengine.com (mail03.siengine.com [43.240.192.165]) (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 D31CA391 for ; Sun, 20 Oct 2024 01:45:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=43.240.192.165 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729388765; cv=none; b=kJxam10vHICbfvKsbOZCOFiqGwTn3eaNLCwZkgegxapaxAxGkL/Xievk3WlS9cg+GXFjPntlsdra2utQgm4G3epysWv68czi+FtJKvpbaxXBw8PG0BDb1I2SzkYqByADzirlyLwjf4s+S1Kg0gddV2bdq1axlrfb3Mv3X63RjJg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729388765; c=relaxed/simple; bh=BujBYmnRAJp3XmojequG3tFaoSP+SIJxRFdXh3/k5SU=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=NjobytbCLpF4G3a6g5gYE12grFvUQr222aWe0ToOso1DFJshISMLfYfxUXP3GDyJo6NtDBz8BD+aNMT16J9iSqdwrSoShlgjJeFVCMM4dxZ/hFy1vG3dlUfvF6dfFkuw/hHQnIWCi8NJz1PpzLETLXPo09VyCnqhtaG2SovF1rw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=siengine.com; spf=pass smtp.mailfrom=siengine.com; arc=none smtp.client-ip=43.240.192.165 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=siengine.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=siengine.com Received: from dsgsiengine01.siengine.com ([10.8.1.61]) by mail03.siengine.com with ESMTPS id 49K1jhgY057326 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 20 Oct 2024 09:45:43 +0800 (+08) (envelope-from hailong.fan@siengine.com) Received: from SEEXMB03-2019.siengine.com (SEEXMB03-2019.siengine.com [10.8.1.33]) by dsgsiengine01.siengine.com (SkyGuard) with ESMTPS id 4XWLqp1QtLz7ZMSJ; Sun, 20 Oct 2024 09:45:42 +0800 (CST) Received: from SEEXMB05-2019.siengine.com (10.8.1.153) by SEEXMB03-2019.siengine.com (10.8.1.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1544.11; Sun, 20 Oct 2024 09:45:42 +0800 Received: from SEEXMB03-2019.siengine.com (10.8.1.33) by SEEXMB05-2019.siengine.com (10.8.1.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1544.9; Sun, 20 Oct 2024 09:45:41 +0800 Received: from SEEXMB03-2019.siengine.com ([fe80::23e0:1bbb:3ec9:73fe]) by SEEXMB03-2019.siengine.com ([fe80::23e0:1bbb:3ec9:73fe%16]) with mapi id 15.02.1544.011; Sun, 20 Oct 2024 09:45:41 +0800 From: =?utf-8?B?RmFuIEhhaWxvbmcv6IyD5rW36b6Z?= To: Andrew Lunn CC: Simon Horman , "2694439648@qq.com" <2694439648@qq.com>, "alexandre.torgue@foss.st.com" , "joabreu@synopsys.com" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "mcoquelin.stm32@gmail.com" , "netdev@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: =?utf-8?B?5Zue5aSNOiDlm57lpI06IFtQQVRDSF0gbmV0OiBzdG1tYWM6IGVuYWJsZSBN?= =?utf-8?Q?AC_after_MTL_configuring?= Thread-Topic: =?utf-8?B?5Zue5aSNOiBbUEFUQ0hdIG5ldDogc3RtbWFjOiBlbmFibGUgTUFDIGFmdGVy?= =?utf-8?Q?_MTL_configuring?= Thread-Index: AQHbHfwmUFDRUPAmP0Op3UD8MH3slLKKOd6AgAF8NlCAAJYugIACmsmw Date: Sun, 20 Oct 2024 01:45:41 +0000 Message-ID: References: <20241017101857.GE1697@kernel.org> <9a11c47e-0cd6-4741-a25b-68538763110a@lunn.ch> In-Reply-To: <9a11c47e-0cd6-4741-a25b-68538763110a@lunn.ch> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Content-Type: multipart/mixed; boundary="_002_daf687938ae1413bbc556134b47d0629sienginecom_" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-DKIM-Results: [10.8.1.61]; dkim=none; X-DNSRBL: X-SPAM-SOURCE-CHECK: pass X-MAIL: mail03.siengine.com 49K1jhgY057326 --_002_daf687938ae1413bbc556134b47d0629sienginecom_ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Hi=20 Please find new patch in attachments, thanks. -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- =E5=8F=91=E4=BB=B6=E4=BA=BA: Andrew Lunn =20 =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9=B410=E6=9C=8819=E6=97=A5 1= :57 =E6=94=B6=E4=BB=B6=E4=BA=BA: Fan Hailong/=E8=8C=83=E6=B5=B7=E9=BE=99 =E6=8A=84=E9=80=81: Simon Horman ; 2694439648@qq.com; ale= xandre.torgue@foss.st.com; joabreu@synopsys.com; davem@davemloft.net; eduma= zet@google.com; kuba@kernel.org; pabeni@redhat.com; mcoquelin.stm32@gmail.c= om; netdev@vger.kernel.org; linux-stm32@st-md-mailman.stormreply.com; linux= -arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org =E4=B8=BB=E9=A2=98: Re: =E5=9B=9E=E5=A4=8D: [PATCH] net: stmmac: enable MAC= after MTL configuring On Fri, Oct 18, 2024 at 01:15:30AM +0000, Fan Hailong/=E8=8C=83=E6=B5=B7=E9= =BE=99 wrote: > Hi >=20 > For example, ETH is directly connected to the switch, which never power d= own and sends broadcast packets at regular intervals.=20 > During the process of opening ETH, data may flow into the MTL FIFO, once = MAC RX is enabled. > and then, MTL will be set, such as FIFO size.=20 > Once enable DMA, There is a certain probability that DMA will read incorr= ect data from MTL FIFO, causing DMA to hang up.=20 > By read DMA_Debug_Status, you can be observed that the RPS remains at a c= ertain value forever.=20 > The correct process should be to configure MAC/MTL/DMA before enabling DM= A/MAC What Simon is asking for is that this is part of the commit message. Please also don't top post. Andrew --- pw-bot: cr --_002_daf687938ae1413bbc556134b47d0629sienginecom_ Content-Type: application/octet-stream; name="0001-net-stmmac-enable-MAC-after-MTL-configuring.patch" Content-Description: 0001-net-stmmac-enable-MAC-after-MTL-configuring.patch Content-Disposition: attachment; filename="0001-net-stmmac-enable-MAC-after-MTL-configuring.patch"; size=4554; creation-date="Sun, 20 Oct 2024 01:43:57 GMT"; modification-date="Sun, 20 Oct 2024 01:42:30 GMT" Content-Transfer-Encoding: base64 RnJvbSA1N2M5MzQ2M2NmNmJlM2ZkMDMwOTE4ZDg0NmVmM2Q2NWM3NTRkMjAxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiAiaGFpbG9uZy5mYW4iIDxoYWlsb25nLmZhbkBzaWVuZ2luZS5j b20+CkRhdGU6IE1vbiwgMTQgT2N0IDIwMjQgMTE6MTk6MTYgKzA4MDAKU3ViamVjdDogW1BBVENI XSBuZXQ6IHN0bW1hYzogZW5hYmxlIE1BQyBhZnRlciBNVEwgY29uZmlndXJpbmcKCkRNQSBtYXli ZSBibG9jayB3aGlsZSBFVEggaXMgb3BlbmluZywKQWRqdXN0IHRoZSBlbmFibGUgc2VxdWVuY2Us IHB1dCB0aGUgTUFDIGVuYWJsZSBsYXN0CgpGb3IgZXhhbXBsZSwgRVR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