Lines Matching full:sfp
11 #include "sfp.h"
20 * struct sfp_bus - internal representation of a sfp bus
30 struct sfp *sfp; member
109 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
160 dev_warn(bus->sfp_dev, "SFP: unknown connector id 0x%02x\n", in sfp_parse_port()
184 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
211 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
326 /* For fibre channel SFP, derive possible BaseX modes */ in sfp_parse_support()
361 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
364 * Derive the phy_interface_t mode for the SFP module from the link
404 struct sfp_bus *sfp, *new, *found = NULL; in sfp_bus_get() local
410 list_for_each_entry(sfp, &sfp_buses, node) { in sfp_bus_get()
411 if (sfp->fwnode == fwnode) { in sfp_bus_get()
412 kref_get(&sfp->kref); in sfp_bus_get()
413 found = sfp; in sfp_bus_get()
471 bus->socket_ops->attach(bus->sfp); in sfp_register_bus()
473 bus->socket_ops->start(bus->sfp); in sfp_register_bus()
485 bus->socket_ops->stop(bus->sfp); in sfp_unregister_bus()
486 bus->socket_ops->detach(bus->sfp); in sfp_unregister_bus()
494 * sfp_get_module_info() - Get the ethtool_modinfo for a SFP module
495 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
499 * the sfp bus specified by @bus.
505 return bus->socket_ops->module_info(bus->sfp, modinfo); in sfp_get_module_info()
510 * sfp_get_module_eeprom() - Read the SFP module EEPROM
511 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
523 return bus->socket_ops->module_eeprom(bus->sfp, ee, data); in sfp_get_module_eeprom()
528 * sfp_upstream_start() - Inform the SFP that the network device is up
529 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
531 * Inform the SFP socket that the network device is now up, so that the
539 bus->socket_ops->start(bus->sfp); in sfp_upstream_start()
545 * sfp_upstream_stop() - Inform the SFP that the network device is down
546 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
548 * Inform the SFP socket that the network device is now up, so that the
556 bus->socket_ops->stop(bus->sfp); in sfp_upstream_stop()
568 * sfp_bus_find_fwnode() - parse and locate the SFP bus from fwnode
571 * Parse the parent device's firmware node for a SFP bus, and locate
577 * - %NULL if no SFP is specified,
591 ret = fwnode_property_get_reference_args(fwnode, "sfp", NULL, in sfp_bus_find_fwnode()
613 * Add upstream driver for the SFP bus, and if the bus is complete, register
614 * the SFP bus using sfp_register_upstream(). This takes a reference on the
619 * - %NULL if no SFP is specified,
641 if (bus->sfp) { in sfp_bus_add_upstream()
658 * sfp_bus_del_upstream() - Delete a sfp bus
659 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
661 * Delete a previously registered upstream connection for the SFP
668 if (bus->sfp) in sfp_bus_del_upstream()
771 bus->sfp = NULL; in sfp_socket_clear()
775 struct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp, in sfp_register_socket() argument
784 bus->sfp = sfp; in sfp_register_socket()