|
@@ -22,6 +22,7 @@
|
|
#include <linux/bitops.h>
|
|
#include <linux/bitops.h>
|
|
#include <linux/uaccess.h>
|
|
#include <linux/uaccess.h>
|
|
#include <linux/vmalloc.h>
|
|
#include <linux/vmalloc.h>
|
|
|
|
+#include <linux/sfp.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/rtnetlink.h>
|
|
#include <linux/rtnetlink.h>
|
|
#include <linux/sched/signal.h>
|
|
#include <linux/sched/signal.h>
|
|
@@ -2245,6 +2246,9 @@ static int __ethtool_get_module_info(struct net_device *dev,
|
|
const struct ethtool_ops *ops = dev->ethtool_ops;
|
|
const struct ethtool_ops *ops = dev->ethtool_ops;
|
|
struct phy_device *phydev = dev->phydev;
|
|
struct phy_device *phydev = dev->phydev;
|
|
|
|
|
|
|
|
+ if (dev->sfp_bus)
|
|
|
|
+ return sfp_get_module_info(dev->sfp_bus, modinfo);
|
|
|
|
+
|
|
if (phydev && phydev->drv && phydev->drv->module_info)
|
|
if (phydev && phydev->drv && phydev->drv->module_info)
|
|
return phydev->drv->module_info(phydev, modinfo);
|
|
return phydev->drv->module_info(phydev, modinfo);
|
|
|
|
|
|
@@ -2279,6 +2283,9 @@ static int __ethtool_get_module_eeprom(struct net_device *dev,
|
|
const struct ethtool_ops *ops = dev->ethtool_ops;
|
|
const struct ethtool_ops *ops = dev->ethtool_ops;
|
|
struct phy_device *phydev = dev->phydev;
|
|
struct phy_device *phydev = dev->phydev;
|
|
|
|
|
|
|
|
+ if (dev->sfp_bus)
|
|
|
|
+ return sfp_get_module_eeprom(dev->sfp_bus, ee, data);
|
|
|
|
+
|
|
if (phydev && phydev->drv && phydev->drv->module_eeprom)
|
|
if (phydev && phydev->drv && phydev->drv->module_eeprom)
|
|
return phydev->drv->module_eeprom(phydev, ee, data);
|
|
return phydev->drv->module_eeprom(phydev, ee, data);
|
|
|
|
|