mirror of
https://github.com/openwrt/openwrt.git
synced 2026-11-27 14:41:12 +04:00
With some SFP modules, including the ProLabs GLC-SX-MMD, the RTL8214FC can fail to regain link after the fibre cable is reconnected. The module reports signal again, but the PHY link stays down until the module is reseated or the fibre receiver is reset. Schedule a per-port check 500 ms after SFP link-up to allow time for normal link acquisition. If BMSR reports link down, preserve the latched indication for phylib and read BMSR again. If the link is still down, pulse the fibre RX reset bit for 100 ms as in the vendor SDK. Using delayed work keeps both delays out of the SFP link-up callback. Cancel the work on link-down, module removal and detach. Assisted-by: ChatGPT (OpenAI GPT-6.2 Astra) Link: https://github.com/openwrt/openwrt/pull/26965 Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>