๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #7038

Re: [PATCH net-next v4 6/7] net: ftgmac100: Add AST2700 upper DMA address support

#7038
From: netdev-bot+sashiko
Date: Sat, 24 Oct 2026 12:14
70 lines
10532 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The descriptor struct comments are now wrong.

--

net: ftgmac100: Add AST2700 upper DMA address support

This patch programs the high RX and TX descriptor ring base registers on
AST2700. It also stores DMA address bits 34:32 in bits 18:16 of txdes2 and
rxdes2, and requests a 35-bit DMA mask. All of the extended address
handling is gated by a new FTGMAC100_QUIRK_DMA_35BIT match-data quirk.

> diff --git a/drivers/net/ethernet/faraday/ftgmac100.h b/drivers/net/ethernet/faraday/ftgmac100.h
> index 8c35c895b1465..0c244b1c0a351 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.h
> +++ b/drivers/net/ethernet/faraday/ftgmac100.h

[ ... ]

> @@ -226,6 +229,7 @@ struct ftgmac100_txdes {
>  #define FTGMAC100_TXDES1_TX2FIC		(1 << 30)
>  #define FTGMAC100_TXDES1_TXIC		(1 << 31)
>  
> +#define FTGMAC100_TXDES2_TXBUF_BADR_HI	GENMASK(18, 16)

[Severity: Low]
This isn't a bug, but the descriptor struct comments just above this hunk
no longer match the new layout:

struct ftgmac100_txdes {
	__le32	txdes0; /* Control & status bits */
	__le32	txdes1; /* Irq, checksum and vlan control */
	__le32	txdes2; /* Reserved */
	__le32	txdes3; /* DMA buffer address */
} __attribute__ ((aligned(16)));

With FTGMAC100_QUIRK_DMA_35BIT set, ftgmac100_hard_start_xmit() now writes
buffer address bits 34:32 into txdes2 for both head and fragment
descriptors. ftgmac100_free_tx_packet() reads them back to rebuild the
unmap address, and txdes3 only holds the low 32 bits.

struct ftgmac100_rxdes has the same problem. rxdes3 is still described as
the full "DMA buffer address", and rxdes2 is only described as
"length/type on AST2500".

Could the comments for txdes2/txdes3 and rxdes2/rxdes3 be updated? It
might also help to note on the new GENMASK defines that they only apply
to the 35-bit (AST2700) layout. Otherwise a future descriptor writer or
reset path could treat txdes2 as reserved and drop the upper address
bits.

>  /*
>   * Receive descriptor, aligned to 16 bytes
>   */
> @@ -272,4 +276,6 @@ struct ftgmac100_rxdes {
>  #define FTGMAC100_RXDES1_UDP_CHKSUM_ERR	(1 << 26)
>  #define FTGMAC100_RXDES1_IP_CHKSUM_ERR	(1 << 27)
>  
> +#define FTGMAC100_RXDES2_RXBUF_BADR_HI	GENMASK(18, 16)
> +
>  #endif /* __FTGMAC100_H */

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261020-support_ast2700-v4-0-4d36b40939b3%40aspeedtech.com
Technical Details
Message-ID: <179284409298.3134.2544700895306550156@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351366-linux-kernel-netdev=dewy.ru
References: <20261020-support_ast2700-v4-6-4d36b40939b3@aspeedtech.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-351366-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v4 6/7] net: ftgmac100: Add AST2700 upper DMA
 address support
Date: Sat, 24 Oct 2026 12:14:52 +0000
Organization: Usenet Network
Message-ID: <179284409298.3134.2544700895306550156@kernel.org>
References: <20261020-support_ast2700-v4-6-4d36b40939b3@aspeedtech.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="753166"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:0eZfLtua2eNfwIR2ITdjaJc0SuM= sha256:WKEuN8zYmzjJLrX/iJp4qfe572Qpcvl2AvouK4JORMA=
	sha1:coM5AaGtI1A6VG3xB0kEaXdlEEk= sha256:4acdtLyRz3zv1xuV7R9EhXDKdVM6TBAcbZ79CO9IJ5o=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 0A68111162C; Sat, 24 Oct 2026 15:15:51 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.839
X-Spam-Status: No, score=-3.839 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id vpD2nJkbzsXl;
	Sat, 24 Oct 2026 15:15:47 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-351366-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 268C71115DA; Sat, 24 Oct 2026 15:15:38 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 8D137605D77; Sat, 24 Oct 2026 12:15:06 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792844096;
	b=sJrfTNH6s23Hk2raYqfpBhE+nJNh5XSC+FT7LH+YaFZ1UnmmCgRufDRwiF/xmv7RsBjQ
	 tkabG3s6WaWLyk7EY5GfdGnqG8oAF3/ZPTygoc9jPEO0aQXoArmhtzQinF1wjoDA9n34m
	 BPejC8vRtc7nMGM2dmj8pMBRQAf+aSe+wdI/QC2fPTklvr9tFmJMzTYKyo10K7ekWWLY1
	 hUlATqq7ASgBgnN3k76bVSyQutQno6XW5eCdLchpDesqHetbtkTR+roCMTaiRcahSy0ey
	 FfgSW6jYIzeyy36Mip+7rx+HIrbxienrpOE6B6WyYmamb8lbFbDrgBDbXA6obCUFVHg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792844096;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=ottpThceg5hJCKwYwOig+t32jGLSDNK6UuVyETsOj0w=;
	b=yDn3kOIj1EZXIAEGsjfBfbWmnvzxi1oERD8GFB0cWTKFT6UY/nRo7kUy7Bch/GsOXsNW
	 AD2JsCCYuBGsDX2UNT1rvJAdrhbi8c8m9DyB7D4Y3I88dRdM0+BVyiDeF6KIwanhPpe+r
	 4OHy6NbixVctBpoBPeaRBJr2O1rNjf5BNOEbg5imneQU+uUSN0IEXevl5AybDpOJpblK0
	 oWvJhBQM9lXIGXxKSGh6M/xq0EIiRtDWbd9A15xZN75y/DsbGxnnOEit6fAiCQZOIolDp
	 fJdNtXgVpxDMtSYAxUXDuDPQhXiGiviN6DJskjR66nRKlVi2xat4DPYcRYAVCJRdCMw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IeV2HGVz;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E5B460A2631;
	Sat, 24 Oct 2026 12:14:56 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IeV2HGVz
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792844094;
	b=EYWm/i9eu5ZYeiMgyonmV42c69vcWAeIlsHPL2xTw0FFnDnECHMEyuy9E7kALkQONYhF
	 GMDF+veoRTfdQUKXyKm3M9dLmSlzT7ENjV49U6y4ydIiJe5R7LImCDnKlGTPpBB0VKXtA
	 cxQDgC63ALUg6rA0IbB3C2RmAsIzKiQVT+KIgO3714wJxIpqhkr5+q8CzzgydIpw8JQSO
	 iyDxEDORGG+a63bX2ilSUlsUnigBc9vVLtjLANHFAAVGWS1OAU8dlEsfyeTcQm/Oqp/RI
	 Kt3A18l2kvmXMoPdQjZr13+Q2u7ZoCwpdrWZB6ucghc78NAty9is7/qRL+Y6ZgGzmsw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792844094;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=ottpThceg5hJCKwYwOig+t32jGLSDNK6UuVyETsOj0w=;
	b=O5TNHoGdzpg/RamwGkJErRzDQ0WpWRiTYgKrDPdnoXDDQ4wW44sfq+xi87jDr51LrZYN
	 GSjsakYIjQM+C9jTCpHA5wqpT8HWdqrwkTRJIh6FeaB3GVT1ejcAkTMG08vGgzb1O/i0q
	 ihUrompX7ut+2X9bV36MtFTIp5H0ffLBn7EUffut0mjp8rqpiwveuwHWoDqEg1TecbQvl
	 JNnBPeSJsLIKmsR1DwyWLo6+Nd5Y5ugv3HKelKyVsFeLnCj2T76021YpAsQHTOijWpLWW
	 pjYZ4IQA9UJFAAAvxAKUrEWXbbMFr692E4vXor/EiLJptxyk/FSii8hor+Gj3aMM03w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=IeV2HGVz;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5342C60A261F;
	Sat, 24 Oct 2026 12:14:54 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61E441F031E6;
	Sat, 24 Oct 2026 12:14:53 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792844094;
	bh=ottpThceg5hJCKwYwOig+t32jGLSDNK6UuVyETsOj0w=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=IeV2HGVzxStTpQB5FmYdScY3LiRqllUYDs3p5FkPZb+ARWeq1eb1eTDkHTnuvvIdN
	 ZTU4HNh0d7Zo4ZVJJNKLLQvNkBRCkPVlHrRG/f2VpeCz9isC5EKz1q11xQGDLtaHiV
	 ymGlHfOAB/bPzMCZQIoMoZw3wVZhL7QSOF96v2S9fYDNq8zkctNcPTK9Gs2tn9eZKL
	 pfvN/7ZOD9ygaPyzbbrXxhZyo9Uo3U/UJ/d/SWTH/fmJAmoEKP0oPJGfs43JzP0Hhe
	 Dzmjp2oj+cJDRkGPHcptagS5czVa6ao7VLLNyCnjSU/0c0k75VY7TXo5WDdLxSQstv
	 wNefLo4Dqz8ig==
X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, kuba@kernel.org,
 pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
 ratbert@faraday-tech.com, edumazet@kernel.org, hkallweit1@gmail.com,
 linux@armlinux.org.uk, netdev@vger.kernel.org, devicetree@vger.kernel.org,
 linux-kernel@vger.kernel.org, andrew@lunn.ch
X-In-Reply-To: <20261020-support_ast2700-v4-6-4d36b40939b3@aspeedtech.com>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list