Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: macb: fix the link speed the taprio setup reads
@ 2026-09-02  8:05 Aleksei Sviridkin
  2026-09-02  8:05 ` [PATCH net 1/2] net: macb: zero the link settings taprio reads back Aleksei Sviridkin
  2026-09-02  8:05 ` [PATCH net 2/2] net: macb: reject an unknown link speed in the taprio setup Aleksei Sviridkin
  0 siblings, 2 replies; 7+ messages in thread
From: Aleksei Sviridkin @ 2026-09-02  8:05 UTC (permalink / raw)
  To: Thu00e9o Lebrun
  Cc: Conor Dooley, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Russell King, Vineeth Karumanchi,
	netdev, linux-kernel

Two small fixes in macb_taprio_setup_replace(), both in how it obtains
the link speed it scales the schedule with.

The first: it hands phylink_ethtool_ksettings_get() a stack variable
it never zeroed, while phylink fills only what the link mode provides
and even reads one field back from the caller. The second: the speed
check is written as "<= 0" on a u32, so SPEED_UNKNOWN passes it and
turns into a 1 ns hardware limit that every entry then exceeds.

Compile-tested against net; the driver has no test surface, and no
macb board here.

Aleksei Sviridkin (2):
  net: macb: zero the link settings taprio reads back
  net: macb: reject an unknown link speed in the taprio setup

 drivers/net/ethernet/cadence/macb_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-09-03 12:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02  8:05 [PATCH net 0/2] net: macb: fix the link speed the taprio setup reads Aleksei Sviridkin
2026-09-02  8:05 ` [PATCH net 1/2] net: macb: zero the link settings taprio reads back Aleksei Sviridkin
2026-09-02  8:32   ` Théo Lebrun
2026-09-02  8:05 ` [PATCH net 2/2] net: macb: reject an unknown link speed in the taprio setup Aleksei Sviridkin
2026-09-02  8:57   ` Théo Lebrun
2026-09-02 16:37   ` Andrew Lunn
2026-09-03 12:36     ` Aleksei Sviridkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox