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
341 /* For fibre channel SFP, derive possible BaseX modes */ in sfp_parse_support()
375 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
378 * Derive the phy_interface_t mode for the SFP module from the link
418 struct sfp_bus *sfp, *new, *found = NULL; in sfp_bus_get() local
424 list_for_each_entry(sfp, &sfp_buses, node) { in sfp_bus_get()
425 if (sfp->fwnode == fwnode) { in sfp_bus_get()
426 kref_get(&sfp->kref); in sfp_bus_get()
427 found = sfp; in sfp_bus_get()
485 bus->socket_ops->attach(bus->sfp); in sfp_register_bus()
487 bus->socket_ops->start(bus->sfp); in sfp_register_bus()
499 bus->socket_ops->stop(bus->sfp); in sfp_unregister_bus()
500 bus->socket_ops->detach(bus->sfp); in sfp_unregister_bus()
508 * sfp_get_module_info() - Get the ethtool_modinfo for a SFP module
509 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
513 * the sfp bus specified by @bus.
519 return bus->socket_ops->module_info(bus->sfp, modinfo); in sfp_get_module_info()
524 * sfp_get_module_eeprom() - Read the SFP module EEPROM
525 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
537 return bus->socket_ops->module_eeprom(bus->sfp, ee, data); in sfp_get_module_eeprom()
542 * sfp_upstream_start() - Inform the SFP that the network device is up
543 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
545 * Inform the SFP socket that the network device is now up, so that the
553 bus->socket_ops->start(bus->sfp); in sfp_upstream_start()
559 * sfp_upstream_stop() - Inform the SFP that the network device is down
560 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
562 * Inform the SFP socket that the network device is now up, so that the
570 bus->socket_ops->stop(bus->sfp); in sfp_upstream_stop()
582 * sfp_bus_find_fwnode() - parse and locate the SFP bus from fwnode
585 * Parse the parent device's firmware node for a SFP bus, and locate
591 * - %NULL if no SFP is specified,
605 ret = fwnode_property_get_reference_args(fwnode, "sfp", NULL, in sfp_bus_find_fwnode()
632 * Add upstream driver for the SFP bus, and if the bus is complete, register
633 * the SFP bus using sfp_register_upstream(). This takes a reference on the
638 * - %NULL if no SFP is specified,
660 if (bus->sfp) { in sfp_bus_add_upstream()
677 * sfp_bus_del_upstream() - Delete a sfp bus
678 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
680 * Delete a previously registered upstream connection for the SFP
687 if (bus->sfp) in sfp_bus_del_upstream()
790 bus->sfp = NULL; in sfp_socket_clear()
794 struct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp, in sfp_register_socket() argument
803 bus->sfp = sfp; in sfp_register_socket()