[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0b5a9cb4-3d35-4650-b482-29b3c780ed1a@bootlin.com>
Date: Wed, 7 Jan 2026 09:41:56 +0100
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, linux-arm-kernel@...ts.infradead.org,
linux-stm32@...md-mailman.stormreply.com,
Maxime Coquelin <mcoquelin.stm32@...il.com>, netdev@...r.kernel.org,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next 3/9] net: stmmac: dwmac4: fix PTP message type
field extraction
On 06/01/2026 21:31, Russell King (Oracle) wrote:
> In dwmac4_wrback_get_rx_status(), the code extracts the PTP message
> type from receive descriptor 1 using the dwmac enhanced descriptor
> definitions:
>
> message_type = (rdes1 & ERDES4_MSG_TYPE_MASK) >> 8;
>
> This is defined as:
>
> #define ERDES4_MSG_TYPE_MASK GENMASK(11, 8)
>
> The correct definition is RDES1_PTP_MSG_TYPE_MASK, which is also
> defined as:
>
> #define RDES1_PTP_MSG_TYPE_MASK GENMASK(11, 8)
>
> Use the correct definition, converting to use FIELD_GET() to extract
> it without needing an open-coded shift right that is dependent on the
> mask definition.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
Reviewed-by: Maxime Chevallier <maxime.chevallier@...tlin.com>
Maxime
Powered by blists - more mailing lists