diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2024-08-27 16:13:56 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2024-08-27 16:13:56 +0200 |
commit | 76889bbaabf5cab981a74ed69cb3816921edc5d4 (patch) | |
tree | ed31de4f6682b7069475539b69d2f263108924b0 /drivers/spi/spi-cadence-quadspi.c | |
parent | iommufd/selftest: Fix buffer read overrrun in the dirty test (diff) | |
parent | iommufd/device: Enforce reserved IOVA also when attached to hwpt_nested (diff) | |
download | linux-76889bbaabf5cab981a74ed69cb3816921edc5d4.tar.xz linux-76889bbaabf5cab981a74ed69cb3816921edc5d4.zip |
Merge branch 'nesting_reserved_regions' into iommufd.git for-next
Nicolin Chen says:
=========
IOMMU_RESV_SW_MSI is a unique region defined by an IOMMU driver. Though it
is eventually used by a device for address translation to an MSI location
(including nested cases), practically it is a universal region across all
domains allocated for the IOMMU that defines it.
Currently IOMMUFD core fetches and reserves the region during an attach to
an hwpt_paging. It works with a hwpt_paging-only case, but might not work
with a nested case where a device could directly attach to a hwpt_nested,
bypassing the hwpt_paging attachment.
Move the enforcement forward, to the hwpt_paging allocation function. Then
clean up all the SW_MSI related things in the attach/replace routine.
=========
Based on v6.11-rc5 for dependencies.
* nesting_reserved_regions: (562 commits)
iommufd/device: Enforce reserved IOVA also when attached to hwpt_nested
Linux 6.11-rc5
...
Diffstat (limited to 'drivers/spi/spi-cadence-quadspi.c')
-rw-r--r-- | drivers/spi/spi-cadence-quadspi.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index 05ebb03d319f..d4607cb89c48 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c @@ -2000,13 +2000,25 @@ static int cqspi_runtime_resume(struct device *dev) static int cqspi_suspend(struct device *dev) { struct cqspi_st *cqspi = dev_get_drvdata(dev); + int ret; - return spi_controller_suspend(cqspi->host); + ret = spi_controller_suspend(cqspi->host); + if (ret) + return ret; + + return pm_runtime_force_suspend(dev); } static int cqspi_resume(struct device *dev) { struct cqspi_st *cqspi = dev_get_drvdata(dev); + int ret; + + ret = pm_runtime_force_resume(dev); + if (ret) { + dev_err(dev, "pm_runtime_force_resume failed on resume\n"); + return ret; + } return spi_controller_resume(cqspi->host); } |