]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/sfp.h
mm/memory_hotplug: export generic_online_page()
[linux.git] / include / linux / sfp.h
index 355a08a76fd4d476b2d24bcf590d48ec828c7bc1..487fd9412d10e76d1bfe28fd6a86a7af9e0a193e 100644 (file)
@@ -428,6 +428,10 @@ enum {
        SFP_TEC_CUR                     = 0x6c,
 
        SFP_STATUS                      = 0x6e,
+       SFP_STATUS_TX_DISABLE           = BIT(7),
+       SFP_STATUS_TX_DISABLE_FORCE     = BIT(6),
+       SFP_STATUS_TX_FAULT             = BIT(2),
+       SFP_STATUS_RX_LOS               = BIT(1),
        SFP_ALARM0                      = 0x70,
        SFP_ALARM0_TEMP_HIGH            = BIT(7),
        SFP_ALARM0_TEMP_LOW             = BIT(6),
@@ -508,10 +512,11 @@ int sfp_get_module_eeprom(struct sfp_bus *bus, struct ethtool_eeprom *ee,
                          u8 *data);
 void sfp_upstream_start(struct sfp_bus *bus);
 void sfp_upstream_stop(struct sfp_bus *bus);
-struct sfp_bus *sfp_register_upstream_node(struct fwnode_handle *fwnode,
-                                          void *upstream,
-                                          const struct sfp_upstream_ops *ops);
-void sfp_unregister_upstream(struct sfp_bus *bus);
+void sfp_bus_put(struct sfp_bus *bus);
+struct sfp_bus *sfp_bus_find_fwnode(struct fwnode_handle *fwnode);
+int sfp_bus_add_upstream(struct sfp_bus *bus, void *upstream,
+                        const struct sfp_upstream_ops *ops);
+void sfp_bus_del_upstream(struct sfp_bus *bus);
 #else
 static inline int sfp_parse_port(struct sfp_bus *bus,
                                 const struct sfp_eeprom_id *id,
@@ -553,14 +558,22 @@ static inline void sfp_upstream_stop(struct sfp_bus *bus)
 {
 }
 
-static inline struct sfp_bus *sfp_register_upstream_node(
-       struct fwnode_handle *fwnode, void *upstream,
-       const struct sfp_upstream_ops *ops)
+static inline void sfp_bus_put(struct sfp_bus *bus)
+{
+}
+
+static inline struct sfp_bus *sfp_bus_find_fwnode(struct fwnode_handle *fwnode)
 {
        return NULL;
 }
 
-static inline void sfp_unregister_upstream(struct sfp_bus *bus)
+static inline int sfp_bus_add_upstream(struct sfp_bus *bus, void *upstream,
+                                      const struct sfp_upstream_ops *ops)
+{
+       return 0;
+}
+
+static inline void sfp_bus_del_upstream(struct sfp_bus *bus)
 {
 }
 #endif