Lines Matching full:sfp
11 #include "sfp.h"
20 * struct sfp_bus - internal representation of a sfp bus
30 struct sfp *sfp; member
124 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
175 dev_warn(bus->sfp_dev, "SFP: unknown connector id 0x%02x\n", in sfp_parse_port()
199 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
226 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
347 /* For fibre channel SFP, derive possible BaseX modes */ in sfp_parse_support()
386 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
389 * Derive the phy_interface_t mode for the SFP module from the link
440 struct sfp_bus *sfp, *new, *found = NULL; in sfp_bus_get() local
446 list_for_each_entry(sfp, &sfp_buses, node) { in sfp_bus_get()
447 if (sfp->fwnode == fwnode) { in sfp_bus_get()
448 kref_get(&sfp->kref); in sfp_bus_get()
449 found = sfp; in sfp_bus_get()
507 bus->socket_ops->attach(bus->sfp); in sfp_register_bus()
509 bus->socket_ops->start(bus->sfp); in sfp_register_bus()
521 bus->socket_ops->stop(bus->sfp); in sfp_unregister_bus()
522 bus->socket_ops->detach(bus->sfp); in sfp_unregister_bus()
530 * sfp_get_module_info() - Get the ethtool_modinfo for a SFP module
531 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
535 * the sfp bus specified by @bus.
541 return bus->socket_ops->module_info(bus->sfp, modinfo); in sfp_get_module_info()
546 * sfp_get_module_eeprom() - Read the SFP module EEPROM
547 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
559 return bus->socket_ops->module_eeprom(bus->sfp, ee, data); in sfp_get_module_eeprom()
564 * sfp_get_module_eeprom_by_page() - Read a page from the SFP module EEPROM
565 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
579 return bus->socket_ops->module_eeprom_by_page(bus->sfp, page, extack); in sfp_get_module_eeprom_by_page()
584 * sfp_upstream_start() - Inform the SFP that the network device is up
585 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
587 * Inform the SFP socket that the network device is now up, so that the
595 bus->socket_ops->start(bus->sfp); in sfp_upstream_start()
601 * sfp_upstream_stop() - Inform the SFP that the network device is down
602 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
604 * Inform the SFP socket that the network device is now up, so that the
612 bus->socket_ops->stop(bus->sfp); in sfp_upstream_stop()
624 * sfp_bus_find_fwnode() - parse and locate the SFP bus from fwnode
627 * Parse the parent device's firmware node for a SFP bus, and locate
633 * - %NULL if no SFP is specified,
647 ret = fwnode_property_get_reference_args(fwnode, "sfp", NULL, in sfp_bus_find_fwnode()
669 * Add upstream driver for the SFP bus, and if the bus is complete, register
670 * the SFP bus using sfp_register_upstream(). This takes a reference on the
675 * - %NULL if no SFP is specified,
697 if (bus->sfp) { in sfp_bus_add_upstream()
714 * sfp_bus_del_upstream() - Delete a sfp bus
715 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
717 * Delete a previously registered upstream connection for the SFP
724 if (bus->sfp) in sfp_bus_del_upstream()
827 bus->sfp = NULL; in sfp_socket_clear()
831 struct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp, in sfp_register_socket() argument
840 bus->sfp = sfp; in sfp_register_socket()