Thread (17 messages) 17 messages, 3 authors, 2026-01-08

Re: [PATCH net-next 3/9] net: stmmac: dwmac4: fix PTP message type field extraction

From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2026-01-07 08:42:12
Also in: netdev


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) <redacted>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>

Maxime
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help