From: Arseny Solokha <asolo...@kb.kras.ru> Date: Wed, 24 Jul 2019 20:31:39 +0700
> SFP modules connected using the SGMII interface have their own PHYs which > are handled by the struct phylink's phydev field. On the other hand, for > the modules connected using 1000Base-X interface that field is not set. > > Since commit ce0aa27ff3f6 ("sfp: add sfp-bus to bridge between network > devices and sfp cages") phylink_start() ends up setting the phydev field > using the sfp-bus infrastructure, which eventually calls phy_start() on it, > and then calling phy_start() again on the same phydev from phylink_start() > itself. Similar call sequence holds for phylink_stop(), only in the reverse > order. This results in WARNs during network interface bringup and shutdown > when a copper SFP module is connected, as phy_start() and phy_stop() are > called twice in a row for the same phy_device: ... > SFP modules with the 1000Base-X interface are not affected. > > Place explicit calls to phy_start() and phy_stop() before enabling or after > disabling an attached SFP module, where phydev is not yet set (or is > already unset), so they will be made only from the inside of sfp-bus, if > needed. > > Signed-off-by: Arseny Solokha <asolo...@kb.kras.ru> Applied with appropriate Fixes: tag added and queued up for -stable. Thanks.