sfp.h 968 B

12345678910111213141516171819202122232425262728293031
  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 (*attach)(struct sfp *sfp);
  8. void (*detach)(struct sfp *sfp);
  9. void (*start)(struct sfp *sfp);
  10. void (*stop)(struct sfp *sfp);
  11. int (*module_info)(struct sfp *sfp, struct ethtool_modinfo *modinfo);
  12. int (*module_eeprom)(struct sfp *sfp, struct ethtool_eeprom *ee,
  13. u8 *data);
  14. };
  15. int sfp_add_phy(struct sfp_bus *bus, struct phy_device *phydev);
  16. void sfp_remove_phy(struct sfp_bus *bus);
  17. void sfp_link_up(struct sfp_bus *bus);
  18. void sfp_link_down(struct sfp_bus *bus);
  19. int sfp_module_insert(struct sfp_bus *bus, const struct sfp_eeprom_id *id);
  20. void sfp_module_remove(struct sfp_bus *bus);
  21. int sfp_link_configure(struct sfp_bus *bus, const struct sfp_eeprom_id *id);
  22. struct sfp_bus *sfp_register_socket(struct device *dev, struct sfp *sfp,
  23. const struct sfp_socket_ops *ops);
  24. void sfp_unregister_socket(struct sfp_bus *bus);
  25. #endif