• Vaibhav Gupta's avatar
    qlcninc: use generic power management · 7ada9a5e
    Vaibhav Gupta authored
    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: default avatarVaibhav Gupta <vaibhavgupta40@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7ada9a5e
qlcnic_hw.c 43.9 KB