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. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c0de2f4720
commit
52c956003a
@@ -533,6 +533,7 @@ struct sfp_upstream_ops {
|
||||
#if IS_ENABLED(CONFIG_SFP)
|
||||
int sfp_parse_port(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
|
||||
unsigned long *support);
|
||||
bool sfp_may_have_phy(struct sfp_bus *bus, const struct sfp_eeprom_id *id);
|
||||
void sfp_parse_support(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
|
||||
unsigned long *support);
|
||||
phy_interface_t sfp_select_interface(struct sfp_bus *bus,
|
||||
@@ -556,6 +557,12 @@ static inline int sfp_parse_port(struct sfp_bus *bus,
|
||||
return PORT_OTHER;
|
||||
}
|
||||
|
||||
static inline bool sfp_may_have_phy(struct sfp_bus *bus,
|
||||
const struct sfp_eeprom_id *id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline void sfp_parse_support(struct sfp_bus *bus,
|
||||
const struct sfp_eeprom_id *id,
|
||||
unsigned long *support)
|
||||
|
Reference in New Issue
Block a user