e8b58ef0 | 19-Jun-2022 |
Christoph Hellwig <hch@lst.de> |
mtip32xx: fix device removal
Use the proper helper to mark a surpise removal, remove the gendisk as soon as possible when removing the device and implement the ->free_disk callback to ensure the pri
mtip32xx: fix device removal
Use the proper helper to mark a surpise removal, remove the gendisk as soon as possible when removing the device and implement the ->free_disk callback to ensure the private data is alive as long as the gendisk has references.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20220619060552.1850436-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
cd97b7e0 | 08-Dec-2021 |
Vaibhav Gupta <vaibhavgupta40@gmail.com> |
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, whe
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>
show more ...
|
9e541f14 | 08-Dec-2021 |
Bjorn Helgaas <bhelgaas@google.com> |
mtip32xx: remove pointless drvdata lookups
Previously we passed a struct pci_dev * to mtip_check_surprise_removal(), which immediately looked up the driver_data. But all callers already have the dr
mtip32xx: remove pointless drvdata lookups
Previously we passed a struct pci_dev * to mtip_check_surprise_removal(), which immediately looked up the driver_data. But all callers already have the driver_data pointer, so just pass it directly and skip the extra lookup. No functional change intended.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20211208192449.146076-3-helgaas@kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
cc25592c | 14-Jun-2021 |
Christoph Hellwig <hch@lst.de> |
mtip32xx: use blk_mq_alloc_disk and blk_cleanup_disk
Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig <hch@lst.de> L
mtip32xx: use blk_mq_alloc_disk and blk_cleanup_disk
Use blk_mq_alloc_disk and blk_cleanup_disk to simplify the gendisk and request_queue allocation.
Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20210614060343.3965416-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
80755855 | 29-Mar-2021 |
Shixin Liu <liushixin2@huawei.com> |
mtip32xx: use LIST_HEAD() for list_head
There's no need to declare a list and then init it manually, just use the LIST_HEAD() macro.
Signed-off-by: Shixin Liu <liushixin2@huawei.com> Link: https://
mtip32xx: use LIST_HEAD() for list_head
There's no need to declare a list and then init it manually, just use the LIST_HEAD() macro.
Signed-off-by: Shixin Liu <liushixin2@huawei.com> Link: https://lore.kernel.org/r/20210329095349.4170870-2-liushixin2@huawei.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
21269791 | 26-Jan-2021 |
Bjorn Helgaas <bhelgaas@google.com> |
mtip32xx: prefer pcie_capability_read_word()
Replace pci_read_config_word() with pcie_capability_read_word().
pcie_capability_read_word() takes care of a few special cases when reading the PCIe cap
mtip32xx: prefer pcie_capability_read_word()
Replace pci_read_config_word() with pcie_capability_read_word().
pcie_capability_read_word() takes care of a few special cases when reading the PCIe capability. See 8c0d3a02c130 ("PCI: Add accessors for PCI Express Capability").
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|