Netdev List
 help / color / mirror / Atom feed
* [PATCH net v3 0/3] net: txgbe: fix module identification
@ 2026-06-08  7:08 Jiawen Wu
  2026-06-08  7:08 ` [PATCH net v3 1/3] net: txgbe: initialize module info buffer Jiawen Wu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jiawen Wu @ 2026-06-08  7:08 UTC (permalink / raw)
  To: netdev
  Cc: Mengyuan Lou, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, Larysa Zaremba,
	Fabio Baltieri, Jiawen Wu

For AML devices, there are some issues where the wrong module
indentified then configure PHY failed.

The module info buffers should be initialized to 0 before the firmware
returns information. And DECLARE_PHY_INTERFACE_MASK() does not guarantee
zeroed contents, so explicitly clear the temporary interface masks before
setting supported interfaces.

Rework txgbe_identify_module() to validate module identifiers through
explicit type checks instead of relying on transceiver_type heuristics.
When using the SFP module, transceiver_type could be a random value,
because it was read from an invalid register.

---
Changes log:
v3:
- Add a new macro DECLARE_PHY_INTERFACE_MASK_ZEROED().

v2: https://lore.kernel.org/all/20260605030850.17796-1-jiawenwu@trustnetic.com
- Split the patch into 3 fixes.
- Change DECLARE_PHY_INTERFACE_MASK() to empty array.

v1: https://lore.kernel.org/all/F3DA1ECDCE0A1E9E+20260602025443.332456-1-jiawenwu@trustnetic.com
---

Jiawen Wu (3):
  net: txgbe: initialize module info buffer
  net: txgbe: distinguish module types by checking identifier
  net: txgbe: initialize PHY interface to 0

 .../net/ethernet/wangxun/txgbe/txgbe_aml.c    | 24 +++++++++----------
 .../net/ethernet/wangxun/txgbe/txgbe_type.h   |  3 +++
 2 files changed, 14 insertions(+), 13 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-06-11  9:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-08  7:08 [PATCH net v3 0/3] net: txgbe: fix module identification Jiawen Wu
2026-06-08  7:08 ` [PATCH net v3 1/3] net: txgbe: initialize module info buffer Jiawen Wu
2026-06-08  7:08 ` [PATCH net v3 2/3] net: txgbe: distinguish module types by checking identifier Jiawen Wu
2026-06-08  7:08 ` [PATCH net v3 3/3] net: txgbe: initialize PHY interface to 0 Jiawen Wu
2026-06-11  9:10 ` [PATCH net v3 0/3] net: txgbe: fix module identification patchwork-bot+netdevbpf

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