]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4527ea9c5291af9de00cff0f14ba96c5eef15046
tree44b5a7fa860b4c88cde41d7ac8ca347582ee8e4a
parente5e61a9ed2c9b7a28519d35e8a7e8e74c155fb3c
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