]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: txgbe: distinguish module types by checking identifier
authorJiawen Wu <jiawenwu@trustnetic.com>
Mon, 8 Jun 2026 07:08:41 +0000 (15:08 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 11 Jun 2026 08:55:14 +0000 (10:55 +0200)
commitf2df54ddbfb04a006ee326a5d8270434a414e0af
treec324685962425d4260e8e82d6284466bf54d671f
parent0487cfca46517ff6699c72dc1a8872b0af3c31a9
net: txgbe: distinguish module types by checking identifier

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.

Fixes: 57d39faed4c9 ("net: txgbe: improve functions of AML 40G devices")
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Link: https://patch.msgid.link/20260608070842.36504-3-jiawenwu@trustnetic.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c