1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/intel/e1000e
Bjorn Helgaas b2c289415b e1000e: Remove redundant runtime resume for ethtool_ops
e60b22c5b7 ("e1000e: fix accessing to suspended device") 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.

3ef672ab18 ("e1000e: ethtool unnecessarily takes device out of RPM
suspend") removed ethtool_ops.begin() and .complete() and instead did
pm_runtime_get_sync() only in the individual ethtool_ops callbacks that
access device registers.

Subsequently, f32a213765 ("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, as it was
before 3ef672ab18.

Remove most runtime resumes from ethtool_ops, which are now redundant
because the resume has already been done by dev_ethtool().  This is
essentially a revert of 3ef672ab18 ("e1000e: ethtool unnecessarily takes
device out of RPM suspend").

There are a couple subtleties:

  - Prior to 3ef672ab18, the device was resumed only for the duration of
    a single ethtool callback.  3ef672ab18 changed e1000_set_phys_id() so
    the device was resumed for ETHTOOL_ID_ACTIVE and remained resumed until
    a subsequent callback for ETHTOOL_ID_INACTIVE.  Preserve that part of
    3ef672ab18 so the device will not be runtime suspended while in the
    ETHTOOL_ID_ACTIVE state.

  - 3ef672ab18 added "if (!pm_runtime_suspended())" in before reading the
    STATUS register in e1000_get_settings().  This was racy and is now
    unnecessary because dev_ethtool() has resumed the device already, so
    revert that.

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>
2024-04-08 13:25:39 -07:00
..
80003es2lan.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
80003es2lan.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
82571.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
82571.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
defines.h e1000e: Use pcie_capability_read_word() for reading LNKSTA 2023-12-12 12:21:29 -08:00
e1000.h e1000e: correct maximum frequency adjustment values 2024-01-29 10:01:08 -08:00
e1000e_trace.h e1000e: Add e1000e trace module 2022-11-02 11:08:38 -07:00
ethtool.c e1000e: Remove redundant runtime resume for ethtool_ops 2024-04-08 13:25:39 -07:00
hw.h e1000e: Workaround for sporadic MDI error on Meteor Lake systems 2024-03-27 11:44:20 -07:00
ich8lan.c e1000e: move force SMBUS from enable ulp function to avoid PHY loss issue 2024-03-27 11:44:34 -07:00
ich8lan.h Revert "e1000e: Fix possible HW unit hang after an s0ix exit" 2022-07-14 09:17:21 -07:00
mac.c intel: legacy: field get conversion 2023-12-18 11:20:43 -08:00
mac.h net: e1000e: Remove unused declarations 2023-08-15 19:05:17 -07:00
Makefile e1000e: Add e1000e trace module 2022-11-02 11:08:38 -07:00
manage.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
manage.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
netdev.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-04-04 18:01:07 -07:00
nvm.c e1000e: Reduce boot time by tightening sleep ranges 2019-06-28 15:59:52 -07:00
nvm.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
param.c intel: remove unused macros 2022-06-30 09:40:55 -07:00
phy.c e1000e: Workaround for sporadic MDI error on Meteor Lake systems 2024-03-27 11:44:20 -07:00
phy.h e1000e: Workaround for sporadic MDI error on Meteor Lake systems 2024-03-27 11:44:20 -07:00
ptp.c e1000e: correct maximum frequency adjustment values 2024-01-29 10:01:08 -08:00
regs.h e1000e: Add polling mechanism to indicate CSME DPG exit 2021-07-20 16:11:36 -07:00