summaryrefslogtreecommitdiff
path: root/net/ethtool/cmis_fw_update.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ethtool/cmis_fw_update.c')
-rw-r--r--net/ethtool/cmis_fw_update.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ethtool/cmis_fw_update.c b/net/ethtool/cmis_fw_update.c
index 48aef6220f00..df5f344209c4 100644
--- a/net/ethtool/cmis_fw_update.c
+++ b/net/ethtool/cmis_fw_update.c
@@ -2,6 +2,7 @@
#include <linux/ethtool.h>
#include <linux/firmware.h>
+#include <net/netdev_lock.h>
#include "common.h"
#include "module_fw.h"
@@ -418,8 +419,13 @@ cmis_fw_update_commit_image(struct ethtool_cmis_cdb *cdb,
static int cmis_fw_update_reset(struct net_device *dev)
{
__u32 reset_data = ETH_RESET_PHY;
+ int ret;
- return dev->ethtool_ops->reset(dev, &reset_data);
+ netdev_lock_ops(dev);
+ ret = dev->ethtool_ops->reset(dev, &reset_data);
+ netdev_unlock_ops(dev);
+
+ return ret;
}
void