1. 06 Jul, 2020 4 commits
    • David S. Miller's avatar
      Merge branch 'ethernet-sun-use-generic-power-management' · 83184b8b
      David S. Miller authored
      Vaibhav Gupta says:
      
      ====================
      ethernet: sun: use generic power management
      
      Linux Kernel Mentee: Remove Legacy Power Management.
      
      The purpose of this patch series is to remove legacy power management callbacks
      from sun ethernet drivers.
      
      The callbacks performing suspend() and resume() operations are still calling
      pci_save_state(), pci_set_power_state(), etc. and handling the power management
      themselves, which is not recommended.
      
      The conversion requires the removal of the those function calls and change the
      callback definition accordingly and make use of dev_pm_ops structure.
      
      All patches are compile-tested only.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      83184b8b
    • Vaibhav Gupta's avatar
      sun/cassini: use generic power management · f193f4eb
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f193f4eb
    • Vaibhav Gupta's avatar
      sun/niu: use generic power management · b0db0cc2
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      The driver was calling pci_save/restore_state() which is no more needed.
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b0db0cc2
    • Vaibhav Gupta's avatar
      sun/sungem: use generic power management · d4ce70b3
      Vaibhav Gupta authored
      With legacy PM, drivers themselves were responsible for managing the
      device's power states and takes care of register states. And they use PCI
      helper functions to do it.
      
      After upgrading to the generic structure, PCI core will take care of
      required tasks and drivers should do only device-specific operations.
      
      In this driver:
      gem_suspend() calls gem_do_stop() which in turn invokes
      pci_disable_device(). As the PCI helper function is not called at the
      end/start of the function body, breaking the function in two parts
      may change its behavior.
      
      The only other function invoking gem_do_stop() is gem_close(). Hence,
      gem_close() and gem_suspend() can do the required end steps on their own.
      
      The same case is with gem_resume(). Both gem_resume() and gem_open()
      invoke gem_do_start(). Again, make the caller functions do the required
      steps on their own.
      
      Compile-tested only.
      Signed-off-by: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4ce70b3
  2. 05 Jul, 2020 36 commits