1. 16 Mar, 2021 2 commits
    • Chen Yu's avatar
      e1000e: Remove the runtime suspend restriction on CNP+ · 3335369b
      Chen Yu authored
      Although there is platform issue of runtime suspend support
      on CNP, it would be more flexible to let the user decide whether
      to disable runtime or not because:
      1. This can be done in userspace via
         echo on > /sys/devices/pci0000\:00/0000\:00\:1f.d/power/control
      2. More and more NICs would support runtime suspend, disabling the
         runtime suspend on them by default would impact the validation.
      
      Only disable runtime suspend on CNP in case of any user space regression.
      Signed-off-by: default avatarChen Yu <yu.c.chen@intel.com>
      Tested-by: default avatarDvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      3335369b
    • Chen Yu's avatar
      e1000e: Leverage direct_complete to speed up s2ram · ccf8b940
      Chen Yu authored
      The NIC is put in runtime suspend status when there is no cable connected.
      As a result, it is safe to keep non-wakeup NIC in runtime suspended during
      s2ram because the system does not rely on the NIC plug event nor WoL to wake
      up the system. Besides that, unlike the s2idle, s2ram does not need to
      manipulate S0ix settings during suspend.
      
      This patch introduces the .prepare() for e1000e so that if the NIC is runtime
      suspended the subsequent suspend/resume hooks will be skipped so as to speed
      up the s2ram. The pm core will check whether the NIC is a wake up device so
      there's no need to check it again in .prepare(). DPM_FLAG_SMART_PREPARE flag
      should be set during probe to ask the pci subsystem to honor the driver's
      prepare() result. Besides, the NIC remains runtime suspended after resumed
      from s2ram as there is no need to resume it.
      
      Tested on i7-2600K with 82579V NIC
      Before the patch:
      e1000e 0000:00:19.0: pci_pm_suspend+0x0/0x160 returned 0 after 225146 usecs
      e1000e 0000:00:19.0: pci_pm_resume+0x0/0x90 returned 0 after 140588 usecs
      
      After the patch:
      echo disabled > //sys/devices/pci0000\:00/0000\:00\:19.0/power/wakeup
      becomes 0 usecs because the hooks will be skipped.
      Suggested-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: default avatarChen Yu <yu.c.chen@intel.com>
      Tested-by: default avatarDvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      ccf8b940
  2. 14 Mar, 2021 33 commits
  3. 13 Mar, 2021 5 commits