net: sfp: fix PHY discovery for FS SFP-10G-T module
authorMarek Behún <kabel@kernel.org>
Tue, 19 Dec 2023 16:24:15 +0000 (17:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Dec 2023 06:20:14 +0000 (06:20 +0000)
commite9301af385e7864dea353f5e58cad7339dd6c718
tree8cb378d8ad218f261c9cf40f772210d6c56a35be
parent3b83fa94cf316aaf9ad9a367ac8031a06d31649b
net: sfp: fix PHY discovery for FS SFP-10G-T module

Commit 2f3ce7a56c6e ("net: sfp: rework the RollBall PHY waiting code")
changed the long wait before accessing RollBall / FS modules into
probing for PHY every 1 second, and trying 25 times.

Wei Lei reports that this does not work correctly on FS modules: when
initializing, they may report values different from 0xffff in PHY ID
registers for some MMDs, causing get_phy_c45_ids() to find some bogus
MMD.

Fix this by adding the module_t_wait member back, and setting it to 4
seconds for FS modules.

Fixes: 2f3ce7a56c6e ("net: sfp: rework the RollBall PHY waiting code")
Reported-by: Wei Lei <quic_leiwei@quicinc.com>
Signed-off-by: Marek Behún <kabel@kernel.org>
Tested-by: Lei Wei <quic_leiwei@quicinc.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp.c