Re: [PATCH net-next 2/2] net: dsa: mxl862xx: use RST_DATA to skip writing zero words
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-03-21 15:29:01
Also in:
lkml
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-03-21 15:29:01
Also in:
lkml
On Sat, Mar 21, 2026 at 05:20:14AM +0000, Daniel Golle wrote:
Issue the firmware's RST_DATA command before writing data payloads that contain many zero words. RST_DATA zeroes both the firmware's internal buffer and the MMD data registers in a single command, allowing the driver to skip individual MDIO writes for zero-valued words. This reduces bus traffic for the common case where API structs have many unused or default-zero fields. The optimization is applied when at least 5 zero words are found in the payload, roughly the break-even point against the cost of the extra RST_DATA command round-trip.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew