netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net: phylink: supported modes set to 0 with genphy sfp module
@ 2020-05-11 15:45 Julien Beraud
  2020-05-11 18:29 ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 6+ messages in thread
From: Julien Beraud @ 2020-05-11 15:45 UTC (permalink / raw)
  To: netdev@vger.kernel.org, Russell King
  Cc: Andrew Lunn, Florian Fainelli, Heiner Kallweit

Following commit:

commit 52c956003a9d5bcae1f445f9dfd42b624adb6e87
Author: Russell King <rmk+kernel@armlinux.org.uk>
Date:   Wed Dec 11 10:56:45 2019 +0000

     net: phylink: delay MAC configuration for copper SFP modules


In function phylink_sfp_connect_phy, phylink_sfp_config is called before 
phylink_attach_phy.

In the case of a genphy, the "supported" field of the phy_device is 
filled by:
phylink_attach_phy->phy_attach_direct->phy_probe->genphy_read_abilities.

It means that:

ret = phylink_sfp_config(pl, mode, phy->supported, phy->advertising);
will have phy->supported with no bits set, and then the first call to 
phylink_validate in phylink_sfp_config will return an error:

return phylink_is_empty_linkmode(supported) ? -EINVAL : 0;

this results in putting the sfp driver in "failed" state.

Thanks,
Julien Beraud





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

end of thread, other threads:[~2020-05-13  7:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-11 15:45 net: phylink: supported modes set to 0 with genphy sfp module Julien Beraud
2020-05-11 18:29 ` Russell King - ARM Linux admin
2020-05-11 19:06   ` Florian Fainelli
2020-05-12  9:28     ` Julien Beraud
2020-05-12 12:28       ` Russell King - ARM Linux admin
2020-05-13  7:14         ` Julien Beraud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).