linux/drivers/block
Vaibhav Gupta cd97b7e0d7 mtip32xx: convert to generic power management
Convert mtip32xx from legacy PCI power management to the generic power
management framework.

Previously, mtip32xx used legacy PCI power management, where
mtip_pci_suspend() and mtip_pci_resume() were responsible for both
device-specific things and generic PCI things:

  mtip_pci_suspend
    mtip_block_suspend(dd)              <-- device-specific
    pci_save_state(pdev)                <-- generic PCI
    pci_set_power_state(pdev, pci_choose_state(pdev, state))

  mtip_pci_resume
    pci_set_power_state(PCI_D0)         <-- generic PCI
    pci_restore_state(pdev)             <-- generic PCI
    pcim_enable_device(pdev)            <-- generic PCI
    pci_set_master(pdev)                <-- generic PCI
    mtip_block_resume(dd)               <-- device-specific

With generic power management, the PCI bus PM methods do the generic PCI
things, and the driver needs only the device-specific part, i.e.,

  suspend_devices_and_enter
    dpm_suspend_start(PMSG_SUSPEND)
      pci_pm_suspend                    # PCI bus .suspend() method
        mtip_pci_suspend                # dev->driver->pm->suspend
          mtip_block_suspend            <-- device-specific
    suspend_enter
      dpm_suspend_noirq(PMSG_SUSPEND)
        pci_pm_suspend_noirq            # PCI bus .suspend_noirq() method
          pci_save_state                <-- generic PCI
          pci_prepare_to_sleep          <-- generic PCI
            pci_set_power_state
    ...
    dpm_resume_end(PMSG_RESUME)
      pci_pm_resume                     # PCI bus .resume() method
        pci_restore_standard_config
          pci_set_power_state(PCI_D0)   <-- generic PCI
          pci_restore_state             <-- generic PCI
        mtip_pci_resume                 # dev->driver->pm->resume
          mtip_block_resume             <-- device-specific

[bhelgaas: commit log]

Link: https://lore.kernel.org/r/20210114115423.52414-2-vaibhavgupta40@gmail.com
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20211208192449.146076-4-helgaas@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-12-14 06:59:20 -07:00
..
aoe block: aoe: fixup coccinelle warnings 2021-10-21 08:54:15 -06:00
drbd drbd: Use struct_group() to zero algs 2021-12-13 16:31:24 -07:00
mtip32xx mtip32xx: convert to generic power management 2021-12-14 06:59:20 -07:00
null_blk null_blk: cast command status to integer 2021-12-10 16:32:44 -07:00
paride block: remove the gendisk argument to blk_execute_rq 2021-11-29 06:41:29 -07:00
rnbd block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
rsxx block/rsxx: add error handling support for add_disk() 2021-10-18 14:41:36 -06:00
xen-blkback block: remove GENHD_FL_CD 2021-11-29 06:35:21 -07:00
zram block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
amiflop.c block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
ataflop.c block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
brd.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
floppy.c floppy: Add max size check for user space request 2021-12-03 06:32:40 -07:00
Kconfig vhost,virtio,vhost: fixes,features 2021-11-03 15:00:39 -07:00
loop.c loop: make autoclear operation asynchronous 2021-12-13 11:37:31 -07:00
loop.h loop: make autoclear operation asynchronous 2021-12-13 11:37:31 -07:00
Makefile block: remove support for cryptoloop and the xor transfer 2021-10-22 08:34:58 -06:00
n64cart.c block: rename GENHD_FL_NO_PART_SCAN to GENHD_FL_NO_PART 2021-11-29 06:35:21 -07:00
nbd.c for-5.16/drivers-2021-11-09 2021-11-09 11:24:08 -08:00
pktcdvd.c pktdvd: stop using bdi congestion framework. 2021-12-09 21:31:56 -07:00
ps3disk.c ps3disk: add error handling support for add_disk() 2021-10-30 11:03:37 -06:00
ps3vram.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
rbd_types.h libceph, rbd: replace zero-length array with flexible-array 2020-06-01 13:22:53 +02:00
rbd.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
sunvdc.c block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
swim3.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
swim_asm.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
swim.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00
sx8.c block: remove the gendisk argument to blk_execute_rq 2021-11-29 06:41:29 -07:00
virtio_blk.c block: remove the gendisk argument to blk_execute_rq 2021-11-29 06:41:29 -07:00
xen-blkfront.c block: remove GENHD_FL_CD 2021-11-29 06:35:21 -07:00
z2ram.c block: remove GENHD_FL_EXT_DEVT 2021-11-29 06:38:35 -07:00