Skip to content

Commit 32034fd

Browse files
committed
igc: Remove redundant runtime resume for ethtool ops
Author: Bjorn Helgaas <bhelgaas@google.com> 8c5ad0d ("igc: Add ethtool support") added ethtool_ops.begin() and .complete(), which used pm_runtime_get_sync() to resume suspended devices before any ethtool_ops callback and allow suspend after it completed. Subsequently, f32a213 ("ethtool: runtime-resume netdev parent before ethtool ioctl ops") added pm_runtime_get_sync() in the dev_ethtool() path, so the device is resumed before any ethtool_ops callback even if the driver didn't supply a .begin() callback. Remove the .begin() and .complete() callbacks, which are now redundant because dev_ethtool() already resumes the device. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Simon Horman <horms@kernel.org> Tested-by: Naama Meir <naamax.meir@linux.intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> (cherry picked from commit 75f16e0) JIRA: https://issues.redhat.com/browse/RHEL-17489 Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
1 parent ac491f7 commit 32034fd

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

drivers/net/ethernet/intel/igc/igc_ethtool.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,21 +1711,6 @@ static int igc_ethtool_set_eee(struct net_device *netdev,
17111711
return 0;
17121712
}
17131713

1714-
static int igc_ethtool_begin(struct net_device *netdev)
1715-
{
1716-
struct igc_adapter *adapter = netdev_priv(netdev);
1717-
1718-
pm_runtime_get_sync(&adapter->pdev->dev);
1719-
return 0;
1720-
}
1721-
1722-
static void igc_ethtool_complete(struct net_device *netdev)
1723-
{
1724-
struct igc_adapter *adapter = netdev_priv(netdev);
1725-
1726-
pm_runtime_put(&adapter->pdev->dev);
1727-
}
1728-
17291714
static int igc_ethtool_get_link_ksettings(struct net_device *netdev,
17301715
struct ethtool_link_ksettings *cmd)
17311716
{
@@ -2025,8 +2010,6 @@ static const struct ethtool_ops igc_ethtool_ops = {
20252010
.set_priv_flags = igc_ethtool_set_priv_flags,
20262011
.get_eee = igc_ethtool_get_eee,
20272012
.set_eee = igc_ethtool_set_eee,
2028-
.begin = igc_ethtool_begin,
2029-
.complete = igc_ethtool_complete,
20302013
.get_link_ksettings = igc_ethtool_get_link_ksettings,
20312014
.set_link_ksettings = igc_ethtool_set_link_ksettings,
20322015
.self_test = igc_ethtool_diag_test,

0 commit comments

Comments
 (0)