sfp.h 900 B

12345678910111213141516171819202122232425262728
  1. #ifndef SFP_H
  2. #define SFP_H
  3. #include <linux/ethtool.h>
  4. #include <linux/sfp.h>
  5. struct sfp;
  6. struct sfp_socket_ops {
  7. void (*start)(struct sfp *sfp);
  8. void (*stop)(struct sfp *sfp);
  9. int (*module_info)(struct sfp *sfp, struct ethtool_modinfo *modinfo);
  10. int (*module_eeprom)(struct sfp *sfp, struct ethtool_eeprom *ee,
  11. u8 *data);
  12. };
  13. int sfp_add_phy(struct sfp_bus *bus, struct phy_device *phydev);
  14. void sfp_remove_phy(struct sfp_bus *bus);
  15. void sfp_link_up(struct sfp_bus *bus);
  16. void sfp_link_down(struct sfp_bus *bus);
  17. int sfp_module_insert(struct sfp_bus *bus, const struct sfp_eeprom_id *id);
  18. void sfp_module_remove(struct sfp_bus *bus);
  19. int sfp_link_configure(struct sfp_bus *bus, const struct sfp_eeprom_id *id);
  20. struct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp,
  21. const struct sfp_socket_ops *ops);
  22. void sfp_unregister_socket(struct sfp_bus *bus);
  23. #endif