History

net: phylink: delay MAC configuration for copper SFP modules

Knowing whether we need to delay the MAC configuration because a module may have a PHY is useful to phylink to allow NBASE-T modules to work on systems supporting no more than 2.5G speeds. This commit allows us to delay such configuration until after the PHY has been probed by recording the parsed capabilities, and if the module may have a PHY, doing no more until the module_start() notification is called. At that point, we either have a PHY, or we don't. We move the PHY-based setup a little later, and use the PHYs support capabilities rather than the EEPROM parsed capabilities to determine whether we can support the PHY.

Russell King committed 6 years ago

Commit 52c95601 parent c0de2f43 files · +78 −10Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/sfp.h+7−0
@@ -533,6 +533,7 @@ struct sfp_upstream_ops { · 532 unmodified lines
533#if IS_ENABLED(CONFIG_SFP)533#if IS_ENABLED(CONFIG_SFP)
534int sfp_parse_port(struct sfp_bus *bus, const struct sfp_eeprom_id *id,534int sfp_parse_port(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
535 unsigned long *support);535 unsigned long *support);
536bool sfp_may_have_phy(struct sfp_bus *bus, const struct sfp_eeprom_id *id);
536void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,537void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
537 unsigned long *support);538 unsigned long *support);
538phy_interface_t sfp_select_interface(struct sfp_bus *bus,539phy_interface_t sfp_select_interface(struct sfp_bus *bus,
@@ -556,6 +557,12 @@ static inline int sfp_parse_port(struct sfp_bus *bus, · 17 unmodified lines
556 return PORT_OTHER;557 return PORT_OTHER;
557}558}
558 559
560static inline bool sfp_may_have_phy(struct sfp_bus *bus,
561 const struct sfp_eeprom_id *id)
562{
563 return false;
564}
565
559static inline void sfp_parse_support(struct sfp_bus *bus,566static inline void sfp_parse_support(struct sfp_bus *bus,
560 const struct sfp_eeprom_id *id,567 const struct sfp_eeprom_id *id,
561 unsigned long *support)568 unsigned long *support)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t