Lines Matching full:sfp
11 #include "sfp.h"
14 * struct sfp_bus - internal representation of a sfp bus
24 struct sfp *sfp; member
37 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
88 dev_warn(bus->sfp_dev, "SFP: unknown connector id 0x%02x\n", in sfp_parse_port()
112 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
139 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
294 /* For fibre channel SFP, derive possible BaseX modes */ in sfp_parse_support()
341 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
344 * Derive the phy_interface_t mode for the SFP module from the link
395 struct sfp_bus *sfp, *new, *found = NULL; in sfp_bus_get() local
401 list_for_each_entry(sfp, &sfp_buses, node) { in sfp_bus_get()
402 if (sfp->fwnode == fwnode) { in sfp_bus_get()
403 kref_get(&sfp->kref); in sfp_bus_get()
404 found = sfp; in sfp_bus_get()
462 bus->socket_ops->attach(bus->sfp); in sfp_register_bus()
464 bus->socket_ops->start(bus->sfp); in sfp_register_bus()
476 bus->socket_ops->stop(bus->sfp); in sfp_unregister_bus()
477 bus->socket_ops->detach(bus->sfp); in sfp_unregister_bus()
485 * sfp_get_module_info() - Get the ethtool_modinfo for a SFP module
486 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
490 * the sfp bus specified by @bus.
496 return bus->socket_ops->module_info(bus->sfp, modinfo); in sfp_get_module_info()
501 * sfp_get_module_eeprom() - Read the SFP module EEPROM
502 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
514 return bus->socket_ops->module_eeprom(bus->sfp, ee, data); in sfp_get_module_eeprom()
519 * sfp_get_module_eeprom_by_page() - Read a page from the SFP module EEPROM
520 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
534 return bus->socket_ops->module_eeprom_by_page(bus->sfp, page, extack); in sfp_get_module_eeprom_by_page()
539 * sfp_upstream_start() - Inform the SFP that the network device is up
540 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
542 * Inform the SFP socket that the network device is now up, so that the
550 bus->socket_ops->start(bus->sfp); in sfp_upstream_start()
556 * sfp_upstream_stop() - Inform the SFP that the network device is down
557 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
559 * Inform the SFP socket that the network device is now up, so that the
567 bus->socket_ops->stop(bus->sfp); in sfp_upstream_stop()
579 * sfp_bus_find_fwnode() - parse and locate the SFP bus from fwnode
582 * Parse the parent device's firmware node for a SFP bus, and locate
588 * - %NULL if no SFP is specified,
602 ret = fwnode_property_get_reference_args(fwnode, "sfp", NULL, in sfp_bus_find_fwnode()
629 * Add upstream driver for the SFP bus, and if the bus is complete, register
630 * the SFP bus using sfp_register_upstream(). This takes a reference on the
635 * - %NULL if no SFP is specified,
657 if (bus->sfp) { in sfp_bus_add_upstream()
674 * sfp_bus_del_upstream() - Delete a sfp bus
675 * @bus: a pointer to the &struct sfp_bus structure for the sfp module
677 * Delete a previously registered upstream connection for the SFP
684 if (bus->sfp) in sfp_bus_del_upstream()
788 bus->sfp = NULL; in sfp_socket_clear()
792 struct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp, in sfp_register_socket() argument
801 bus->sfp = sfp; in sfp_register_socket()