[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250422170858.GL2843373@horms.kernel.org>
Date: Tue, 22 Apr 2025 18:08:58 +0100
From: Simon Horman <horms@...nel.org>
To: Daniel Golle <daniel@...rotopia.org>
Cc: Felix Fietkau <nbd@....name>, Sean Wang <sean.wang@...iatek.com>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: Re: [PATCH net-next v3] net: ethernet: mtk_eth_soc: convert cap_bit
in mtk_eth_muxc struct to u64
On Thu, Apr 17, 2025 at 05:42:16PM +0100, Daniel Golle wrote:
> From: Bo-Cun Chen <bc-bocun.chen@...iatek.com>
>
> The capabilities bitfield was converted to a 64-bit value, but a cap_bit
> in struct mtk_eth_muxc which is used to store a full bitfield (rather
> than the bit number, as the name would suggest) still holds only a
> 32-bit value.
>
> Change the type of cap_bit to u64 in order to avoid truncating the
> bitfield which results in path selection to not work with capabilities
> above the 32-bit limit.
>
> The values currently stored in the cap_bit field are
> MTK_ETH_MUX_GDM1_TO_GMAC1_ESW:
> BIT_ULL(18) | BIT_ULL(5)
>
> MTK_ETH_MUX_GMAC2_GMAC0_TO_GEPHY:
> BIT_ULL(19) | BIT_ULL(5) | BIT_ULL(6)
>
> MTK_ETH_MUX_U3_GMAC2_TO_QPHY:
> BIT_ULL(20) | BIT_ULL(5) | BIT_ULL(6)
>
> MTK_ETH_MUX_GMAC1_GMAC2_TO_SGMII_RGMII:
> BIT_ULL(20) | BIT_ULL(5) | BIT_ULL(7)
>
> MTK_ETH_MUX_GMAC12_TO_GEPHY_SGMII:
> BIT_ULL(21) | BIT_ULL(5)
>
> While all those values are currently still within 32-bit boundaries,
> the addition of new capabilities of MT7988 as well as future SoC's
> like MT7987 will exceed them. Also, the use of a 32-bit 'int' type to
> store the result of a BIT_ULL(...) is misleading.
>
> Fixes: 51a4df60db5c2 ("net: ethernet: mtk_eth_soc: convert caps in mtk_soc_data struct to u64")
As this is not a fix and not for net it should not have a Fixes tag.
If you wish to reference the commit you can do so using:
commit ("net: ethernet: mtk_eth_soc: convert caps in mtk_soc_data struct to
u64")
E.g.:
Introduced in commit ("net: ethernet: mtk_eth_soc: convert caps in
mtk_soc_data struct to u64").
Note this should be line wrapped. And should be in the "body" of the commit
message. That is, if it comes at the end of the commit message then there
should be at least one blank line between it and the Signed-off-by and
other tags
> Signed-off-by: Bo-Cun Chen <bc-bocun.chen@...iatek.com>
> Signed-off-by: Daniel Golle <daniel@...rotopia.org>
> ---
> v3: improve commit message, target net-next instead of net tree
Powered by blists - more mailing lists