OSDN Git Service

qlcninc: use generic power management
authorVaibhav Gupta <vaibhavgupta40@gmail.com>
Thu, 2 Jul 2020 17:01:43 +0000 (22:31 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Jul 2020 01:02:06 +0000 (18:02 -0700)
commit7ada9a5e48e57c3c7e5217c19a6719a85b07b0ba
tree44b5a7fa860b4c88cde41d7ac8ca347582ee8e4a
parent063ad9bcc297c1f4cfd3a35a6a709b3fd52031f3
qlcninc: use generic power management

With legacy PM, drivers themselves were responsible for managing the
device's power states and taking 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.

.suspend() calls __qlcnic_shutdown, which then calls qlcnic_82xx_shutdown;
.resume()  calls __qlcnic_resume,   which then calls qlcnic_82xx_resume;

Both ...82xx..() are define in
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c and are used only in
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c.

Hence upgrade them and remove PCI function calls, like pci_save_state() and
pci_enable_wake(), inside them

Compile-tested only.

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c