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
533533 #if IS_ENABLED(CONFIG_SFP)
534534 int sfp_parse_port(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
535535 unsigned long *support);
536+bool sfp_may_have_phy(struct sfp_bus *bus, const struct sfp_eeprom_id *id);
536537 void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
537538 unsigned long *support);
538539 phy_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
556557 return PORT_OTHER;
557558 }
558559
560+static inline bool sfp_may_have_phy(struct sfp_bus *bus,
561+ const struct sfp_eeprom_id *id)
562+{
563+ return false;
564+}
565+
559566 static inline void sfp_parse_support(struct sfp_bus *bus,
560567 const struct sfp_eeprom_id *id,
561568 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