sfp_bus
if (phydev->sfp_bus && !priv->sfp_link)
if (phydev->sfp_bus)
sfp_upstream_stop(phydev->sfp_bus);
if (phydev->sfp_bus)
sfp_upstream_start(phydev->sfp_bus);
static void phy_sfp_attach(void *upstream, struct sfp_bus *bus)
phydev->attached_dev->sfp_bus = bus;
static void phy_sfp_detach(void *upstream, struct sfp_bus *bus)
phydev->attached_dev->sfp_bus = NULL;
caps = sfp_get_module_caps(phydev->sfp_bus);
iface = sfp_select_interface(phydev->sfp_bus, sfp_support);
struct sfp_bus *bus;
phydev->sfp_bus = bus;
phydev->sfp_bus = NULL;
if (!ret && phydev->sfp_bus)
dev->sfp_bus = phydev->sfp_bus;
sfp_bus_del_upstream(phydev->sfp_bus);
phydev->sfp_bus = NULL;
sfp_bus_del_upstream(phydev->sfp_bus);
phydev->sfp_bus = NULL;
pdn->parent_sfp_bus = pdn->upstream.netdev->sfp_bus;
pdn->parent_sfp_bus = pdn->upstream.phydev->sfp_bus;
if (pl->sfp_bus) {
sfp_upstream_set_signal_rate(pl->sfp_bus, rate_kbd);
struct sfp_bus *bus;
pl->sfp_bus = bus;
sfp_bus_del_upstream(pl->sfp_bus);
phy_interface_mode_is_8023z(interface) && !pl->sfp_bus)))
if (pl->sfp_bus)
sfp_upstream_start(pl->sfp_bus);
if (pl->sfp_bus)
sfp_upstream_stop(pl->sfp_bus);
interface = sfp_select_interface(pl->sfp_bus, link_modes);
if (pl->sfp_bus) {
if (!pl->sfp_bus && pl->phydev)
if (!pl->sfp_bus && pl->phydev)
static void phylink_sfp_attach(void *upstream, struct sfp_bus *bus)
pl->netdev->sfp_bus = bus;
static void phylink_sfp_detach(void *upstream, struct sfp_bus *bus)
pl->netdev->sfp_bus = NULL;
caps = sfp_get_module_caps(pl->sfp_bus);
struct sfp_bus *sfp_bus;
static void sfp_module_parse_may_have_phy(struct sfp_bus *bus,
static void sfp_module_parse_support(struct sfp_bus *bus,
static void sfp_init_module(struct sfp_bus *bus,
phy_interface_t sfp_select_interface(struct sfp_bus *bus,
const struct sfp_module_caps *sfp_get_module_caps(struct sfp_bus *bus)
static const struct sfp_upstream_ops *sfp_get_upstream_ops(struct sfp_bus *bus)
static struct sfp_bus *sfp_bus_get(const struct fwnode_handle *fwnode)
struct sfp_bus *sfp, *new, *found = NULL;
static void sfp_module_parse_port(struct sfp_bus *bus,
struct sfp_bus *bus = container_of(kref, struct sfp_bus, kref);
void sfp_bus_put(struct sfp_bus *bus)
static int sfp_register_bus(struct sfp_bus *bus)
static void sfp_unregister_bus(struct sfp_bus *bus)
int sfp_get_module_info(struct sfp_bus *bus, struct ethtool_modinfo *modinfo)
int sfp_get_module_eeprom(struct sfp_bus *bus, struct ethtool_eeprom *ee,
int sfp_get_module_eeprom_by_page(struct sfp_bus *bus,
void sfp_upstream_start(struct sfp_bus *bus)
void sfp_upstream_stop(struct sfp_bus *bus)
static void sfp_upstream_clear(struct sfp_bus *bus)
void sfp_upstream_set_signal_rate(struct sfp_bus *bus, unsigned int rate_kbd)
struct sfp_bus *sfp_bus_find_fwnode(const struct fwnode_handle *fwnode)
struct sfp_bus *bus;
int sfp_bus_add_upstream(struct sfp_bus *bus, void *upstream,
void sfp_bus_del_upstream(struct sfp_bus *bus)
const char *sfp_get_name(struct sfp_bus *bus)
int sfp_add_phy(struct sfp_bus *bus, struct phy_device *phydev)
void sfp_remove_phy(struct sfp_bus *bus)
void sfp_link_up(struct sfp_bus *bus)
void sfp_link_down(struct sfp_bus *bus)
int sfp_module_insert(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
void sfp_module_remove(struct sfp_bus *bus)
int sfp_module_start(struct sfp_bus *bus)
void sfp_module_stop(struct sfp_bus *bus)
static void sfp_socket_clear(struct sfp_bus *bus)
struct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp,
struct sfp_bus *bus = sfp_bus_get(dev->fwnode);
void sfp_unregister_socket(struct sfp_bus *bus)
sfp_remove_phy(sfp->sfp_bus);
err = sfp_add_phy(sfp->sfp_bus, phy);
sfp_link_up(sfp->sfp_bus);
sfp_link_down(sfp->sfp_bus);
struct sfp_bus *sfp_bus;
sfp_module_remove(sfp->sfp_bus);
err = sfp_module_insert(sfp->sfp_bus, &sfp->id,
sfp_module_remove(sfp->sfp_bus);
sfp_module_stop(sfp->sfp_bus);
if (sfp_module_start(sfp->sfp_bus)) {
sfp->sfp_bus = sfp_register_socket(sfp->dev, sfp, &sfp_module_ops);
if (!sfp->sfp_bus)
sfp_unregister_socket(sfp->sfp_bus);
int sfp_add_phy(struct sfp_bus *bus, struct phy_device *phydev);
void sfp_remove_phy(struct sfp_bus *bus);
void sfp_link_up(struct sfp_bus *bus);
void sfp_link_down(struct sfp_bus *bus);
int sfp_module_insert(struct sfp_bus *bus, const struct sfp_eeprom_id *id,
void sfp_module_remove(struct sfp_bus *bus);
int sfp_module_start(struct sfp_bus *bus);
void sfp_module_stop(struct sfp_bus *bus);
struct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp,
void sfp_unregister_socket(struct sfp_bus *bus);
struct sfp_bus *sfp_bus;
struct sfp_bus;
struct sfp_bus;
struct sfp_bus *sfp_bus;
struct sfp_bus;
struct sfp_bus *parent_sfp_bus;
struct sfp_bus;
void (*attach)(void *priv, struct sfp_bus *bus);
void (*detach)(void *priv, struct sfp_bus *bus);
const struct sfp_module_caps *sfp_get_module_caps(struct sfp_bus *bus);
phy_interface_t sfp_select_interface(struct sfp_bus *bus,
int sfp_get_module_info(struct sfp_bus *bus, struct ethtool_modinfo *modinfo);
int sfp_get_module_eeprom(struct sfp_bus *bus, struct ethtool_eeprom *ee,
int sfp_get_module_eeprom_by_page(struct sfp_bus *bus,
void sfp_upstream_start(struct sfp_bus *bus);
void sfp_upstream_stop(struct sfp_bus *bus);
void sfp_upstream_set_signal_rate(struct sfp_bus *bus, unsigned int rate_kbd);
void sfp_bus_put(struct sfp_bus *bus);
struct sfp_bus *sfp_bus_find_fwnode(const struct fwnode_handle *fwnode);
int sfp_bus_add_upstream(struct sfp_bus *bus, void *upstream,
void sfp_bus_del_upstream(struct sfp_bus *bus);
const char *sfp_get_name(struct sfp_bus *bus);
sfp_get_module_caps(struct sfp_bus *bus)
static inline phy_interface_t sfp_select_interface(struct sfp_bus *bus,
static inline int sfp_get_module_info(struct sfp_bus *bus,
static inline int sfp_get_module_eeprom(struct sfp_bus *bus,
static inline int sfp_get_module_eeprom_by_page(struct sfp_bus *bus,
static inline void sfp_upstream_start(struct sfp_bus *bus)
static inline void sfp_upstream_stop(struct sfp_bus *bus)
static inline void sfp_upstream_set_signal_rate(struct sfp_bus *bus,
static inline void sfp_bus_put(struct sfp_bus *bus)
static inline struct sfp_bus *
static inline int sfp_bus_add_upstream(struct sfp_bus *bus, void *upstream,
static inline void sfp_bus_del_upstream(struct sfp_bus *bus)
static inline const char *sfp_get_name(struct sfp_bus *bus)
if (dev->sfp_bus)
return sfp_get_module_eeprom_by_page(dev->sfp_bus, page_data, extack);
if (dev->sfp_bus)
return sfp_get_module_info(dev->sfp_bus, modinfo);
if (dev->sfp_bus)
return sfp_get_module_eeprom(dev->sfp_bus, ee, data);
if (phydev->sfp_bus) {
rep_data->downstream_sfp_name = kstrdup(sfp_get_name(phydev->sfp_bus),