Back to home page

OSCL-LXR

 
 

    


0001 #ifndef SFP_H
0002 #define SFP_H
0003 
0004 #include <linux/ethtool.h>
0005 #include <linux/sfp.h>
0006 
0007 struct sfp;
0008 
0009 struct sfp_socket_ops {
0010     void (*attach)(struct sfp *sfp);
0011     void (*detach)(struct sfp *sfp);
0012     void (*start)(struct sfp *sfp);
0013     void (*stop)(struct sfp *sfp);
0014     int (*module_info)(struct sfp *sfp, struct ethtool_modinfo *modinfo);
0015     int (*module_eeprom)(struct sfp *sfp, struct ethtool_eeprom *ee,
0016                  u8 *data);
0017     int (*module_eeprom_by_page)(struct sfp *sfp,
0018                      const struct ethtool_module_eeprom *page,
0019                      struct netlink_ext_ack *extack);
0020 };
0021 
0022 int sfp_add_phy(struct sfp_bus *bus, struct phy_device *phydev);
0023 void sfp_remove_phy(struct sfp_bus *bus);
0024 void sfp_link_up(struct sfp_bus *bus);
0025 void sfp_link_down(struct sfp_bus *bus);
0026 int sfp_module_insert(struct sfp_bus *bus, const struct sfp_eeprom_id *id);
0027 void sfp_module_remove(struct sfp_bus *bus);
0028 int sfp_module_start(struct sfp_bus *bus);
0029 void sfp_module_stop(struct sfp_bus *bus);
0030 int sfp_link_configure(struct sfp_bus *bus, const struct sfp_eeprom_id *id);
0031 struct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp,
0032                     const struct sfp_socket_ops *ops);
0033 void sfp_unregister_socket(struct sfp_bus *bus);
0034 
0035 #endif